A Determining the DB2 UDB Port Value

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:

  1. On your DB2 UDB machine, become the user of the installed DB2 UDB database. For example:

    su - db2inst1

  2. 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.

  3. 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.