Specifying Connection Retry
- Last Updated: May 15, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Connection retry allows the Oracle driver to retry connections to the primary database server, and if specified, alternate servers until a successful connection is established. You use the ConnectionRetryCount and ConnectionRetryDelay properties to enable and control how connection retry works. For example:
jdbc:datadirect:oracle://server1:1521;ServiceName=TEST;User=test;
Password=secret;AlternateServers=(server2:1521;ServiceName=TEST2,
server3:1521;ServiceName=TEST3);ConnectionRetryCount=2;ConnectionRetryDelay=5
In this example, if a successful connection is not established on the Oracle driver’s first
pass through the list of database servers (primary and alternate), the driver retries the
list of servers in the same sequence twice (ConnectionRetryCount=2).
Because the connection retry delay has been set to five seconds
(ConnectionRetryDelay=5), the driver waits five seconds between retry
passes.