db2安装完成后,tcp/ip连接端口默认为50000,可通过下面的方法确认:
1、使用命令 db2 get dbm cfg
找到'SVCENAME' 查找到TCP/IP 服务名
www.
2、到系统配置文件里找到service name 对应的 port number
windows:查看 c:\windows\system32\drivers\etc\services
aix: 查看 /etc/services
如下:
DB2_DB2 60000/tcp
DB2_DB2_1 60001/tcp
DB2_DB2_2 60002/tcp
DB2_DB2_END 60003/tcp
db2c_DB2 50000/tcp
3、使用 netstat -an 命令查找tcp/ip 服务的端口
4、修改端口号
直接修改services文件中当前服务名对应的端口号
如:db2c_DB2 50000/tcp
然后重启数据库即OK db2stop db2start
www.
5、另外附上一个关于linux系统下的查找方法(摘抄帖子):
In JDBC configurations for WPA, you have to specify the port thatDB2 is listening on. I usually look for /etc/services or try one of50000/50001 and it usually works. In SUSELinux, both thesolutions did not work and there was ano