Post-Installation Setup

Once DB2 has been successfully installed on all servers, there are a number of post-installation setup tasks . To set up/verify DB2 after installation:

  • Review/update the database partition configuration file (db2nodes.cfg). On Windows, do not attempt to create or modify the database partition configuration file manually.

      0                        server_1                 0   1                        server_2                 0   2                        server_3                 0   3                        server_4                 0  
  • Review/enable communications between the database partitions. This requires that you update the /etc/services file on each server:

      db2c_db2inst1     50000/tcp         # remote client port   db2ccmsrv         50100/tcp         # used by Control Center Listener   DB2_db2inst1      60000/tcp         # instance owning port   DB2_db2inst1_1    60001/tcp         # database partition port   DB2_db2inst1_2    60002/tcp         # database partition port   DB2_db2inst1_END  60003/tcp         # database partition port  
  • Review/enable the execution of remote commands. This allows each database partition to perform remote commands on the other database partitions. This task must be performed on each server. View the $HOME/.rhosts file:

      + db2inst1  

Verifying the Installation

After you have successfully installed DB2 on all servers, it is recommended that you verify the installation. To verify the installation, you will:

  • Log on to the DB2 server.

  • Start the database manager by entering the db2start command.

  • Verify the correct service name (TCP/IP) that the database manager listens to:

      db2 get dbm cfg  grep i svcename  
  • Start the DB2 Administration Server by entering the db2admin start command.

  • Verify listener port:

      netstat a  grep db2inst  
  • Create a sample database using db2sampl .


    The sample database will be created with four database partitions, based on the db2nodes.cfg, defined in the previous step.

  • Once the sample database has been created successfully, you will run SQL commands to retrieve sample data:

      db2 connect to sample   db2 "select * from staff"   1   -----------   35   db2 terminate  
  • Verify that data has been evenly distributed across database partitions. The output will list the database partitions used by the employee table. The specific output will depend on the number of partitions in the database and the number of partitions in the partition groups that is used by the table space where the employee table was created.

  db2 "select distinct dbpartitionnum(id) from staff"   1   -----------     1   2   3  


There are four database partitions (0, 1, 2, and 3).

The following output displays the row count for each database partition:

  db2 "select count(*) from staff where dbpartitionnum(id)=0"   1   -----------   8   db2 "select count(*) from staff where dbpartitionnum(id)=1"   1   -----------   11   db2 "select count(*) from staff where dbpartitionnum(id)=2"   1   -----------   6   db2 "select count(*) from staff where dbpartitionnum(id)=3"   1   -----------   10   db2 terminate  

Advanced DBA Certification Guide and Reference for DB2 UDB v8 for Linux, Unix and Windows
Advanced DBA Certification Guide and Reference for DB2 Universal Database v8 for Linux, UNIX, and Windows
ISBN: 0130463884
EAN: 2147483647
Year: 2003
Pages: 121 © 2008-2017.
If you may any questions please contact us: