Configuring Failover
Print
- 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
To configure failover:
-
Specify the primary and alternate servers:
- Specify your primary server using a connection URL or data source.
- Specify one or multiple alternate servers by setting the AlternateServers property.
-
Choose a failover method by setting the FailoverMode connection property. The default
method is connection failover (
FailoverMode=connect). See Using Failover for an overview of each failover method. -
If FailoverMode=
extendedor FailoverMode=select, set the FailoverGranularity property to specify how you want the driver to behave if exceptions occur while trying to reestablish a lost connection. The default behavior of the driver is to continue with the failover process and post any exceptions on the statement on which they occur (FailoverGranularity=nonAtomic). - Optionally, configure the connection retry feature. See Specifying Connection Retry.
-
Optionally, set the FailoverPreconnect property if you want the driver to establish a
connection with the primary and an alternate server at the same time. The default behavior
is to connect to an alternate server only when failover is caused by an unsuccessful
connection attempt or a lost connection
(
FailoverPreconnect=false).Note: To turn off failover, do not specify a value for the AlternateServers property.