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 an open route to your data, even when server downtime occurs.
You can customize certain DataDirect Connect for ODBC drivers for connection failover by configuring a list of alternate database servers that are tried if the primary server is not able to accept connections. Connection attempts continue until a connection is successfully established or until all the alternate database servers have been tried. Connection failover is available in the following DataDirect Connect® for ODBC drivers: DB2 Wire Protocol, Informix Wire Protocol, Oracle Wire Protocol, Oracle, SQL Server Wire Protocol (UNIX only), and Sybase Wire Protocol.
To configure connection failover, you must specify a list of alternate database servers that are tried at connection time if the primary server is not accepting connections. To do this, you would use the AlternateServers connection string attribute in a connection string. Connection attempts continue until a connection is successfully established or until all the database servers in the list have been tried once.
The following connection string configures the Oracle Wire Protocol driver to use connection failover:
DSN=Oracle Acct Tables;AlternateServers=(HostName=AccountingOracleServer: PortNumber=1521:SID=Accounting, HostName=255.201.11.24:PortNumber=1522: ServiceName=ABackup.NA.MyCompany)
Specifically, this connection string configures the driver to use two alternate servers as connection failover servers. Note that for the Oracle Wire Protocol driver, you can specify either SID= or ServiceName=. The additional connection information required for the alternate servers is specified in the data source Oracle Acct Tables.
For a more detailed explanation of connection failover, see the DataDirect technical article DataDirect Connect for ODBC Reference Guide.