DB2 Server for VM: System Administration


Preparing the Application Server to use TCP/IP

The following must be done to allow the application server to use TCP/IP.

  1. TCP/IP for VM must be installed and configured.
  2. The TCP/IP client data disk must be accessed. This disk is often defined as TCPMAINT 592. This disk contains the TCPIP DATA file and the ETC SERVICES file which are necessary for successful TCP/IP support initialization.
  3. The ARICTCP MODULE must be created and stored on the production disk. The instructions for creating the ARICTCP MODULE are found in the DB2 Server for VM program directory.
  4. A C runtime library must be available. The SCEERUN LOADLIB provided with VM/ESA Version 2 Release 2.0 or later is sufficient. The C runtime library provided with LE for VM is also acceptable.
  5. Optionally, the ETC SERVICES file must be updated with the RESID of the application server and the port number it should use.

TCP/IP support is invoked at system initialization time. If TCP/IP for VM is available, the server will make use of it. The application server must be able to determine what port number to listen on for connections. This can be accomplished in a number of ways.

  1. The ETC SERVICES file on the TCP/IP maintenance disk has a port number associated with the RESID of the application server.
  2. The new initialization parameter, TCPPORT, can be used to specify the port number to listen on.
  3. The well know port number for ddm-rdb, 446, is used. This name must be defined in the ETC SERVICES file.

Each method has advantages and disadvantages.

The first method of using the ETC SERVICES file is the preferred method. This file is maintained by the TCP/IP administrator and resides on the TCP/IP client data disk. Since many application servers can run on the same VM system, it must be ensured that they do not use the same TCP/IP port since only one server can use a port. Identifying the port numbers in this file makes it easier to ensure that different servers are using different ports. The name used must be the application server's RESID. This can be determined by issuing the SHOW INITPARM command on the application server.

The entry in the ETC SERVICES file consists of a service name, port number, protocol and an optional comment. Valid protocols in the ETC SERVICES. file are tcp and udp. The only protocol DB2 Server for VM will recognize is tcp. It cannot understand udp. It must be noted that the searches done on the ETC SERVICES file are case sensitive. When the RESID is used as the search criteria it will be entirely in upper case and must be defined entirely in upper case. Similarly, the protocol is also part of the search criteria and is specified entirely in lower case and must be defined in lower case for the search to be successful.

The following is an example of entries for 2 DB2 Server for VM application servers.

SQLPROD         6100/tcp                 # Production database machine
SQLTEST         6200/tcp                 # Test database machine

The second method of port identification is the new initialization parameter, TCPPORT. The advantage of this is that the ETC SERVICES file does not need to be updated. This is helpful when initially testing TCP/IP support or when TCP/IP support needs to be enabled, but the ETC SERVICES file cannot be updated. The disadvantage is that it is possible that another application may be using the same port.

The third method is the least desirable. If there is no entry for the RESID in the ETC SERVICES file or TCPPORT was not specified, there is a well known port assignment for relational databases. It is called ddm-rdb and the port number is 446. This name must be defined in the ETC SERVICES file. The file that is shipped with TCP/IP for VM has this definition. This has the advantage of doing no extra configuration to TCP/IP for VM and to the application server. The disadvantage is that only one application server on that VM system can use that definition.

We will take advantage of all three of the methods. The actions can be broken down into three scenarios.

  1. If the TCPPORT parameter is not specified when the application server is started, the application server will search the ETC SERVICES file for a service name whose name matches the application server's RESID. If a port number is found it will use it. If a port number is not found, it will use ddm-rdb to do a look up in the ETC SERVICES file for the well known port number. If a port number is found it will use it. If a port number is not found, then TCP/IP support on the application server will not be used. If an error is returned from any of the TCP/IP functions used to do the look up, it will be assumed that TCP/IP is not available and TCP/IP support on the application server will not be available.
  2. If the TCPPORT parameter is specified when the application server is started, the application server will use this parameter while performing TCP/IP support initialization. No look up in the ETC SERVICES file is done. If the port cannot be used, no attempt is made to find another port. If an error is returned from a TCP/IP function, it will be assumed that TCP/IP is not available and TCP/IP support on the application server will not be available.
  3. If the TCPPORT parameter is specified with a value of 0, TCP/IP support is not initialized at all. If you do not have TCP/IP support on your system or do not want to enable TCP/IP support for an application server, the TCPPORT=0 parameter should be used.


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