Tips for knowing the DB2 port number in windows"

Source: Internet
Author: User
Tags db2 installation db2 port

Today, we will mainly tell you the actual operation solution for knowing the DB2 port number in aix, linux, and windows systems, I believe that if you have mastered the technology of knowing the actual operation scheme of DB2 port number in aix, linux, and windows systems, it will bring a lot of help in your future study or work.

After the DB2 installation is complete, the TCP/IP connection port is 50000 by default. You can confirm through the following method:

1. Run the DB2 get dbm cfg | find "SVCENAME" command to find the TCP/IP service name.

2. Find the port number corresponding to the service name in the system configuration file.

Windows: View c: \ windows \ system32 \ drivers \ etc \ services aix: View/etc/services

As follows:

 
 
  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. Run the netstat-an command to find the port of the TCP/IP service.

4. I also attached an excerpt post about the search methods in 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.  

The above content is an introduction to how to know the DB2 port number in aix, linux, and windows systems.

The above content describes how to know the DB2 port number in aix, linux, and windows systems. I hope it will help you in this regard.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.