HP Serviceguard Toolkits for Database Replication Solutions User Guide, March 2012

Figure 15 Primary and standby packages in the same cluster to perform only role management
In this configuration, primary and standby packages are configured in the same cluster to provide
automatic role management at the database level. Here, if any one of the primary databases fail,
corresponding standby database package performs role takeover without impacting other databases.
In Figure 15, HADR is configured between primary and standby databases. It is mandatory to set
the ROLE_MANAGEMENT attribute to [yes]. The DB2 instance is packaged using ECMT DB2 toolkit
and HADR is packaged using the DB2 HADR toolkit. Node1 and Node2 are configured for primary
and standby databases, respectively. The HADR packages are dependent on the respective ECMT
DB2 package. On Node1, two databases, Sample1 and Sample2 are configured under Instance1.
On Node2, standby databases are configured for Sample1 and Sample2.
Node 1 consists of ECMT DB2 Package1, Primary Package1 and Primary Package2. ECMT DB2
Package1 manages the DB2 instance, Instance1. Primary Package1 and Primary Package2
manages HADR configured for Sample1 and Sample2, respectively. HADR primary packages on
Node1 are dependent (same node dependency) on the ECMT DB2 package1. Similarly, Node2
consists of ECMT DB2 Package2, Standby Package1, Standby Package2. ECMT DB2 Package2
manages the DB2 instance, Instance1. Standby Package1 manages HADR configured for Sample1
and Standby Package2 manages Sample2.
The standby HADR package performs the role takeover when the corresponding HADR primary
package fails.
A role switch operation can be configured for the primary and standby packages to restore the
original role of the databases. As soon as the failed database comes online, the standby package
starts monitoring the connection status of HADR. When the connection status changes to peer, the
standby package performs role switch.
The toolkit does not perform any role takeover when the primary package is halted using the
cmhaltpkg command. The standby package takes over the role only if the primary package fails
or if the primary node crashes.
In this configuration, the DB2 HADR toolkit handles the following events:
NOTE: Packages in Event 1–4 are initially in the “Online” state. The Online state, is the state
where both the packages are up and running, the primary HADR send logs to the standby HADR,
and both databases are in the “Peer” state.
Event 1: Standby HADR package fails
40 Serviceguard toolkit for DB2 High Availability Disaster Recovery