IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition for UNIX


Step 8. Create the Node Configuration File



note

If you are setting up High Availability (HA) for DB2, the hadb2eee.setup program completed this step for you. See Appendix C. "Implementing Failover Support in the Solaris Operating Environment" for more information.

You must create the node configuration file, INSTHOME/sqllib/db2nodes.cfg, before you can start the partitioned database system. This file contains configuration information for all database partition servers in an instance, and is shared by all database partition servers for that instance.

The file contains one line for each database partition server that belongs to an instance. Each line has the following format:

  nodenum hostname [logical_port [netname]]

Tokens are delimited by blanks. The variables are:

nodenum
The unique node number to identify the database partition server. The number can be from 0 to 999. Node numbers must be in ascending sequence. You can have gaps in this sequence.

When a node number is assigned, it cannot be changed. Otherwise, the information in the partitioning map (which details how data is partitioned) would be compromised.

If you drop a database partition server, its node number can be used again on a new database partition server that you add.

The node number is used to generate a node name in the database directory during the create database command. It has the format:

  NODEnnnn

where nnnn is the node number, which is left-padded with zeros.

hostname
The TCP/IP hostname of the IP address which is used by the FCM for internal communications, unless netname is specified. If netname is specified, the FCM uses netname, and hostname is only used for the db2start, db2stop, and db2_all commands.

logical_port
This parameter is optional, and specifies the logical port number for the database partition server. This number is used with the database manager instance name to identify a TCP/IP service name entry in the /etc/services file.

The combination of the IP address and port number is used as a well-known address, and must be unique among all applications to support communication connections between database partition servers.

For each hostname, one logical_port must be either 0 or blank (this defaults to 0). The database partition server associated with the logical-port 0 is the default database partition server on the machine to which clients connect. This default database partition server is known as the coordinator node. You can override this with the DB2NODE environment variable, or with the set client command.

If you have multiple logical nodes, (that is, more than one nodenum for a machine), you must assign logical_port numbers to the logical nodes.

netname
This parameter is optional, and is used to support a machine that has more than one active TCP/IP interface, each with its own hostname.

This parameter only applies to those machines that have a primary hostname that is either an Ethernet or a token-ring name, and you want to have DB2 Extended Enterprise Edition use an alternative name (for example, a switch name). If you do not specify a value for this parameter, its value is that of the hostname parameter.

Notes:

  1. If you specify a netname, you must specify a value for logical_port.

  2. The netname is commonly referred to as a switch name.

  3. If you want to use the autoloader command, the netname must be specified.

The following is an example of a possible node configuration file on which SYSEN1 has multiple TCP/IP interfaces, two logical nodes, and uses SYSSW1 as the DB2 Extended Enterprise Edition interface. It also shows the node numbers starting at 1, and a gap in the nodenum sequence:

  nodenum   hostname   logical-port   netname
 
  1         SYSEN1     0              SYSSW1
  2         SYSEN1     1              SYSSW1
  4         SYSEN2     0
  5         SYSEN3

The logical port for node 5 is assumed to be 0.

You can update the db2nodes.cfg file using an editor of your choice. You must be careful, however, to protect the integrity of the information in the file, as data partitioning requires that the node number not be changed. The node configuration file is locked when you issue the db2start command and unlocked after the db2stop command stops the database manager. When the file is locked, the db2start command updates the file, if necessary (for example if you issue the db2start nodenum restart or db2start addnode commands).

note

If the db2stop command is not successful and does not unlock the node configuration file, issue the db2stop force command to unlock it.


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

[ DB2 List of Books | Search the DB2 Books ]