我們今天主要向大家講述的是在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
如下:
- 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、linux、windows系統下如何知道DB2端口號的介紹,望你能有所收獲。
上述的相關內容就是對aix、linux、windows系統下如何知道DB2端口號的描述,希望會給你帶來一些幫助在此方面。