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 you complete the steps in this section, ensure that you have completed the instructions in Setting the DB2COMM Registry Parameter.

Figure 00002674 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 00002674 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.

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 21. 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, if a service name is specified. You don't have to specify a service name in the svcename field, if you have directly specified a port number.

server1  

2. Configure the Server

The following steps describe how to set up your workstation to accept inbound client requests using this protocol. 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. To update the services file, you can either:

The location of the services file depends on the operating system:

OS/2
path is specified by the ETC environment variable. To resolve this path, enter the set etc command.

UNIX
/etc

Windows NT and Windows 2000
\winnt\system32\drivers\etc

Windows 9x
\windows

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

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 00002674 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 ]