Current location - Quotes Website - Collection of slogans - How to check the port number used by DB2 database?
How to check the port number used by DB2 database?
The port number occupied by DB2 data viewing can be divided into windows and linux system viewing modes, as shown below:

First, the linux system checks the port number occupied by DB2:

1.db2start starts the database manager, and the communication mode is configured as TCP/IP.

2. First switch to db2inst 1 user su-db2inst 1.

3. Find the TCP/IP service name DB2 get DBM CFG | grep-I service.

4. Find the corresponding port number grepdb2c _ db2inst1/etc/services file through the output of the previous command.

Output db2c_db2inst 1 50000/tcp.

# Where 50000 is the port number occupied by db2 database.

2.windows system can check the port number occupied by DB2, as shown below:

1. Use the command db2 get dbm cfg.

Find "SVCENAME" and find the TCP/IP service name.

www.2cto.com

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/ service

As follows:

DB2_DB2 60000/tcp

DB2_DB2_ 1 6000 1/tcp

DB2_DB2_2 60002/tcp

DB2_DB2_END 60003/tcp

db2c_DB2 50000/tcp