IBM Books

Quick Beginnings EEE for UNIX**


Post Installation Steps

This section describes that remaining steps that you have to perform to get your partitioned database system up and running.

Step 1. Update the Node Configuration File

The node configuration file (db2nodes.cfg), located in the INSTHOME/sqllib/ directory (where INSTHOME is the home directory of the instance owner) contains configuration information for all the database partition servers that are participating in the instance. There is a db2nodes.cfg file for every multipartition instance. This file contains one entry for each database partition server for a particular DB2 instance. By default, when you create an instance, the db2nodes.cfg file is automatically created and an entry for the workstation where the instance was created is added to the file.

The format of the db2nodes.cfg file is as follows:

   nodenum    hostname    logical port   netname

where:

nodenum
A unique number, between 0 and 999, that identifies a database partition server in a partitioned database system.

When you want to scale your partitioned database system, you add an entry for each database partition server to the db2nodes.cfgfile. The nodenum that you select for additional database partition servers must be in ascending order, however, gaps can exists in this sequence. You may choose to put a gap between the nodenum values if you plan to add an MLN and wish to keep them logically grouped together in this file.

This entry is required.

hostname
The TCP/IP hostname of that database partition server (which you recorded earlier) for use by the FCM.

This entry is required.

Figure hint not displayed.

You can specify the name of a high speed interconnect for the hostname value. This allows the db2start, db2stop, and db2_all commands to use the high speed interconnect for communications.

logical port
Specifies the logical port number for the database partition server. This field is used to specify a particular database partition server on a workstation that is running MLNs. If there is no entry for this field, the default is 0. However, if you add an entry for the netname field, you must enter a number for the logical port field.

If you are not using MLNs and you specify an entry for the netname field, the entry must be set to 0.

If you are using MLNs, the logical port you specify must start at 0 and continue in ascending order with no gaps (for example, 0,1,2).

This field is only optional when you are not using MLNs or a high speed interconnect.

netname
Specifies the hostname or the IP address of the high speed interconnect for FCM communications.

If an entry is specified for this field, all communications between database partition servers (except for communications as a result of the db2start, db2stop, and db2_all commands) is handled through the high speed interconnect.

This parameter is only required if you are using a high speed interconnect for database partition communications.

For example, when you created the DB2 instance db2inst1, on the workstation called workstation1, the db2nodes.cfg file was updated as follows:

   0          workstation1   0

If you want your partitioned database system to contain two workstations, called workstation1 and workstation2, you would update the db2nodes.cfg file as follows:

   0          workstation1   0
   1          workstation2   0

If you want your partitioned database system to contain two workstations, called workstation1 and workstation2, and workstation1 was running 3 database partition servers, you would update the db2nodes.cfg file as follows:

   0          workstation1   0
   1          workstation1   1
   2          workstation1   2
   3          workstation2   0

If you want your partitioned database system to contain two workstations, called workstation1 and workstation2 (with workstation2 running 2 database partition servers), and use a high speed interconnect called switch1 and switch2, you would update the db2nodes.cfg file as follows:

   0          workstation1   0              switch1
   1          workstation2   0              switch2
   2          workstation2   1              switch2

To update the db2nodes.cfg file, perform the following steps:

Step  1.

Log on to the instance as a user with system administrative (SYSADM) authority (by default, the username that you created for the instance owner). For more information, see Working with the System Administrative Group.

Step  2.

Ensure the DB2 instance is stopped by entering the INSTHOME/sqllib/adm/db2stop command, where INSTHOME is the home directory of the instance owner.

Figure hint not displayed.

The db2nodes.cfg is locked when the instance is running and can only be edited when the instance is stopped.

Step  3.

Edit the db2nodes.cfg file and add an entry for each database partition server that will participate in your partitioned database system.

Step  4.

Log out.

For more information on the db2nodes.cfg file, refer to the Administration Guide.

Step 2. Enable the Fast Communications Manager

This section describes how to enable communications between the database partition servers that participate in your partitioned database system. Communications between database partition servers is handled by the Fast Communications Manager (FCM). To enable FCM, you must ensure that the port or port range that you reserve in the /etc/services file is available on every workstation in your partitioned database system.

When you created a DB2 instance using the DB2 Installer program, an entry similar to the following was placed in the /etc/services file:

   DB2_instance_name        60000/tcp

where instance_name is the name of the instance that you created.

This entry must be of the form:

   DB2_instance_name     port_number

where:



Figure hint not displayed.

The port 60000 is the default FCM port used by an instance for any instance that was created using the DB2 Installer program.

For example, if you created an instance called db2inst1, the entry placed in the /etc/services file would be:

   DB2_db2inst1        60000/tcp

If you are planning to run multiple logical nodes (MLNs), you must reserve a range of consecutive ports (one for each logical node). The consecutive port range that you reserve must be equal to the number of MLNs on the database partition server that is running the most MLNs in your partitioned database system. To reserve a port range for FCM to use, you will need to add another entry to the /etc/services file that specifies the end of the port range. This entry must be of the format:

   DB2_instance_name_END     port_number

For example, if you have a database partition server that is running 6 database partitions you will need to specify 6 consecutive ports as your port range. In our example, the entry in the /etc/services file would be:

   DB2_db2inst1        60000/tcp
   DB2_db2inst1_END    60005


Figure hint not displayed.

You can add a comment that describes these entries using the # comment identifier. For example:
   DB2_db2inst1     60000/tcp # This is an EEE instance
   DB2_db2inst1_END 60005/tcp # that is running 6 MLNs.

To enable your partitioned database system for FCM communications, perform the following steps on each machine that will participate in your partitioned database system:

Step  1.

Log on the workstation where you created a DB2 instance as a user with root authority.

Step  2.

