The most current version of the DataDirect JDBC Drivers (version 3.5) available for ColdFusion MX now support the AlternateServers connection string option for Oracle datasources. The Oracle driver now allows you to specify a list of Oracle Database servers when first establishing the connection. Each database server in the list will be tried until one is successful or until all have been tried unsuccessfully, repeating the list as necessary via the ConnectionRetry property.

ColdFusion MX 7 Administrator currently has a bug where connection string properties are not correctly added to the datasource definition as per this Technote. The Technote suggests that you manually edit the neo-query.xml file to manually add the connection string properties, however for the purpose of AlternateServers, you can just tack it on the end of the value in the Oracle SID field in the CF Admin DSN page.

The syntax for the AlternateServers property is:

This can be used with the addtional properties for ConnectionRetryCount and ConnectionRetryDelay. ConnectionRetryCount is the number of times the list will be repeated while trying to obtain a successful connection, and ConnectionRetryDelay is the number of seconds to wait before repeating the list.

Combining all this for use in the CFMX 7 Administrator, assuming an SID of "TEST" while remembering the connection string field problem, enter the SID as the following example (spaces added here for formatting):

TEST;AlternateServers=(server2:1521,server3:1521); ConnectionRetryCount=2;ConnectionRetryDelay=5

When attempting to get a connection to the primary database server, say server1, if not successful then the Oracle JDBC driver will attempt to try the list of alternate servers, server2 and server3. If still not successful, then the driver will wait 5 seconds based on the delay setting, and try the list twice more with another five second pause in between.

More information can be found in these related documents: