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:
- DB2_DB2 60000/tcp
- DB2_DB2_1 60001/tcp
- DB2_DB2_2 60002/tcp
- 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 ):
- 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.
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.