Configuring DB2 automatic client reroute feature

You can configure the automatic client reroute feature (ACR) of DB2® to adapt it to work with the database in your environment.

About this task

The method that you use to configure the automatic client reroute feature depends on the type of high availability database configuration that is already in place.

DB2 with shared disk
If you are implementing a DB2 shared disk environment, you must use a service IP to mask the failover from the product application. When you configure DB2 ACR on the shared disk environment, you must specify the Service IP as the alternative database host for ACR. As both the primary and standby nodes share a common instance, only one alternate database host can be specified. For this reason, it is necessary to set the alternate database host as the Service IP.
DB2 HADR with service IP and automated failover
If you configured DB2 HADR with a service IP and automated failover, the host name of the alternative database host for ACR must be configured as the service IP host name. When failover occurs, Tivoli®'s process automation engine continuously attempts to reconnect on the same service IP until it is online. When the reconnection is successful, the database is available on the standby node.
DB2 HADR without service IP
If you configured DB2 HADR without implementing a service IP, you can specify the standby node host name as the alternative database host for the primary server and vice versa. The primary and standby servers both have a database instance. For products that are based on Tivoli's process automation engine, a DB2 HADR without a service IP is not a suitable configuration.

In all cases, the standby database must be online and functional before the automatic client reroute feature can properly reestablish the connection. Automated failover to the standby node is a more efficient approach than a manual takeover.

For more information, see the automatic client reroute section of the High Availability and Disaster Recovery Options for DB2 on Linux, UNIX, and Windows IBM Redbooks® publication.

Procedure

  1. To enable the automatic client reroute feature for DB2, the DB2 instance owner must run a command.
    • For DB2 HADR, the following command must be run on all the database nodes in the DB2 HADR topology and must point to the service IP host name:

      db2 update alternate server for database MAXIMO using hostname <Virtual hostname> port <db2 port>

    • For shared disk topologies, the following command must be run on only one of the nodes. The standby nodes share the instance configuration when it is mounted:

      db2 update alternate server for database MAXIMO using hostname <Virtual hostname> port <db2 port>

  2. To verify that the automatic client reroute feature for DB2 is enabled, run the following command: db2 list database directory The command lists an alternative server host name and port. If an alternative server is specified on all nodes, then the automatic client reroute feature is configured.

Example

When you enable the automatic client reroute feature and use the verification command, you can see that an alternative database is specified by checking the data that is returned. You can check for the same alternative database on all nodes in the topology:

Database 1 entry:
Database alias MAXIMO
Database name MAXIMO
Local database directory /home/db2inst1
Database release level d.00
Comment  
Directory entry type Indirect
Catalog database partition number 0
Alternate server hostname virtualhostname
Alternate server port number 50000


Feedback