Connection failover
- Last Updated: June 6, 2022
- 2 minute read
- DataDirect Connectors
- ODBC
- SAP Sybase IQ 8.0
- Documentation
This string configures the driver to use connection failover in conjunction with some of its optional features. It uses the user ID and password authentication.
DRIVER=DataDirect 8.0 Sybase IQ Wire Protocol;
AlternateServers=alternate_server;ConnectionRetryCount=connection_retry_count;
ConnectionRetryDelay=connection_retry_delay;LoadBalancing=load_balancing;
FailoverMode=failover_mode;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). Client load balancing helps distribute new connections in your environment so that no one server is overwhelmed with connection requests. If set to
1(Enabled), the driver uses client load balancing and attempts to connect to the database servers (primary and alternate servers) in a random order. If set to0(Disabled), the driver does not use client load balancing and connects to each server based on their sequential order (primary server first, then, alternate servers in the order they are specified).
- failover_mode
-
specifies the type of failover method the driver uses. If set to
0(Connection), the driver provides failover protection for new connections only. If set to1(Extended Connection), the driver provides failover protection for new and lost connections, but not any work in progress. If set to2(Select), the driver provides failover protection for new and lost connections. In addition, it preserves the state of work performed by the last Select statement executed.
- user_name
-
specifies your username.
- password
-
specifies your password.
The following example connection string includes the options required for configuring the driver for connection failover.
DRIVER=DataDirect 8.0 Sybase IQ Wire Protocol;
AlternateServers=(NetworkAddress=SybaseIQserver1, 2638:Database=SybaseIQdatabase1,
NetworkAddress=SybaseIQserver2, 2639:Database=SybaseIQdatabase2);
ConnectionRetryCount=4;ConnectionRetryDelay=5;LoadBalancing=1;FailoverMode=0;
LogonID=jsmith;Password=secret;