DB2 uses the $DB2InstHome/sqllib/db2nodes.cfg file during failover from one node to another.
For each DB2 UDB ESE multi-partition instance (non-MPP) database partitions, modify the file $DB2InstHome/sqllib/db2nodes.cfg such that you create an entry for each database partition, assigning the virtual IP address as the hostname. For example:
Note that the virtualhostname
corresponds to the virtual IP address listed in the file /etc/hosts. Make sure that the virtual IP address is up and running at this time.
For MPP versions, modify the file $DB2InstHome/sqllib/db2nodes.cfg with the hostname that you want each database partition to start on. DB2 automatically changes and updates the db2nodes.cfg file to enable the database partitions to fail over from one node to another. DB2 adds a fourth column for the "netname," which is, by default, the hostname. The virtual IP is not used in the db2nodes.cfg file for MPP configurations.
Make sure that the relative port number in the third column is unique for each partition on a host. For example: