Configuring Db2 server communications (TCP/IP)

This task describes how to configure TCP/IP communications on your Db2 server by using the Db2 Command Line Processor (CLP). Communication protocols on the server must be configured in order for your server to accept inbound requests from remote Db2 clients.

Before you begin

Before you configure TCP/IP communications for an instance on your Db2 server, verify the following prerequisites:
  • Ensure that the TCP/IP protocol is functional on the Db2 server. TCP/IP must also be functional on the Db2 client to establish a connection.
  • Identify either a Connection Service name and a Connection Port, or just a Connection Port.
    Connection Service Name and Connection Port
    The service name is used to update the Service name (svcename) parameter in the database manager configuration file at the server. When a Connection Service name is specified, the services file must be updated with the same Service name, a port number, and the protocol. The Service name is arbitrary but must be unique within the services file. A sample value for the service name might be server1. If you are using Db2 Enterprise Server Edition in a partitioned format, ensure that the port number does not conflict with the port numbers that are used by the Fast Communications Manager (FCM).

    The Connection port must be unique within the services file. A sample value for the port number and protocol might be 3700/tcp.

    Connection Port
    The Service name (svcename) parameter in the database manager configuration file at the server can be updated with a port number. If so, it is not necessary to update the services file. If you are using Db2 Enterprise Server Edition in a partitioned format, ensure that the port number does not conflict with the port numbers that are used by the Fast Communications Manager (FCM) or any other applications on the system. A sample value for the port number might be 3700.

About this task

Most protocols are automatically detected and configured when you set up Db2 database systems by using the Db2 Setup wizard. If any of the following instances is true, the current task needs to be performed:
  • You deselected the TCP/IP communication protocol when you set up the Db2 database system by using the Db2 Setup wizard.
  • You added the TCP/IP communication protocol to your network after you set up the Db2 database system by using the Db2 Setup wizard.
  • The TCP/IP communication protocol was not detected by the Db2 Setup wizard.
  • You installed a Db2 database product by using the db2_install command or the payload file method.

Procedure

To configure TCP/IP communications for a Db2 instance, you need to do the following steps:

  1. Update the services file on the server.
  2. Update the database manager configuration file on the server.
  3. Set communication protocols for a Db2 instance.