The AlternateServers connection property
- Last Updated: April 16, 2020
- 2 minute read
- Hybrid Data Pipeline
- Version 5.0
- Documentation
Failover configuration is supported for Oracle, SQL Server, and PostgreSQL databases by specifying the AlternateServers connection property in the Advanced Options connection string during installation or upgrade of the Hybrid Data Pipeline server. The syntax for the connection depends on which database you are using.
Oracle AlternateServers syntax
The value of the AlternateServers property is a string with the following syntax.
(servername1[:port1][;property=value[;...]][,servername2[:port2]
[;property=value[;...]]]...)
where:
servername1 is the server name of the first alternate database server, and servername2 is the server name of the second alternate database server. The server name is required for each alternate server entry.
port1 is the port number on which
the first alternate database server is listening, and port2 is the port number on which the second alternate database
server is listening. The port number is optional for each alternate server entry. If
unspecified, the port number specified for the primary server is used. If a port
number is unspecified for the primary server, a default port number of 1521 is used.
property=value is either the ServiceName or SID connection property. These connection properties are optional for each alternate server entry and are mutually exclusive. For example:
AlternateServers=(server2:1521;ServiceName=TEST2,server3:1521;ServiceName=TEST3)
or
AlternateServers=(server2:1521;SID=ORCL2,server3:1521;SID=ORCL3)
If you do not specify the ServiceName or SID connection property in the alternate server string, the connection to that alternate server uses the property specified for the primary server.
SQL Server and PostgresSQL AlternateServers syntax
The value of the AlternateServers property is a string with the following syntax.
(servername1[:port1][;property=value[;...]][,servername2[:port2]
[;property=value[;...]]]...)
If connecting to named instances, the syntax of alternate servers takes the following format.
(servername1\\instance1[;property=value][,servername2\\instance2
[;property=value]]
where:
servername1 is the IP address or server name of the first alternate database server, and servername2 is the IP address or server name of the second alternate database server. The IP address or server name is required for each alternate server entry.
instance1 is the named instance on the first alternate database server, and instance2 is the named instance on the second alternate database server. If connecting to named instances, the named instance is required for each alternate server entry.
port1 is the port number on which the
first alternate database server is listening, and port2 is the port number on which the second alternate database
server is listening. The port number is optional for each alternate server entry. If
unspecified, the port number specified for the primary server is used. If a port
number is unspecified for the primary server, a default port number of 1433 is used. (For SQL Server, the default is 1433. For PostgreSQL, the default is 5432.)
property=value is the DatabaseName connection property. This property is optional for each alternate server entry. For example:
AlternateServers=(AlternateServers=(server2:1433;DatabaseName=TEST2,
server3:1433;DatabaseName=TEST3)
Or, for named instances:
AlternateServers=(server2\\instance2:1433;
DatabaseName=TEST2,server3\\instance3:1433;DatabaseName=TEST3)
If you do not specify the DatabaseName connection property in the alternate server string, the connection to that alternate server uses the property specified for the primary server.