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.
Rerouting is only possible when an alternate database location has been specified at the server.
Automatic client reroute is only supported with TCP/IP protocol.
Use the UPDATE ALTERNATE SERVER FOR DATABASE command to enable automatic client reroute.
Client reroute is enabled by default if you set up HADR using the Set Up High Availability Disaster Recovery (HADR) Databases wizard in the Control Center.
Automatic client reroute does not use the HADR_REMOTE_HOST and HADR_REMOTE_SVC database configuration parameters.
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 SQL30081, and no further attempts will be made to establish a connection with the server.
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.