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 are not required to reset their INFORMIXSERVER environment variable if their DBPATH environment variable is set to the other database server in the pair. Their INFORMIXSERVER environment variable must always contain the name of the database server that they use regularly, and their DBPATH environment variable must always contain the name of the alternative database server in the pair.
INFORMIXSERVER cliff_ol
DBPATH //beach_ol
Because the DBPATH environment variable is read only (if required) 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 are not required to restart it.
- CONNECT TO DEFAULT
- CONNECT TO database@dbserver
- CONNECT TO @dbserver
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, see the HCL OneDB™ Guide to SQL: Reference.