Client Connections During Failover

Clients with the failover property reconnect automatically during failover. To accommodate this, you must add a line labeled “hafailover” to the interfaces file to provide the connection information necessary for the client to connect to the secondary companion. You can add this line using either a file editor or the dsedit utility.

The following interfaces file entry is for an asymmetric configuration between the primary companion PERSONEL1 and its secondary companion MONEY1. It includes an additional hafailover entry that enables clients connected to PERSONEL1 to reconnect to MONEY1 during failover:

PERSONEL1
 
 	master tli tcp /dev/tcp \x00029f7g82d63ce70000000000000000
 	query tli tcp /dev/tcp \x00029f7g82d63ce70000000000000000
 	hafailover MONEY1

On Windows NT, the connection information is included in the sql.ini file, which also includes an entry for hafailover. The following is a sql.ini entry for a symmetric configuration between the MONEY1 and PERSONEL1 companions:

[MONEY1]
 query=TCP,FN1,9835
 master=TCP,FN1,9835
 hafailover=PERSONEL1
[PERSONEL1]
 query=TCP,HUM1,7586
 master=TCP,HUM1,7586
 hafailover=MONEY1

For more information about adding this information to the interfaces file, see the configuration chapter for your platform.

Client applications must re-send any queries that were interrupted by failover. See Appendix C, “Open Client Functionality in a Failover Configuration,” for more information about client applications.