Add hafailover line to interfaces file

Clients with the failover property automatically reconnect to the secondary companion when the primary companion crashes or you issue shutdown or shutdown with nowait, triggering failover. To give a client the failover property, you must add a line labeled “hafailover” to the interfaces file to provide the 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.

UNIX platforms

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

PERSONNEL1
   master tcp ether host port
   query tcp ether host port

Windows

The following is a Windows sql.ini entry for a symmetric configuration between the MONEY1 and PERSONNEL1 companions:

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

For more information about adding this information to the interfaces file, see the Open Client and Open Server Configuration Guide for Microsoft Windows or Open Client and Open Server Configuration Guide for UNIX.

NoteClient applications must resend any queries that were interrupted by failover. Other information specific to the connection, such as cursor declarations, will also need to be restored.