How to see which port DB2 is listening on

Source: Internet
Author: User
Tags db2 db2 client

When using a DB2 client to connect to the DB2 server, you must know which port the DB2 server is on, but in many cases the customer does not know the port because DB2 is installed by an IBM or agent.

DB2 's listening port is the same as Oracle, and it is an instance-level port listener, and an instance requires a port for listening. Under the Linux operating system, the default instance name is Db2inst1. The listening port exists as an instance of the DB2 database, which is:

SVCENAME, use the DB2 get dbm CFG command to view the value of this parameter as:

[Db2inst1@testserver ~]$ DB2 get dbm Cfg|grep SVC
TCP/IP Service name                          (SVCENAME) = Db2_db2inst1

You can always view the port number corresponding to the Db2_db2inst1 service from the/etc/serivces file:

[Db2inst1@testserver ~]$ Tail-10/etc/services|grep Db2_db2inst1
Db2_db2inst1    60000/tcp

It should be seen from the above results that the DB2 Db2_db2inst1 instance listens for 60000 ports.

The operating system command is the DB2 process that listens on TCP ports of 60000.

[Db2inst1@testserver ~]$ Netstat-lnp|grep 60000                                   (not all processes could is identified, non-owned process info
Won't is shown, you would have to is root to the it all.)
TCP        0      0 0.0.0.0:60000               0.0.0.0:*                   LISTEN      14142/DB2SYSC 0
The DB2SYSC process with the DB2 process number 14142 is monitoring the 60000 process. You can connect to the DB2_DB2INST1 process by using the client connection port 60000.

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.