IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition for UNIX

Step 1. Prepare for Installation

To prepare your system for installation, perform the following steps:

  1. Prepare a list of the machine names on which your database is to reside. You can use the uname -n command to find out the name of a machine. (In the discussion that follows, the term machine also means an RS/6000 SP node.)

  2. Generate a list of each machine's IP address. You can use the host hostname command to resolve the IP address of a machine; for example, host machine1.

  3. As a user with root authority, create or assign groups and user IDs.


    If you want to use an existing user or group ID, you do not need to create new ones at this time. Instead, you can proceed to the next step.

    Create a group that will be the primary group for the user ID that will be the instance owner. When the instance is created, the instance owner and any other user who is a member of this group will have system administrative (SYSADM) authority. The group must be created on every machine that is to be used as a database partition server. The group ID (GID) of the group must be the same on each machine.

    Next, create a user ID that will be the instance owner. This user ID will be the name of the instance. The user ID must be created on every machine that is to be used in the partitioned database system. The user ID of the user must be the same on every machine. Make this user's primary group the group that you just created. The instance owner user ID, and any other user who is a member of this group, will be automatically given SYSADM control for the instance.

    In the following example, the instance user ID is db2inst1 and the UID 1004. The SYSADM group ID is dbadmin1 and the GID 999.


    Dedicate the instance owner user ID to that instance's use only. This allows for easier error recovery if a system error occurs.

    1. Use the mkgroup command to create groups, and the mkuser command to create users. For example, to create a user called db2inst1 with user ID 1004, which will use dbadmin1 with group ID 999 as its primary group and use /home/db2inst1 as its home directory, type:
         mkgroup id=999 dbadmin1
         mkuser id=1004 pgrp=dbadmin1 groups=dbadmin1 home=/home/db2inst1 db2inst1
         passwd db2inst1
      The group must be created on every machine that is to be used as a database partition server. The group ID (GID) of the group must be the same on each machine. You must define the same user and user ID number on each machine.

    2. Create a group and user ID for fenced user defined functions and stored procedures.

      For example:

         mkgroup id=991 db2fadm1
         mkuser id=1001 pgrp=db2fadm1 groups=db2fadm1 home=/home/db2fenc1 db2fenc1
         passwd db2fenc1

      Fenced user defined functions (UDFs) and stored procedures will execute under this user and group. The group must be the primary group of the user. The user for fenced UDFs and stored procedures is specified as a parameter of the instance creation script. The group for fenced UDFs and stored procedures is implicitly set to the primary group of this specified user (db2fenc1).

      The group must be created on every machine that is to be used as a database partition server. The group ID (GID) of the group must be the same on each machine. You must define the same user and user ID number on each machine.

  4. Export the home directory of the instance (INSTHOME) for the db2inst1 user ID from one machine and use NFS to mount it on every other machine that will be part of the partitioned database system. Ensure that every machine has write access to this directory.

    For better performance, if you are installing on an RS/6000 SP system, you should have the INSTHOME directory on one of the SP nodes (and not on the control workstation). Then NFS mount the INSTHOME directory on the other SP nodes over the high speed switch.

    The INSTHOME directory must not be mounted with the nosuid NFS mount option.


    You should not mount the INSTHOME directory by using the AMD or automounter utilities. These utilities can cause mounting or locking problems.

  5. Check whether NFS is running on the system by issuing the lssrc -g nfs command.

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


    If you are installing a small to intermediate size 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

    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.
    Note:It is recommended to run 10 biod processes on every machine.

  6. Ensure that the rpc.statd and rpc.lockd processes are active on each machine. Issue the ps -ef | grep rpc command, and check for the names of the two processes in the output.

  7. Ensure that /etc/rc.nfs entry is included in the /etc/inittab file using the lsitab rcnfs command.

  8. Set the AIX maxuproc (maximum number of processes per user) device attribute to 500 on all the machines that will be in the partitioned database system by issuing the following command:
      chdev -l sys0 -a maxuproc='500'

  9. Create a local file system that is locally mounted on each machine; for example, /database. This file system will function as a mount point for other files in the file system.


    Databases must be created on locally attached disks, and not on NFS-mounted file systems. Creating databases on an NFS-mounted file system is not supported.

  10. On all machines, create a subdirectory in the /database directory owned by the user db2inst1 in the group dbadmin1. For this example, the subdirectory is called /database/db2inst1.

When installing DB2 on an RS/6000 SP that is running AIX, you should ensure that the following network-related parameters are set on all of the SP nodes:

   thewall       = 16384
   sb_max        = 1310720
   rfc1323       = 1
   tcp_sendspace = 655360
   tcp_recvspace = 655360
   udp_sendspace = 65536
   udp_recvspace = 655360  
Note:You can use the no -a command to view the current setting for network parameters. The above values are minimum values for the parameters. If you are already setting any of the network-related parameters to a higher value, do not set the parameter to the lower listed value.

In addition, if you have the high speed switch, consider increasing the spoolsize and rpoolsize for css0. For example, to set the spoolsize and rpoolsize parameters to 8388608, issue the following commands:

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

To view the configuration for css0, issue the lsattr -l css0 -E command.

You should only use the following method to set the network-related parameters if you are not using the /tftpboot/tuning.cst file to tune the system.

A sample file is provided for updating the network-related parameters. The file name is:



DB2DIR = /usr/lpp/db2_05_00

  1. Copy the sample file to the /etc directory and make it executable by root. For example:
       cp DB2DIR/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 as in the following example:
       mkitab "rclocal:2:wait:/etc/rc.local > /dev/console 2>&1"

  4. To update the network parameters without rebooting the machine, issue the /etc/rc.local command.

For more information about these and other AIX operating system parameters, refer to the Performance and Tuning Guide.

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

[ DB2 List of Books | Search the DB2 Books ]