Determining the correct service listening port and service name

You must verify that the correct service name and listening port are specified.

Before you begin

  1. You must have IBM® DB2® database installed and configured on your system.
  2. You must be logged in as the DB2 Instance owner.

About this task

A service listening port is associated with each DB2 instance. The port is used for establishing a DB2 connection from a DB2 application to the database owned by the instance.

The DB2 default instance differs depending on your operating system.

  • On Windows operating systems: DB2
  • On UNIX and Linux® operating systems: db2inst1

The default service port number for the DB2 default instance that is created during the DB2 server installation is 50000. If you migrated DB2 8.2 to DB2 9.5, DB2 9.7, DB2 10.1, or DB2 11, the DB2 migration utility resets the DB2 instance. The DB2 migration utility might also reset the service port of the instance to 60000.

Procedure

  1. To determine whether the correct service name or service listening port is defined.
    Enter the command
    db2 connect to itim_dbname user itim_dbadmin_id using itim_dbadmin_password
    db2 get dbm cfg
    db2 disconnect current

    Look for the SVCENAME attribute to locate the service name.

  2. Locate the statement that specifies the current port number in the services file on the computer where the DB2 server is.

    The services file has the following path:

    • Windows operating systems: %SYSTEMROOT%\system32\drivers\etc\services
    • UNIX or Linux operating systems: /etc/services