This string configures the driver to use connection failover in conjunction with some of its optional features. It uses the user ID/password authentication method for authentication.

Note: The strings demonstrated in this section use the DSN-less format. For additional formats, see "Using a connection string".
DRIVER=DataDirect 8.0 Informix Wire Protocol;AlternateServers=alternate_server;
ConnectionRetryCount=connection_retry_count;ConnectionRetryDelay=connection_retry_delay;
LoadBalancing=load_balancing;LogonID=user_name;Password=password;

where:

alternate_servers

specifies addresses of the alternate database servers to which the driver tries to connect if the primary database server is unavailable.

connection_retry_count

specifies the number of times the driver retries connection attempts to the primary database server, and if specified, alternate servers until a successful connection is established. If set to 0, the driver does not try to connect after the initial unsuccessful attempt.

connection_retry_delay

specifies the number of seconds the driver waits between connection retry attempts.

load_balancing

determines whether the driver uses client load balancing in its attempts to connect to the database servers (primary and alternate). Set this to 1 to enable load balancing. See "Load Balancing" for details.

user_name

specifies your username.

password

specifies your password.

Note: The LogonID and Password options are not required to be stored in the connection string. They can also be sent separately by the application using the SQLConnect ODBC API. For SQLDriverConnect and SQLBrowseConnect, they will need to be specified in the connection string.

The following example connection string includes the options for configuring the driver for connection failover.

DRIVER=DataDirect 8.0 Informix Wire Protocol;AlternateServers=(HostName=informix:
PortNumber=4321:ServerName=Acct:Database=Accounting,HostName=255.201.11.24:
PortNumber=4320:ServerName=Acct1:Database=Accounting);ConnectionRetryCount=4;
ConnectionRetryDelay=5;LoadBalancing=1;LogonID=jsmith;Password=secret;