skip to main content
Using the ADO.NET Client : Specifying Connection Options : Alternate Servers
 

Alternate Servers

Property

AlternateServers

Description

Specifies a list of alternate database servers to which the data provider will try to connect if the primary database server is unavailable. Specifying a value for this connection string option enables connection failover for the data provider.
The value you specify must be in the form of a string that defines the physical location of each alternate server. You must specify the server name or the IP address and port number of each alternate server. All of the other required connection information for each alternate server is the same as what is defined for the primary server connection. Currently, the only optional connection string option that can be set for the alternate server is Server Data Source. The string has the format:

Valid Values

"Host=servername1;Port=port1[, ...]"

Example

The following Alternate Servers value defines two alternate servers for connection failover:
Alternate Servers="server1;port=19996;ServerDataSource=SDSN1:User ID=test;Password=secret;Alternate Servers=(Host=server2:Port=19996:ServerData Source=SDSN2,Host=server3:Port=19996:ServerDataSource=SDSN3)"

Default

An empty string