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. Create a DB2 Instance

This section describes how to create an instance using the DB2 Installer program. We recommend that you use DB2 Installer program to create an instance because it will configure the instance automatically for communications.

For information on how to create an instance using the db2icrt command, and configure it for communications, refer to the Administration Guide and the Installation and Configuration Supplement online document.

To create an instance using the DB2 Installer program, perform the following steps:

Step  1.

Log on as a user with root authority to any RS/6000 SP workstation where you installed DB2 Enterprise - Extended Edition (DB2 EEE).

Step  2.

Enter the /usr/lpp/db2_06_01/install/db2setup command to start the DB2 Installer program. The DB2 Installer windows opens.

Step  3.

Select the Create option and press the Enter key.

Press the Tab key to change a highlighted option and the Enter key to select or deselect the option you want. For more information on using the DB2 Installer program, or for help with any task you are performing with the DB2 Installer, select the Help option and press the Enter key.

Step  4.

Select the Create a DB2 Instance option and press the Enter key.

Step  5.

Fill in all of the fields for the username that you created for the instance owner in Before You Begin.

Step  6.

Select the OK option and press the Enter key.

Step  7.

Fill in all of the fields for the username that you created to execute fenced UDFs and stored procedures in Before You Begin.

Step  8.

Select the OK option and press the Enter key. You are returned to the Create DB2 Services window.

Step  9.

Select the OK option and press the Enter key. You will receive a warning message that you have not yet created the Administration Server, you can ignore this message. The Summary Report window opens.

Step 10.

Select the Continue option and press the Enter key. The DB2 Installer program will prompt you to complete this task. When you have completed this task, you are returned to the DB2 Installer window.

Step 11.

Select the Close option and press the Enter key.

Step 2. Create the Administration Server

This section describes how to create the Administration Server using the DB2 Installer program. If you are planning to use the Control Center to administer your partitioned database system, you require a running Administration Server.

We recommend that you use the DB2 Installer program to create the Administration Server because it will configure the Administration Server automatically for communications. For information on how to create an instance using the dasicrt command, and configure it for communications, refer to the Administration Guide and the Installation and Configuration Supplement online document.

To create the Administration Server using the DB2 Installer program, perform the following steps:

Step  1.

Log on as a user with root authority to any RS/6000 SP workstation where you installed DB2 Enterprise - Extended Edition (DB2 EEE).

Step  2.

Enter the /usr/lpp/db2_06_01/install/db2setup command to start the DB2 Installer program. The DB2 Installer windows opens.

Step  3.

Select the Create option and press the Enter key.

Step  4.

Select the Create the Administration Server option and press the Enter key.

Step  5.

Fill in the fields for the username that you created for the Administration Server in Before You Begin.

Step  6.

Select the OK option and press the Enter key. You are returned to the Create DB2 Services window.

Step  7.

Select the OK option and press the Enter key. The Summary Report window opens.

Step  8.

Select the Continue option and press the Enter key. The DB2 Installer program will prompt you to complete this task. When you have completed this task, you are returned to the DB2 Installer window.

Step  9.

Select the Close option and press the Enter key.

Step 3. 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 4. Enable the Fast Communications Manager



Figure hint not displayed.

If you are using Network Information Services (NIS), NIS+, or any other tools to manage system configuration files, you must perform this step on the master server. After you have completed this step, you should ensure that the changes have taken effect on all the RS/6000 SP workstations in your partitioned database system.

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


Figure hint not displayed.

If the /etc/services file is part of file collections, this entry will be overwritten by the supper program.

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.

Figure hint not displayed.

If the /etc/services file is part of file collections, you must add these entries to the /etc/services file on the Control workstation and update each workstation using the following command:
   dsh -a /var/sysman/supper update user.admin

Step 5. Modify the Environment to run DB2 Enterprise - Extended Edition

