Partitioned Database Environment

Let's take a look at the DB2 ESE configuration with four database partitions, four servers, and one database partition per server. The following setup instructions are based on this configuration but can easily be adjusted for partitioned configurations with a fewer or greater number of servers and database partitions. For example, server_1 is the primary or instance-owning database partition server; server_2, server_3, and server_4 are the participating database partition servers.

When you install DB2 ESE with multiple-partition database environment, you need to follow similar considerations as described in the single-partition database environment.

Preparing the Environment for Installation

Before performing the DB2 installation, you need to verify that each server:

  • meets the necessary installation requirements

  • has the correct operating system version and fix level

  • has enough memory to run DB2

  • has enough disk space for DB2 product installation

  • belongs to the same network

  • has the necessary user accounts for installation and setup

  • can communicate with each other via TCP/IP

  • has consistent time and date settings


  • You must update kernel parameters to the recommended values for HP-UX, Linux, and Solaris.

    • Use db2osconf for Solaris.

  • A system restart is required.

  • For Solaris, set the following network parameters:

    • Set the TCP network parameters:

      ndd ?set /dev/tcp tcp_xmit_hiwat 65536
      ndd ?set /dev/tcp tcp_recv_hiwat 65536
    • Set the UDP network parameters:

      ndd ?set /dev/udp udp_xmit_hiwat 65536
      ndd ?set /dev/udp udp_recv_hiwat 65536
    • To list the current network settings:

      no ?get /dev/tcp <network_parm>
      no ?get /dev/udp <network_parm>
  • For AIX, set the following network parameters:

    • Set the maximum number of processes to a higher value. The default value for maxuproc is 500.

      chdev ?l sys0 ?a maxuproc='4096'
    • To list the current TCP/IP network setting:

      no ?a | pg
    • To set the TCP/IP network parameters:

      no ?o thewall=1048576
      no ?o rfc1323=1
      no ?o tcp_sendspace=655360
      no ?o tcp_recvspace=655360
      no ?o udp_sendspace=65536
      no ?o udp_recvspace=655360
      no ?o sb_max=1310720
  • Create a DB2 home file system on the primary server (server_1) and share this home directory to the participating servers (server_2, server_3, and server_4). This will be the instance home directory. You also need to create necessary file systems and/or raw devices to store database file structure, log files, backup images, table space containers, etc.


For additional kernel parameters, refer to the DB2 ESE Quick Beginnings Guide.

Installing the DB2 Server

After preparing the environment, you will install the DB2 product using the DB2 Setup Wizard. The installation includes the following:

  • It is recommended to install an instance-owning database partition server for the primary server (server_1) first:

  • Set up DB2 Administration Server (for the primary server, then the remaining participating servers).

    • Create DAS instance:

      ./dasicrt db2as


      The db2icrt and dasicrt commands must be run from the DB2 installation directory as root:

      On AIX: /usr/opt/db2_08_01/instance

      On HP-UX, Linux, Solaris: /opt/IBM/db2/V8.1/instance

      On Windows: \Program Files\IBM\SQLLIB\bin

    • Start Administration Server:

      db2admin start
  • It is recommended in setup to create a local administration contact list on the instance-owning database partition. When the DB2 Administration Server is installed and configured on the other participating database partition servers, it will be configured to use the contact list on the instance-owning database partition server.


    After installation, the instance-owning database partition on the server_1, the db2nodes.cfg file was updated as follows:

    0 server_1 0

  • Set up DB2 instance and configuration.

    • Create DB2 instance:

      ./db2icrt ?a SERVER ?u db2fenc1 db2inst1
    • Modify .profile to include db2profile as needed:

      # The following three lines have been added by UDB DB2.
      if [ -f $HOME/db2inst1/sqllib/db2profile ]; then
      . $HOME/db2inst1/sqllib/db2profile
    • The DB2COMM registry variable determines which protocols will be enabled when the database manager is started. You can use the db2set ?all command to verify or to set the DB2COMM registry to TCPIP protocol using:

      db2set DB2COMM=TCPIP
    • You can use the db2 get dbm cfg command to verify the service name or to update SVCENAME in the database manager configuration file using:

      db2 update dbm cfg using SVCENAME db2c_db2inst1
    • For communication between the DB2 server and remote clients, you need to add two entries in the /etc/services file on all servers:

      db2c_db2inst1          50000/tcp             # remote client's port
    • To enable the Control Center to manage partitioned databases, you must have a Control Center listener daemon running on each server. This daemon is called dd2cclst, and it is used by all instances that are created on a given server. On all servers, you must reserve a port called db2ccmsrv in the /etc/services for use by the db2cclst daemon:

      db2ccmsrv              50100/tcp             # Control Center Listener
  • You can use the db2licm ?l command to verify the existing license product.

  • Verify the port range that DB2 has reserved for database partitions communication. Before you create a DB2 instance, you must decide (as a minimum) how many database partitions will be defined per server.

  • Verify that the port range is available on each participating database partition server.

  • During the installation process, you specify a location and name for two response files. The first response file is for installing a replica of the primary server. The second response file is for installing database partition servers on participating computers (i.e., /dbhome/db2inst1/AddPartitionResponse.file).

  • For each participating database partition server, server_2, server_3, and server_4, you will install a database partition server using the response file created from the previous step. This ensures that the same components are installed and configured the same way:

    db2setup ?r /dbhome/db2inst1/AddPartitionResponse.file


    You must log on to each participating server and perform a response file installation.

  • Verify and update the database partition configuration file (db2nodes.cfg) as needed. Based on the current configuration, with four servers and a database partition per server, update db2nodes.cfg to appear similar to the following:

    0                        server_1                 0
    1                        server_2                 0
    2                        server_3                 0
    3                        server_4                 0
  • Verify and enable communication between database partitions as needed. Communication between database partitions is handled by the FCM. To enable FCM, a port or port range must be reserved in the /etc/systems file on each computer in your partitioned database system. This task must perform on the participating server only.

  • Verify and enable the execution of remote commands. In a partitioned database environment, each database partition must have the authority to perform remote commands on all other database partition servers participating in an instance. This can be done by updating the .rhosts file in the home directory for the instance.

    • Add entries to the /dbhome/db2inst1/.rhosts file for each server, including the primary server. The .rhosts file has the following format:

      hostname                             instance_owner_ID
      --------                             -----------------                 db2inst1                 db2inst1                 db2inst1                 db2inst1


      This is a preferred approach for the .rhosts file.

      - Instead of specifying each host name individually, you may specify the following entry in the .rhosts file, but this may pose a security risk and should be done only in a test environment. The following entry in the .rhosts allows this "trusted" user db2inst1 to execute remote commands from any hosts that are defined in the /etc/hosts file:

      +  db2inst1


For information on errors encountered during installation, on Windows, see the db2.log file. This db2.log file stores general information and error messages resulting from the install and uninstall activities. On Linux and UNIX, see the /tmp/db2setup.log.