IBM Books

Installation and Configuration Supplement


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 server workstations. See Software Requirements for the communication protocol requirements for your platform. See Possible Client-to-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 Parameter.

Figure hint not displayed.

If you are setting up communications for the Administration Server, it was configured for TCP/IP (using the DB2 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:

step  1.

Identify and record parameter values.

step  2.

At the server:

  1. Update the services file.

  2. Update the database manager configuration file.



Figure hint not displayed.

Due to the characteristics of the TCP/IP protocol, TCP/IP 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 how to adjust 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)

Values required in the services file.

The Connection Service name is arbitrary, but must be unique within the services file. If you are using DB2 Enterprise - Extended Edition, ensure that these numbers do not conflict with the port numbers used by the Fast Communication Manager (FCM).

The Connection Port must be unique within the services file.

 

server1

 

3700/tcp

 

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.

server1  

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 the ports that server applications can listen on for client requests. You need to update the services file and specify the ports that you want the server to listen on for incoming client requests. The location of the services file depends on the operating system:

OS/2
path is specified by the ETC environment variable

UNIX
/etc

Windows NT
\winnt\system32\drivers\etc

Windows 9x
\windows


Figure hint not displayed.

If you are using Network Information Services (NIS) on your network (for UNIX servers only) you must update the services file located on your master server.

Using a text editor, add the Connection entry to the services file for TCP/IP support. For example:

   server1  3700/tcp # DB2 connection service port

where:

server1
represents the connection service name

3700
represents the connection port number for the Connection Ports

tcp
represents 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:

step  1.

Log on to the system as a user with System Administrative (SYSADM) authority. For more information, see Working with the System Administrative Group.

step  2.

If you are using a UNIX server, 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 Bash, 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 entering the db2 command.

step  3.

Update the database manager configuration file with the Service name (svcename) parameter by entering the following commands:

   update database manager configuration using svcename svcename
   db2stop
   db2start 

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

   update database manager configuration using svcename server1
   db2stop
   db2start



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. View the database manager configuration file by entering the following command:

   get database manager configuration


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

[ DB2 List of Books | Search the DB2 Books ]