luzl 发表于 2013-1-25 22:31:17

建立客户机服务器连接

unix
--设置环境变量
修改实例用户的 .profile 文件,添加 export DB2COMM=TCPIP;

--修改/etc/services 文件
DBM CFG 中
TCP/IP Service name                        (SVCENAME) = db2cqhbiinst
对应 services
db2cqhbiinst    50000/tcp   # Connection port for DB2 instance qhbiinst

--重启实例

--客户机连接正常
--但是telnet到主机后连接报错:
$ db2 connect to qhmart
SQL0332NThere is no available conversion for the source code page "1051" to
the target code page "UNKNOWN".Reason Code "1".SQLSTATE=57017

--联系IBM后要求db2set 命令设置
db2set db2codepage=1386
仍然报错
--退出telnet重新登录,连接数据库正常
$ db2set
DB2COUNTRY=86
DB2CODEPAGE=1386
$ db2 connect to qhmart
SQL0332NThere is no available conversion for the source code page "1051" to
the target code page "UNKNOWN".Reason Code "1".SQLSTATE=57017


--查看参数
db2set -lr 可以查看有那些参数可以设置
页: [1]
查看完整版本: 建立客户机服务器连接