This appendix presents the procedure that you can use to determine the port value for your DB2 UDB database connection
To determine the DB2 UDB port value:
On your DB2 UDB machine, become the user of the installed DB2 UDB database. For example:
su - db2inst1
Determine the TCP/IP service name value of the DB2 UDB database by entering this command:
db2 get database manager configuration | grep TCP
The returned results of the above command are:
TCP/IP Service name (SVCENAME) = SVCENAME_value
where value is the name of the TCP/IP service. For example, a valid value might be db2c_db2inst1
.
Use the returned value for SVCENAME_value
in the statement below:
cat /etc/services | grep SVCENAME_value
For example:
cat /etc/services | grep db2c_db2inst1
The returned results of the above command are:
db2c_db2inst1 50000/tcp
where in this example the DB2 UDB port value is: 50000.