IBM DB2 Manual page 112

Table of Contents

Advertisement

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| | |
| |
| |
| |
| |
| |
|
|
|
|
96
Application Programming Guide and Reference for Java
In an IBM Informix Dynamic Server environment, primary and standby servers
correspond to members of a high-availability cluster that is controlled by a
Connection Manager. If multiple Connection Managers exist, the IBM Data Server
Driver for JDBC and SQLJ can use them to determine primary and alternate server
information if the clientRerouteAlternateServerName and
clientRerouteAlternatePortNumber properties are set. The IBM Data Server Driver
for JDBC and SQLJ uses the alternative Connection Managers only for the initial
connection unless you enable support for client affinities for cascaded failover.
You enable support for client affinities for cascaded failover by setting the
enableClientAffinitiesList property. That property specifies a client affinities list,
which specifies the order in which connections should be attempted after a failure.
If client affinities for cascaded failover is enabled, the IBM Data Server Driver for
JDBC and SQLJ retries connections to only those servers that are identified by the
clientRerouteAlternateServerName and clientRerouteAlternatePortNumber
properties. The clientRerouteAlternateServerName list also includes the primary
server. The behavior for enableSeamlessFailover is the same regardless of
enableClientAffinitiesList.
Seamless failover operates in the same way, regardless of whether support for
client affinities for cascaded failover is enabled. If seamless failover is in effect, the
driver retries a transaction on a new server, without notifying the application. The
following conditions must be satisfied for seamless failover to occur:
v The enableSeamlessFailover property is set to DB2BaseDataSource.YES (1).
If Sysplex workload balancing is in effect (the value of the enableSysplexWLB is
true), seamless failover is attempted, regardless of the enableSeamlessFailover
setting.
v The connection is not in a transaction. That is, the failure occurs when the first
SQL statement in the transaction is executed.
v There are no global temporary tables in use on the server.
v There are no open, held cursors.
v For DB2 for z/OS servers, inactive thread support is disabled. Inactive thread
support is disabled in one of the following ways:
– Subsystem parameter CMTSTAT is set to ACTIVE.
– CMTSTAT is set to INACTIVE, but the application is bound with option
KEEPDYNAMIC(YES).
Example
Suppose that the following properties are set for a connection to a database:
Property
enableClientAffinitiesList
clientRerouteAlternateServername
clientRerouteAlternatePortNumber
maxRetriesForClientReroute
retryIntervalForClientReroute
Suppose that a communication failure occurs during a connection to the server that
is identified by host1:port1. The following steps demonstrate a client reroute
scenario when seamless failover is in effect.
Value
DB2BaseDataSource.YES (1)
host1,host2,host3
port1,port2,port3
3
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents