Question & Answer
Question
In a partitioned database environment with multiple partitions on the same host (logical partitions), configuring the db2nodes.cfg and the /etc/services files incorrectly can lead to error SQL6031 at db2start
Answer
To enable the fast communications manager (FCM) at a database partition and allow communication with other database partitions, you must create a service entry in the /etc/services file. The FCM uses the specific port to communicate. If you have defined multiple partitions on the same host, you must define a range of ports.
The name of the service of the first port for FCM must be DB2_instance-name, and the name of the service of the last port must be DB2_instance-name_END
Example:
The following output of db2nodes.cfg and /etc/services files on host1, show a configuration that will cause error SQL6031 at start up:
1. host1 contains 3 logical partitions of the instance and host2 2 partitions:
% more db2nodes.cfg
0 host1 0 net1
1 host1 1 net1
2 host1 2 net1
3 host2 0 net2
4 host2 1 net2
2. /etc/services on host1:
% more /etc/services | grep db2inst1
DB2_db2inst1 26176/tcp
DB2_db2inst1_END 26177/tcp
3. With the above configuration db2start will fail with the following message:
% db2start
SQL6031N Error in the db2nodes.cfg file at line number "3".
Reason code "12".
To find out what reason code 12 refers to, execute:
%db2 ? SQL6031
...
(12) The port value at line "<line>" of the db2nodes.cfg file in the sqllib directory is not in the valid port range defined for your DB2 instance id in the services file (/etc/services on UNIX®-based systems)
....
4. Notice that line 3 on the db2nodes.cfg file corresponds to the third partition on host1,
however the /etc/services file shows only 2 ports allocated.
The following modification to the /etc/services file will fix the problem:
% more /etc/services | grep db2inst1
DB2_inst1 26176/tcp
DB2_inst1_END 26178/tcp
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21194423