189 8069 5689

windows系统下知道DB2端口号的“妙招”

我们今天主要向大家讲述的是在aix、linux、windows系统下知道DB2端口号的实际操作方案,相信如果你掌握了在aix、linux、windows系统下知道DB2端口号的实际操作方案这项技术,会在以后的学习或是工作中带来很大的帮助。

目前创新互联已为上千的企业提供了网站建设、域名、虚拟空间、网站托管、企业网站设计、岳普湖网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

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

如下:

 
 
 
 
  1. DB2_DB2 60000/tcp  
  2. DB2_DB2_1 60001/tcp  
  3. DB2_DB2_2 60002/tcp  
  4. DB2_DB2_END 60003/tcp DB2c_DB2 50000/tcp 

3、使用 netstat -an 命令查找tcp/ip 服务的端口

4、另外附上一个关于linux系统下的查找方法(摘抄帖子):

 
 
 
 
  1. In JDBC configurations for WPA, you have to specify the port that DB2 is listening on. I usually look for  
  2. /etc/services or try one of 50000/50001 and it usually works. In SUSE Linux, both the solutions did   
  3. not work and there was another process (Multithreaded routing toolkit aka mrt) was listening on port 50000.  
  4. So how do we find out the DB2 port in a reliable way? Read on...  
  5. Step 1: Set the DB2 environment.  
  6. $ . ~DB2inst1/sqllib/DB2profile  
  7. Step 2: Find the service name for DB2 instance. It basically involves running  
  8. "DB2 get dbm cfg" command and finding a line containing SVCENAME.   
  9. $ svc=`DB2 get dbm cfg | grep SVCENAME | cut -d= -f2 | awk '{print $1}'`  
  10. Step 3: Find the service name that you got from Step 2 in /etc/services or %SYSTEMROOT  
  11. %\system32\drivers\etc\services. That is the port DB2 is listening on.  
  12. $ grep $svc /etc/services  
  13. Hope you find this useful.  

以上的相关内容就是对aix、linux、windows系统下如何知道DB2端口号的介绍,望你能有所收获。

上述的相关内容就是对aix、linux、windows系统下如何知道DB2端口号的描述,希望会给你带来一些帮助在此方面。


网页题目:windows系统下知道DB2端口号的“妙招”
标题路径:http://cdxtjz.cn/article/djdopeh.html

其他资讯