You can use the automatic client reroute feature with the
High Availability Disaster Recovery (HADR) feature to transfer client
application requests from a failed database server to a standby database
server.
Configuration details
- Use the UPDATE ALTERNATE SERVER FOR DATABASE command
to enable automatic client reroute.
- Automatic client reroute does not use the hadr_remote_host and hadr_remote_svc database
configuration parameters.
- In multiple standby mode, you can only
specify one standby database for automatic client reroute.
- The alternate host location is stored in the system database
directory file at the server.
- If automatic client reroute is not enabled, client applications
will receive error message SQL30081N, and no further attempts will
be made to establish a connection with the server.
Using the UPDATE ALTERNATE SERVER FOR DATABASE command
to set up automatic client reroute with HADR
Your system
is set up as follows:
- You have a client where database MUSIC is cataloged as being located
at host HORNET.
- Database MUSIC is the primary database and its corresponding standby
database, also MUSIC, resides on host MONTERO with port number 456,
which is assigned by the svcename configuration
parameter.
To enable automatic client reroute, update the alternate server
for database MUSIC on host HORNET:
db2 update alternate server for database music using hostname montero port 456
After
this command is issued, the client must successfully connect to host
HORNET to obtain the alternate server information. Then, if a communication
error occurs between the client and database MUSIC at host HORNET,
the client will first attempt to reconnect to database MUSIC at host
HORNET. If this fails, the client will then attempt to establish
a connection with the standby database MUSIC on host MONTERO.