HP Serviceguard Toolkits for Database Replication Solutions manual Event 2 Primary package fails

Page 37

If either the standby database or the standby HADR is down, the standby package fails on Node2. In this case, the standby package logs a failure message in the package log and sends an email if the ALERT_MAIL_ID package attribute is set.

The primary package continues to run. Standby is not connected to the primary database, so the primary package logs a warning message, Standby disconnected and sends an email if ALERT_MAIL_ID package attribute is set. The standby package fails over to Node1. After primary HADR re-establishes the connection, the primary package logs another message to the package log intimating that the connection is re-established.

If the standby package is halted manually, the primary package logs a warning message, Standby disconnected and sends an email if ALERT_MAIL_ID package attribute is set.

Event 2: Primary package fails

If the primary package fails, either because the DB2 database monitoring or the primary HADR has failed, the package fails on that node. If ROLE_MANAGEMENT attribute is set to [yes], the standby HADR package performs a role takeover and becomes the new primary database. The role takeover is done using the [by force] option. The standby package logs success or failure of the role takeover to the package log, and if ALERT_MAIL_ID package attribute is set, an email is sent to the mail ID. Simultaneously, primary package fails over to Node1. While primary package starts on Node1, standby package does a role takeover. In this case, primary package starts HADR as standby. After the new primary database is up, all database clients reconnect to this database using the Automatic Client Reroute feature of DB2 HADR. When primary package fails and the ROLE_MANAGEMENT attribute is set to [no], standby package does not perform a role takeover. If failover is enabled for the package, primary package fails over to Node1 and starts HADR as primary.

Event 3: The node on which the primary database is running crashes

Consider ROLE_MANAGEMENT attribute is set to [yes]. In this state, if Node2 crashes, the standby HADR package uses the by force option to perform a role takeover, and becomes the new primary database. Standby package logs success or failure of role takeover in the package log and if ALERT_MAIL_ID package attribute is set, email is sent to the mail ID. Simultaneously, primary package fails over to Node1. While primary package starts on Node1, the standby package completes the role takeover process. In this case, primary package starts HADR as standby. After the new primary database is up, all database clients reconnect to this database using the Automatic Client Reroute feature of DB2 HADR.

If the ROLE_MANAGEMENT attribute is set to [no], behavior is the same as in Event 2.

Event 4: Primary package is manually halted

If the primary package is halted using the cmhaltpkg command, the standby package does not perform a role takeover. The standby package continues to stay up but logs a message in the package log stating that the primary package is manually halted and sends an email to the mail ID with the Primary disconnected message. There is no other impact on the standby package when the primary package is halted manually.

Event 5: The failed primary package restarts on the primary node

This scenario is a continuation of Event 3 and 4. After the initial role takeover, the original primary package attempts to start as the primary package. The primary package fails to come up as the primary package because a role takeover was performed when the primary package went down, and the original standby package is now running as primary HADR. In this case the package attempts to come up as standby. However, if it fails to come up as standby, it halts the package but if it is successful, it performs the following tasks:

1.Syncs up with the primary HADR and retrieves all the pending DB2 database archive logs. This is a HADR feature and toolkit does not perform this task.

2.After the logs are in sync, the HADR on both nodes move to the Peer state.

Using the DB2 HADR toolkit 37

Image 37
Contents HP Part Number Published August Edition Page Contents Glossary Index Introduction Advantages OverviewDependencies Supported configurationSingle-instance Oracle database Cmmakepkg -i pkgasciifile -m modulefilename outputfilename RAC environment RAC environmentServiceguard toolkit for Oracle Data Guard Data Guard replication between RAC primary and RAC standby Continentalclusters environment Continentalclusters environment Metrocluster and extended distance cluster environments Supported configuration Data Guard setup in an EDC environment Three data center configuration Multiple Data Guard instances in each Serviceguard cluster Configuring multiple instances of Oracle Data GuardInstalling and uninstalling Oracle Data Guard toolkit Setting up Oracle Data Guard toolkit# swinstall -s depot path High availability for data guard broker# swlist -l product T2259AA Files for the ADF module Activestandby Package attributes Configuring Oracle Data Guard toolkitFor example, /etc/cmcluster/pkg/dgpkg Single-instance environmentSetting up Oracle Data Guard toolkit #ecmt/oracle/oracle/LISTENERRESTART Servicefailfastenabled no servicehalttimeout For example, /etc/cmluster/pkg/racdgpkg RAC environmentWhere ocmnp is the Smnp package for Oracle CLusterware Maintaining Oracle Data Guard toolkit Adding the package to the Serviceguard clusterSingle-instance environment Cluster verification for Oracle Data Guard toolkitPkg.conf command TroubleshootingLimitations Startstandbyasprimary to yes Prerequisites Supported configuration Using the DB2 Hadr toolkitEvent 1 Standby database or Hadr goes down When primary and standby packages are in the same clusterEvent 2 Primary package fails Primary and Standby Packages in Different Clusters When primary and standby packages are in different clustersTo provide high availability only to primary database Creating packagesGo to the /etc/cmcluster/hadrprimary directory Cmmakepkg -m ecmt/db2/db2 -m tkit/db2hadr/db2hadr pkg.confInstancename Hadrip Running packages Managing packagesMaintaining packages And, $ cmmodpkg -e hadrpkg# cmhaltpkg packagename Halting packagesHost key verification failed. Lost connection Limitations Information to collect before contacting HP How to contact HPHP authorized resellers Warranty informationDocumentation feedback Related information Typographic conventionsTIP Node3# /usr/bin/ssh-keygen -t rsa Db2 get db cfg for db2 database name grep -i hardNode3# /usr/bin/ssh-keygen -t dsa Node2# /usr/bin/ssh-keygen -t rsaPage To add a new key to/home/user/.ssh/knownhosts Page Glossary Index