db2安装完成后,tcp/ip连接端口默认为50000,可通过下面的方法确认:
1、使用命令 db2 get dbm cfg |find "SVCENAME" 查找到TCP/IP 服务名
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、另外附上一个关于linux系统下的查找方法(摘抄帖子):
In JDBC configurations for WPA, you have to specify the port that DB2 is listening on. I usually look for /etc/services or try one of 50000/50001 and it usually works. In SUSE Linux, both the solutions did not work and there was another process (Multithreaded routing toolkit aka mrt) was listening on port 50000.
So how do we find out the DB2 port in a reliable way? Read on...
Step 1: Set the DB2 environment.
$ . ~db2inst1/sqllib/db2profile
Step 2: Find the service name for DB2 instance. It basically involves running "db2 get dbm cfg" command and finding a line containing SVCENAME.
$ svc=`db2 get dbm cfg | grep SVCENAME | cut -d= -f2 | awk '{print $1}'`
Step 3: Find the service name that you got from Step 2 in /etc/services or %SYSTEMROOT%\system32\drivers\etc\services. That is the port DB2 is listening on. $ grep $svc /etc/services
Hope you find this useful.
分享到:
相关推荐
AIX和WINDOWS下DB2数据库互导
DB2从AIX+server上转移(迁移)到linux上.docx
Windows Solaris HP-UNI AIX Linux主流操作系统安全加固规范
aix 安装DB2 步骤 和db2 常见命令
db2数据库从AIX操作系统移植到windows XP
linux和AIX下DB2安装配置文档打包,很详细
DB2从windowsXP迁移至AIX完整过程
个人操作的参考, 包括AIX常用的命令,迁移步骤等,
aix系统安装db2 aix系统安装db2 aix系统安装db2 aix系统安装db2
Linuxt系统根据端口号停止相应的服务
本文详细描述了使用sfu采用NFS协议在windows与AIX之间共享文件,其他文档中都没有特别详细的描述,在大家做的过程中可能会出现问题,这篇操作手册将解决所有可能遇到的问题~不过里面还是有一些技术问题没有解决,...
Aix 下安装db2简单介绍,希望对大家有一点点的帮助,文档比较简单。
AIX6.1如何安装DB2AIX6.1如何安装DB2AIX6.1如何安装DB2AIX6.1如何安装DB2
包括: AIX LVM基础结构学习心得.doc DB2维护手册V1[1].0.doc AIX系统操作手册.doc DB2_com.doc DB2傻瓜问题.doc db2日常维护.doc AIX常见问题整理.doc
零基础学习在AIX小机上建立DB2数据库
AIX小机上建立DB2数据库.pdf
适用于windows/linux/aix通用的 端口转发小程序!!!!
db2v8在aix下的安装