Many times DBAs gets confused about connection ports when there are two or more instances on same server. This tip address this issue. It has been tested on DB2 version 6, 7 and 8.
To get the connection port, issue this command at the DB2 command prompt:
GET DBM CFGNote the information displayed, such as:
TCP/IP Service name (SVCENAME) = db2cdb2inst10This is the service name to which the TCP/IP port is bound to. You can use this service name to connect from the client or you can also verify the port in the /etc/services file. Mostly port numbers start from 50000 from instance one.
For More Information
- Feedback: E-mail the editor with your thoughts about this tip.
- More tips: Hundreds of free DB2 tips and scripts.
- Tip contest: Have a DB2 tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize -- submit your tip today!
- Ask the Experts: Our SQL, database design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.
- Forums: Ask your technical DB2 questions--or help out your peers by answering them--in our active forums.
- Best Web Links: DB2 tips, tutorials, and scripts from around the Web.
This was first published in November 2002