Home | Previous Page | Next Page   Fault Tolerance > High-Availability Data Replication (Enterprise/Workgroup Editions) > Redirection and Connectivity for Data-Replication Clients >

Directing Clients with the Connectivity Information

This section explains the steps in redirecting clients with the connectivity information and the connectivity strategy that supports this method.

Operating System
Location of Connectivity Information
UNIX
The INFORMIXSQLHOSTS environment variable specifies the full pathname and filename of the connection information in $INFORMIXDIR/etc/sqlhosts. For more information about INFORMIXSQLHOSTS, see the IBM Informix Guide to SQL: Reference.
Windows
The connectivity information is in a key in the Windows registry called HKEY_LOCAL_MACHINE\SOFTWARE
\INFORMIX\SQLHOSTS
.

How Redirection with the Connectivity Information Works

The connectivity information-redirection method relies on the fact that when an application connects to a database server, it uses the connectivity information to find that database server.

If one of the database servers in a replication pair is unusable, an administrator can change the definition of the unavailable database server in the connectivity information. As described in Changing the Connectivity Information, the fields of the unavailable database server (except for the dbservername field) are changed to point to the remaining database server in the replication pair.

Because the connectivity information is read when a CONNECT statement is issued, applications might need to restart for redirection to occur. Applications can contain code that tests whether a connection has failed and issues a reconnect statement, if necessary. If a connection has failed, redirection is automatic, and you do not need to restart applications for redirection to occur.

Applications can use the following connectivity statements to support this method of redirection:

Applications can also use the following connectivity statements, provided that the INFORMIXSERVER environment variable always remains set to the same database server name and the DBPATH environment variable is not set:

Changing the Connectivity Information

To use the connectivity information to redirect clients, you must change the connectivity information for the clients and change other connectivity files, if necessary.

For more information, refer to Configuring HDR Connectivity and Client/Server Communications.

To change the connectivity information on the client computer
  1. Comment out the entry for the failed database server.
  2. Add an entry that specifies the dbservername of the failed database server in the servername field and information for the database server to which you are redirecting clients in the nettype, hostname, and servicename fields.
  3. Use the following options in the sqlhosts file or registry to redirect applications to another database server if a failure should occur:
    1. Connection-Redirection Option
    2. End-of-Group Option
    3. Group Option

Figure 79 shows how connectivity values might be modified to redirect clients.

You do not need to change entries in the connectivity information on either of the computers that is running the database servers.

Figure 79. Connectivity Values Before and After a Failure of the cliff_ol Database Server
begin figure description - This figure shows connectivity values before and after a failure of a sample database server named cliff_ol. The connectivity values were changed during the failure. The paragraphs before this figure explain how to change connectivity information on the client computer. The paragraphs after this figure explain how to change other connectivity files. - end figure description
To change other connectivity files

You also must ensure that the following statements are true on the client computer before that client can reconnect to the other database server.

  1. The /etc/hosts file on UNIX or hosts file on Windows has an entry for the hostname of the computer that is running the database server to which you are redirecting clients.
  2. The /etc/services file on UNIX or services file on Windows has an entry for the servicename of the database server to which you are redirecting clients.

Connecting to the Database Server

After the administrator changes the connectivity information and other connectivity files (if needed), clients connect to the database server to which the administrator redirects them when they issue their next CONNECT statement.

If your applications contain code that tests if a connection has failed and issues a reconnect statement if necessary, redirection is handled automatically. The user has no responsibilities. If your applications do not include such code, users who are running clients must quit and restart all applications.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]