This section describes the different environment settings that you need to update on each database partition server that will participate in your partitioned database system before you begin using DB2 EEE. To tune your system's environment to run DB2 EEE, perform the following steps:

__  Step  1.

Log on to a database partition server as a user with root authority.

__  Step  2.

Set the AIX maxuproc (maximum number of processes per user) device attribute to 1000 on all the workstations that are participating in your partitioned database system by entering the following command:

  dsh -a chdev -l sys0 -a maxuproc='1000'

__  Step  3.

Set the TCP/IP network parameters on all the workstations that are participating in your partitioned database system to the following values:

   thewall       = 16384
   sb_max        = 1310720
   rfc1323       = 1
   tcp_sendspace = 655360
   tcp_recvspace = 655360
   udp_sendspace = 65536
   udp_recvspace = 655360  


Figure hint not displayed.

To list the current settings of all network-related parameters, enter the dsh -a no -a command.

To set a parameter, enter the follow command:

   dsh -a no -a parameter_name=value

where:

  • parameter_name is the parameter you want to set.

  • value is the value that you want to set for this parameter.

For example, to set the tcp_sendspace parameter to 655360 on every workstation, enter the following command:

   dsh -a no -a tcp_sendspace=655360


Figure hint not displayed.

The above values are the minimum values for these parameters. If you are already setting any of these network-related parameters to a higher value, do not set the parameter to the lower listed value.

For a list of all the network parameters that are set on a workstation, enter the no -a command.

In addition, if you are using a high speed interconnect, you must set the spoolsize and rpoolsize for css0 to the following values:

   spoolsize     8388608
   rpoolsize     8388608


Figure hint not displayed.

To list the current settings of these parameters, enter the dsh -a lsattr -l css0 -E command.

To set these parameters, enter the following commands:

   dsh -a /usr/lpp/ssp/css/chgcss -l css0 -a spoolsize=8388608
   dsh -a /usr/lpp/ssp/css/chgcss -l css0 -a rpoolsize=8388608

If you are not using the /tftpboot/tuning.cst file to tune your system, you can use the /usr/lpp/db2_06_01/misc/rc.local.sample sample script file to update the network-related parameters. To update the network-related parameters using the sample script file, perform the following steps:

  1. Copy this script file to the /etc directory and make it executable by root by entering the following commands:
       cp /usr/lpp/db2_v6_01/misc/rc.local.sample /etc/rc.local
       chown root:sys /etc/rc.local
       chmod 744 /etc/rc.local
    

  2. Review the /etc/rc.local file and update it if necessary.

  3. Add an entry to the /etc/inittab file so that the /etc/rc.local script is executed whenever the machine is rebooted. You can use the mkitab command to add an entry to the /etc/inittab file. To add this entry, enter the following command:
       mkitab "rclocal:2:wait:/etc/rc.local > /dev/console 2>&1"
    

  4. Ensure that /etc/rc.nfs entry is included in the /etc/inittab file by entering the following command:
       lsitab rcnfs
    

  5. Update the network parameters without rebooting your system by entering the following command:
       /etc/rc.local
    

__  Step  4.

Ensure that you have enough paging space for DB2 EEE to run. If you do not have sufficient paging space to run DB2 EEE, the operating system will kill the process that is using the most virtual memory (this is likely to be one of the DB2 EEE processes). To check for available paging space, enter the following command:

   lsps -a

This command will return output similar to the following:

   Page Space  Physical Volume   Volume Group    Size   %Used  Active  Auto  Type
   paging00    hdisk1            rootvg          60MB      19     yes   yes    lv
   hd6         hdisk0            rootvg          60MB      21     yes   yes    lv
   hd6         hdisk2            rootvg          64MB      21     yes   yes    lv

We recommend that the paging space available be equal to twice the amount of physical memory installed on your workstation.

__  Step  5.

If you are creating a small to intermediate size partitioned database system, the number of network file system daemons (NFSDs) on the machine that has the instance owner's home directory should be close to:

