skip to main content
Using the ADO Client : Configuring Connection Failover
 

Configuring Connection Failover

Connection failover allows an application to connect to an alternate, or backup, database server if the primary database server is unavailable, for example, because of a hardware failure or traffic overload. Connection failover ensures that the data on which your critical ADO and OLE DB applications depend is always available.
You can customize the ADO data provider for connection failover by configuring a list of alternate OpenAccess SDK servers that are tried if the primary server is not accepting connections. Connection attempts continue until a connection is successfully established or until all the alternate OpenAccess SDK servers have been tried the specified number of times.
For example, suppose you have the environment shown in the following illustration with multiple OpenAccess SDK servers: Server A, B, and C. Server A is designated as the primary OpenAccess SDK server, Server B is the first alternate server, and Server C is the second alternate server.
First, the application attempts to connect to the primary database server, Server A (1). If connection failover is enabled and Server A fails to accept the connection, the application attempts to connect to Server B (2). If that connection attempt also fails, the application attempts to connect to Server C (3).
In this scenario, it is probable that at least one connection attempt would succeed, but if no connection attempt succeeds, the Client can retry each alternate OpenAccess SDK Server (primary and alternate) for a specified number of attempts.
To configure connection failover, you must specify a list of alternate OpenAccess SDK Servers that are tried at connection time if the primary server is not accepting connections. To do this, use the Alternate Servers connection attribute. Connection attempts continue until a connection is successfully established or until all the database servers in the list have been tried once (the default).
Optionally, you can specify the following additional connection failover features:
The number of times the ADO data provider attempts to connect to the primary and alternate OpenAccess SDK servers after the initial unsuccessful connection attempt. By default, the driver does not retry. To set this feature, use the Connection Retry Count connection option. See Using Connection Retry for more information.
The wait interval, in seconds, between attempts to connect to the primary and alternate OpenAccess SDK servers. The default interval is 3 seconds. To set this feature, use the Connection Retry Delay connection option.
Whether the ADO data provider will use client load balancing in its attempts to connect to primary and alternate OpenAccess SDK servers. If load balancing is enabled, the driver uses a random pattern instead of a sequential pattern in its attempts to connect. The default value is not to use load balancing. To set this feature, use the Load Balancing connection option. See Using Client Load Balancing for more information.