Configuring automatic client reroute

If you have a Db2® clustered or HADR configuration, configure automatic client reroute for IBM® WebSphere® Application Server to reconnect to the standby server smoothly. This task is required only if the host name and port change is the result of relocating the metadata repository database to a new computer, or if the alternate server host name or port has changed.

About this task

In an IBM InfoSphere® Information Server installation with a clustered Db2 database system setup, automatic client reroute can redirect WebSphere Application Server to connect to an alternate server when the primary server fails. The alternate server is preregistered within automatic client reroute. When the failure occurs, automatic client reroute first tries to reconnect to the primary database. If the connection fails, automatic client reroute establishes a connection with the standby server.

If an update, deletion, or insertion transaction was taking place and the failure occurred before the transaction was committed, the user receives an error message. When the user tries the transaction again, the standby server handles the transaction. If a read transaction was taking place, the read transaction is automatically run on the standby server, and no error message is displayed.

Procedure

  1. Log in to the primary node.
  2. Run the following command to configure automatic client reroute for the database:
    db2 update alternate server for database database using hostname standby_IP port port
    The standby_IP can be an IPv4 address or an IPv6 address, as shown in the following examples:
    IPv4:
    db2 update alternate server for database xmeta using hostname 192.0.2.7 port 60000
    IPv6:
    db2 update alternate server for database xmeta using hostname ::ffff:192.0.2.7 port 60000