# of biod on a machine * # of machines in the instance

We recommended that you run 10 biod processes on every machine. According to the above formula, on a four machine system with 10 biod processes, you would use 40 NFSDs.

If you are installing a larger system, you can have up to 120 NFSDs on the machine.

For additional information about NFS, refer to your NFS documentation.

Step 6. 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 7. 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 /usr/lpp/db2_06_01/cfg/db2ln

This command will automatically be distributed to each RS/6000 SP workstation that you listed in the eeelist.txt file.

Figure hint not displayed.

If you installed DB2 EEE on every RS/6000 SP workstation in your environment, you can specify the -a flag as follows:
   dsh -a /usr/lpp/db2_06_01/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 8. 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


Figure hint not displayed.

If the /etc/services file is part of file collections, this entry will be overwritten by the supper program.

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 where you created the Administration Server as a user with root authority.

Step  2.

Edit the /etc/services file add the port that was reserved for the Administration Server, if it does not exist.

Step  3.

Log out.

Step  4.

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

Figure hint not displayed.

If the /etc/services file is part of file collections, you must add this entry to the /etc/services file on the Control workstation and update each workstation using the following command:
   dsh -a /var/sysman/supper update user.admin

Step  5.

Log out.

Step  6.

Log on to any database partition server with the username that you created for the Administration Server (for example, db2as).

Step  7.

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  8.

Log out.

Step  9.

Log on to each database partition server that participates in your partitioned database system with the username that you created for the Administration Server (for example, db2as).

Step 10.

Enter the following command to start the db2cclst daemon

   DASINSTHOME/sqllib/bin/db2cclst

where DASINSTHOME is the home directory of the Administration Server.

Figure hint not displayed.

Instead of logging on to each database partition server, you can run the db2cclst command on all database partition servers by entering the following commands on any database partition server:
   export RAHOSTFILE=INSTHOME/sqllib/db2nodes.cfg
   db2_all "DASINSTHOME/sqllib/bin/db2cclst"  

where:

  • INSTHOME is the home directory of the instance owner.

  • DASINSTHOME is the home directory of the Administration Server.

Step 11.

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 independently from the instance.

Figure hint not displayed.

Instead of logging on to each database partition server, you can run the ps -ef | grep db2cclst command on all database partition servers by entering the following command on any database partition server:
   db2_all ps -ef | grep db2cclst 

Step 12.

Log out.



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.
   mkitab "db2cclst:2:once:DASINSTHOME/sqllib/bin/db2cclst"

where DASINSTHOME is the home directory of the Administration Server.

For more information, refer to the Administration Guide.

Step 9. 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 10. Install the License Key

This section describes how to install the license key for the DB2 product that you installed.

Figure hint not displayed.

Your Proof of Entitlement and License Information booklets identify the products for which you are licensed.

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

  2. The DB2 product license key can be found in the nodelock file, located in the /var/ifor directory.

  3. Update your DB2 product license by entering the following command:
       /usr/lpp/db2_06_01/cfg/db2licm license_filename
    

    where license_filename is the full pathname and filename for the license file that corresponds to the product you have purchased.

    The name of the license file for this product is db2udbeee.lic.

    For example, if the CD-ROM is mounted in the /cdrom directory and the name of the license file is db2udbeee.lic, you would enter the following command:

       /usr/lpp/db2_06_01/cfg/db2licm /cdrom/db2/license/db2udbeee.lic
    


Figure hint not displayed.

You can also use the Control Center to manage and monitor your DB2 licensing agreement and to monitor database usage. To manage licensing using the Control Center, perform the following steps:

Step  1.

Start the Control Center. For more information, see Starting the Control Center.

Step  2.

Click on the License Center icon from the Control Center toolbar. The License Center opens.

Step  3.

Complete the steps to upgrade your DB2 license. For more information, refer to the License Center's online help by pressing the F1 key.


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

[ DB2 List of Books | Search the DB2 Books ]