Edit the /etc/services file and add the port or port range entries that you have reserved for FCM communications.

Step  3.

Log out.

Step  4.

Log on to each additional workstation in your partitioned database system and add the same entries to the /etc/services file that you added to the /etc/services file on the workstation where you created the DB2 instance.

Step  5.

Log out.

For more information on FCM communications, refer to the Administration Guide.

Step 3. Enable the Execution of Remote Commands

In a multipartition instance, each database partition server must have the authority to perform remote commands on all the other database partition servers in the partitioned database system. To do this, you can either create an INSTHOME/.rhosts file (where INSTHOME is the home directory of the instance owner) or an /etc/hosts.equiv file.

If you decide to create an /etc/hosts.equiv file, you will have to create this file on every workstation that participates in your partitioned database system.

If you want to use the INSTHOME/.rhosts file, it should contain entries similar to the following:

   workstation1.torolab.ibm.com db2inst1
   workstation2.torolab.ibm.com db2inst1
   switch01.torolab.ibm.com     db2inst1
   switch02.torolab.ibm.com     db2inst1

For more information about the INSTHOME/.rhosts or the /etc/hosts.equiv file, refer to your operating system's documentation.

Step 4. Create Links for DB2 Files (Optional)

You can use the db2ln command to create links for the DB2 files to the /usr/lib directory, and for the include files to the /usr/include directory, for a particular version and release level of DB2 Enterprise - Extended Edition (DB2 EEE). Links can be established for only one version of DB2 on a given workstation.

You may want to create these links if you are developing or running applications and want to avoid having to specify the full path to the product libraries and include files.

To create links for the DB2 files, perform the following steps:

Step  1.

Log on to the Control workstation as a user with root authority.

Step  2.

Enter the following command to create the links for the DB2 files:

   dsh -a /opt/IBMdb2/V6.1/cfg/db2ln

Step  3.

Log out.

If there are existing links to the /usr/lib and /usr/include directories from previous versions of DB2 EEE, they will automatically be removed by executing the db2ln command to create links for this version of DB2 EEE.

Step 5. Start the Administration Server

This section describes how to start and configure the Administration Server. Before you can use the Client Configuration Assistant (CCA) or the Control Center to administer your partitioned database system, you must ensure the Administration Server is started and the db2cclst daemon is running on every database partition server in your partitioned database system.

When you created the Administration Server using the DB2 Installer program, an entry similar to the following was placed in the /etc/services file on the workstation where you created the Administration Server:

   db2ccmsrv     523/tcp

To enable your partitioned database system so that it can be administered by the CCA or the Control Center, perform the following steps:

Step  1.

Log on the workstation as a user with root authority.

Step  2.

Open the /etc/services file and verify that the port was reserved for the Administration Server.

Step  3.

Log out.

Step  4.

Log on to the workstation with the username that you created for the Administration Server (for example, db2as).

Step  5.

Enter the following command to start the Administration Server

   DASINSTHOME/sqllib/bin/db2admin start

where DASINSTHOME is the home directory of the Administration Server.

Step  6.

Enter the following command to start the db2cclst daemon

   DASINSTHOME/sqllib/bin/db2cclst

where DASINSTHOME is the home directory of the Administration Server.

Step  7.

Ensure that the db2cclst daemon is running by entering the following command:

   ps -ef | grep db2cclst

Error information for the db2cclst daemon is returned to the syslog file. Errors are written to this file, instead of the db2diag.log file, because the daemon runs independent from the instance.

Step  8.

Log out.

For more information, refer to the Administration Guide.

Figure hint not displayed.

You can set up the db2cclist daemon to start when a workstation is restarted by adding the follow command to the /etc/innitab file.
   cl:234:once:DASINSTHOME/sqllib/bin/db2cclst"

where DASINSTHOME is the home directory of the Administration Server.

Step 6. Create the SAMPLE Database (Optional)

This section describes how to verify that DB2 Enterprise - Extended Edition (DB2 EEE) is installed and configured correctly by creating the SAMPLE database on your system, and accessing data from the database.

Figure hint not displayed.

To complete the steps in this section, we recommend that you create a separate file system (for example, /database) on each database partition server that participates in your partitioned database system.

For more information on how to create a file system, refer to your operating system's documentation.

To verify that you have installed and configured DB2 EEE, perform the following steps:

Step  1.

Log on to the system as a user with system administrative (SYSADM) authority (by default, the username that you created for the instance owner). For more information, see Working with the System Administrative Group.

Step  2.

Enter the following command to create the SAMPLE database:

   INSTHOME/sqllib/bin/db2sampl path

where:

  • INSTHOME is the home directory of the instance owner.

  • path is a local file system that exists on every workstation that participates in your partitioned database system.

For example, to create the SAMPLE database on the /database file system, enter the following command:

   INSTHOME/sqllib/bin/db2sampl /database

The SAMPLE database is automatically catalogued with the database alias SAMPLE when it is created.

Step  3.

Start the database manager by entering the db2start command.

Step  4.

Enter the following commands to connect to the SAMPLE database, retrieve a list of all the employees that work in department 20, and reset the database connection:

   db2 connect to sample
   db2 "select * from staff where dept = 20"
   db2 connect reset

For information about entering DB2 commands, see Entering Commands Using the Command Center or Entering Commands Using the Command Line Processor.

Figure hint not displayed.

After you have verified the installation, you can remove the SAMPLE database to free up disk space. Enter the db2 drop database sample command to drop the SAMPLE database.

Step 7. Install the License Key

DB2 software registration is handled automatically if you installed your DB2 product from a CD-ROM using the DB2 Installer program. If you installed DB2 using your UNIX operating system's native installation tools, you must use the db2licm command to register DB2. Refer to the Command Reference for more information.


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

[ DB2 List of Books | Search the DB2 Books ]