skip to main content
Connection property descriptions : AlternateServers
  

Try DataDirect Drivers Now

AlternateServers

Purpose

A list of alternate database servers that is used to failover new or lost connections, depending on the failover method selected. See "Using failover" for information about choosing a failover method.
If using a tnsnames.ora file to retrieve connection information, do not specify this property. See "Using tnsnames.ora files" for more information.

Valid values

(servername1[:port1][;property=value[;...]][,servername2[:port2]
[;property=value[;...]]]...)
The server name (servername1, servername2, and so on) is required for each alternate server entry. Port number (port1, port2, and so on) and connection properties (property=value) are optional for each alternate server entry. If the port is unspecified, the port number of the primary server is used. If the port number of the primary server is unspecified, the default port number of 1521 is used.
Optional connection properties are ServiceName and SID.

Notes

*If using failover with an Oracle RAC, the primary server must be a primary node and any alternate server must be a secondary node.

Example

The following URL contains alternate server entries for server2 and server3. The alternate server entries contain the optional ServiceName property. Similarly, you can use the optional SID property instead.
jdbc:datadirect:oracle://server1:1521;ServiceName=TEST;
AlternateServers=(server2:1521;ServiceName=TEST2,server3:1521;
ServiceName=TEST3)

Data source method

setAlternateServers

Default

None

Data type

String