DB2 Sysplex exploitation

 

In a typical scenario, a DB2 Connect™ server (server A) would be in conversation with a Sysplex containing two DB2® for OS/390® and z/OS® servers (servers B and C).
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 OS/390 and 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 OS/390 and 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

If the database connection to ALIASB fails, then an error message SQL30081N is issued, and the connection will be dropped. If a further connection request is received for ALIASB, DB2 Connect does the following:

  1. It tries the highest priority server from the cached list of addresses based on the priority information that was returned by DB2 for OS/390 and z/OS. This strategy is always used by DB2 Connect, and it is by this means that load balancing is achieved.

  2. If this connection attempt fails, then the other addresses in the list are tried, in descending order of priority, as returned by DB2 for OS/390 and z/OS. This is how DB2 Connect exploits the Sysplex information to achieve fault tolerance.

  3. If all other attempts to connect fail, then DB2 Connect will retry 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.

Parent topic: DB2 Connect Sysplex support

Related reference
db2pd - Monitor and troubleshoot DB2 database command