IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition for UNIX

Configuring TCP/IP on the Server

To access a remote server through TCP/IP, you must first have installed and configured communication software for both the client and DB2 server workstations. See "Software Requirements" for the communication protocol requirements for your platform. See "Possible Client-to-DB2 Server Connectivity Scenarios" for the supported communication protocols for your particular client and server.

Before completing the steps in this section, be sure that you have completed the instructions in "Setting the DB2COMM Registry Value".


If you are setting up communications for the Administration Server, it was configured for TCP/IP (using the registered Port number 523) when it was created. There are no further steps required to enable the Administration Server to use TCP/IP.

The following steps are required to set up TCP/IP communications:

  1. Identify and record parameter values.

  2. At the server:

    1. Update the services file.

    2. Update the database manager configuration file.


Due to the characteristics of the TCP/IP protocol, the TCP/IP subsystem may not be immediately notified of the failure of a partner on another host. As a result, a client application accessing a remote DB2 server using TCP/IP, or the corresponding agent at the server, may sometimes appear to be hung. DB2 uses the TCP/IP SO_KEEPALIVE socket option to detect when there has been a failure and the TCP/IP connection has been broken.

If you are experiencing problems with your TCP/IP connection, refer to the Troubleshooting Guide for information on this parameter and other common TCP/IP problems.

Step 1. Identify and Record Parameter Values

As you proceed through the configuration steps, complete the Your Value column in the following table. You can fill in some of the values before you start configuring this protocol.

Table 18. TCP/IP Values Required at the Server
Parameter Explanation Sample Value Your Value

Connection Port

  • Connection Service name (svcename)

  • Port number/Protocol (port_number/tcp)

Interrupt Port

  • Interrupt Service name

  • Port number/Protocol (port_number + 1/tcp)

Values required in the services file.

The Connection and Interrupt Service names are arbitrary, but each must be unique within the services file; ensure that this number does not conflict with the port numbers used by the Fast Communication Manager (FCM).

The Connection and Interrupt Ports must be unique within the services file, with the Interrupt Port number equal to the Connection Service Port number plus one.










Service name (svcename)

The name used to update the Service name (svcename) parameter in the database manager configuration file at the server. This value must be the same as the Connection Service name specified in the services file.


Step 2. Configure the Server

The following steps describe how to configure this protocol on the server. Replace the sample values with your values and record them on your worksheet.

A. Update the Services File

The TCP/IP services file specifies ports that the DB2 server will listen on for client requests. The services file must contain two entries for each database manager instance.

You need to update the services file and specify the ports that you want the DB2 server to listen on for incoming client requests. The first entry describes the Connection Port, and the second entry describes the Interrupt Port.

The services file is located in the /etc directory.

Figure hint not displayed.

If you are using Network Information Services (NIS) on your network, you must update the services file located on your master server. Also, ensure that you do not specify a port number that is being used by the Fast Communication Manager (FCM), or any other process.

The location of the services file can depend on the products you have installed on your system. See your TCP/IP documentation for more information.

Using a local text editor, add the Interrupt Port and Connection Port entries to the services file for TCP/IP support. For example:

   server1     3700/tcp     # DB2 connection service port
   server1i    3701/tcp     # DB2 interrupt connection service port


is the Connection Service name

is the Interrupt Service name

3700 and 3701
are the port numbers for the Connection and Interrupt Ports

is the communication protocol that you are using

B. Update the Database Manager Configuration File

You must update the database manager configuration file with the Service name (svcename) parameter.

To update the database manager configuration file, perform the following steps:

  1. Log on to the system as a user with System Administrative (SYSADM) authority.


    If you have trouble logging on to the system, see "Logging on to the System".

  2. Set up the instance environment and invoke the DB2 command line processor as follows:

    1. Run the start up script as follows:
         . INSTHOME/sqllib/db2profile    (for Bourne or Korn shell)
         source INSTHOME/sqllib/db2cshrc (for C shell)
      where INSTHOME is the home directory of the instance.

    2. Start the DB2 command line processor by issuing the db2 command.

  3. Update the database manager configuration file with the Service name (svcename) parameter using the following commands in the command line processor:
       update database manager configuration using svcename svcename

    For example, if the Connection Service name in the services file was entered as server1, use:

       update database manager configuration using svcename server1

Figure hint not displayed.

The svcename used must match the Connection Service name specified in the services file.

After the database manager is stopped and started again, view the database manager configuration file to ensure that these changes have taken effect. Enter the following command in the command line processor:

   get database manager configuration


Now that you have configured the server, you are ready to install a DB2 client. Go to Chapter 8. "Installing DB2 Clients" for more information.

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]