skip to main content
Configuring the ODBC Client : Configuring Connection Failover for the ODBC Client : Specifying Alternate Servers : Connection String Example
 
Connection String Example
The following connection string configures the ODBC Client connected to a Linux, UNIX, or Windows server to use connection failover in conjunction with all of its optional features—load balancing, connection retry, and connection retry delay.
The connection string syntax uses the following syntax:

AlternateServers=(alternateserver[,alternateserver]... ] )
where alternateserver is attribute=value[:attribute=value]...
For example:

DSN=MyODBCDSN;AlternateServers=(Host=server1:Port=19986:ServerDataSource=SDSN1,Host=server2:Port=19986:ServerDataSource=SDSN2,Host=server3:Port=19986:ServerDataSource=SDSN3);ConnectionRetryCount=4;ConnectionRetryDelay=5;LoadBalancing=1
Specifically, if a successful connection is not established on the ODBC Client’s first pass through the list of OpenAccess SDK Servers, this connection string configures the driver to use two alternate servers as connection failover servers, to attempt to connect four additional times if the initial attempt fails, to wait five seconds between attempts, and to try the primary and alternate servers in a random order.
The additional connection information required for the alternate servers is specified in the OpenAccess SDK Server data source MyODBCDSN.