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

Directing Clients Automatically with DBPATH

This section explains the steps that you must follow to redirect clients with the DBPATH environment variable and the connectivity strategy that supports this method.

How the DBPATH Redirection Method Works

When an application does not explicitly specify a database server in the CONNECT statement, and the database server that the INFORMIXSERVER environment variable specifies is unavailable, the client uses the DBPATH environment variable to locate the database (and database server).

If one of the database servers in a replication pair is unusable, applications that use that database server need not reset their INFORMIXSERVER environment variable if their DBPATH environment variable is set to the other database server in the pair. Their INFORMIXSERVER environment variable should always contain the name of the database server that they use regularly, and their DBPATH environment variable should always contain the name of the alternative database server in the pair.

For example, if applications normally use a database server called cliff_ol, and the database server paired with cliff_ol in a replication pair is called beach_ol, the environment variables for those applications would be as follows:

INFORMIXSERVER  cliff_ol
DBPATH          //beach_ol

Because the DBPATH environment variable is read only (if needed) when an application issues a CONNECT statement, applications must restart in order for redirection to occur.

An application can contain code that tests whether a connection has failed and, if so, attempts to reconnect. If an application has this code, you do not need to restart it.

You can use the CONNECT TO database statement with this method of redirection. For this method to work, you cannot use any of the following statements:

The reason for this restriction is that an application does not use DBPATH if a CONNECT statement specifies a database server. For more information about DBPATH, refer to the IBM Informix Guide to SQL: Reference.

What the Administrator Needs to Do

Administrators take no action to redirect clients, but they might need to attend to the type of the database server.

What the User Needs to Do

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 ]