Db2 Sysplex exploitation
You can exploit Db2 Sysplex to ensure fault tolerance if connections to the database fail.
| Sysplex server B | Sysplex server C |
|---|---|
| HOST_NAME=MVSHOST | HOST_NAME=MVSHOST1 |
Suppose that in this scenario an application now issues:
db2 connect to aliasb user xxxxxxx using xxxxxxxx
The connection to database MVSHOST is established. Because Sysplex exploitation
is enabled both for the Db2 Connect
Server and the DCS
directory entry, Db2 for z/OS identifies
the network addresses to Db2 Connect for each Sysplex
participant (MVSHOST and MVSHOST1. DRDA4 protocols and message flows are used to return this
information). Once an initial connection has been made, the returned list of addresses is cached at
the Db2 Connect
workstation. Once the initial CONNECT is issued for a TCP/IP node, then the IP addresses are
returned.
Priority information used for load balancing and fault tolerance
The list of addresses provided by Db2 for z/OS also includes priority information, including the number of connections for each network address. The list is refreshed whenever a new connection is made by Db2 Connect. This additional information is used for load balancing purposes, as well as for fault tolerance.
Cached Address List used by Db2 Connect
- It tries the highest priority server from the cached list of addresses based on the priority information that was returned by Db2 for z/OS. This strategy is always used by Db2 Connect, and it is by this means that load balancing is achieved.
- If this connection attempt fails, then the other addresses in the list are tried, in descending order of priority, as returned by Db2 for z/OS. This is how Db2 Connect exploits the Sysplex information to achieve fault tolerance.
- If all other attempts to connect fail, then Db2 Connect will try the connection to ALIASB using the address contained in the cataloged node directory.
The db2pd command with the sysplex parameter (db2pd -sysplex) can be used for retrieving information about servers associated with a Sysplex environment.