Updating the node configuration file (Linux® and UNIX)

In a Db2® partitioned database environment, this task provides steps for updating the db2nodes.cfg file to include entries for participating computers.

Before you begin

  • The Db2 database product must be installed on all participating computers.
  • A Db2 instance must exist on the primary computer.
  • You must be a user with SYSADM authority.
  • Review the configuration examples and file format information provided in the Format of the Db2 node configuration file topic if either of the following conditions apply:
    • You plan to use a high speed switch for communication between database partition servers
    • Your partitioned configuration will have multiple logical partitions

About this task

The node configuration file (db2nodes.cfg), located in the instance owner's home directory, contains configuration information that tells the Db2 database system which servers participate in an instance of the partitioned database environment. A db2nodes.cfg file exists for each instance in a partitioned database environment.

The db2nodes.cfg file must contain one entry for each server participating in the instance. When you create an instance, the db2nodes.cfg file is automatically created and an entry for the instance-owning server is added.

For example, when you created the Db2 instance using the Db2 Setup wizard, on the instance-owning server ServerA, the db2nodes.cfg file is updated as follows:
     0     ServerA     0


Restrictions

The hostnames used in the steps of the Procedure section must be fully qualified hostnames.

Procedure

To update the db2nodes.cfg file:

  1. Log on as the instance owner.
    For example, db2inst1 is the instance owner in these steps.
  2. Ensure that the Db2 instance is stopped by entering:
    INSTHOME/sqllib/adm/db2stop
    where INSTHOME is the home directory of the instance owner (the db2nodes.cfg file is locked when the instance is running and can only be edited when the instance is stopped).
    For example, if your instance home directory is /db2home/db2inst1, enter the following command:
         /db2home/db2inst1/sqllib/adm/db2stop
  3. Add an entry to the .rhosts file for each Db2 instance.
    Update the file by adding the following:
         hostname db2instance
    where hostname is the TCP/IP host name of the database server and db2instance is the name of the instance you use to access the database server.
  4. Add an entry to the db2nodes.cfg file of each participating server.
    When you first view the db2nodes.cfg file, it should contain an entry similar to the following:
         0     ServerA     0

    This entry includes the database partition server number (node number), the TCP/IP host name of the server where the database partition server resides, and a logical port number for the database partition server.

    For example, if you are installing a partitioned configuration with four computers and a database partition server on each computer, the updated db2nodes.cfg should appear similar to the following:
         0     ServerA     0
         1     ServerB     0
         2     ServerC     0
         3     ServerD     0
  5. When you have finished updating the db2nodes.cfg file, enter the INSTHOME/sqllib/adm/db2start command, where INSTHOME is the home directory of the instance owner.
    For example, if your instance home directory is /db2home/db2inst1, enter the following command:
         /db2home/db2inst1/sqllib/adm/db2start
  6. Log out.