HP Serviceguard Toolkits for Database Replication Solutions manual Creating packages

Page 39

To provide high availability only to primary database

Figure 14 HA to Primary Database

This configuration provides High Availability (HA) to primary databases. In Figure 14 (page 39), DB2 primary database is configured in a volume group shared between Node1 and Node2 in a Serviceguard cluster. The standby database is running on Node3 placed outside the cluster. The primary package is configured to run either on Node1 or Node2 and running on Node1. The standby database is not packaged using DB2 HADR toolkit.

This configuration does not provide the role management feature for DB2 HADR toolkit. Thus, the package does not handle automatic role takeover or role switch. HA to primary database is provided through failover. If primary database fails on Node1, Serviceguard brings up the primary database on Node2. The client node cannot connect to the database until it comes up on Node2. In this configuration, set the ROLE_MANAGEMENT attribute to [no].

Creating packages

To create the primary and standby package:

1.Create a directory in /etc/cmcluster, for example, /etc/cmcluster/hadr_primary.

2.Go to the /etc/cmcluster/hadr_primary directory.

3.Create the DB2 HADR packages (both primary and standby). To use two Serviceguard toolkit modules, the ECMT DB2 toolkit module and the HADR toolkit module, run the following command:

cmmakepkg –m ecmt/db2/db2 –m tkit/db2hadr/db2hadr pkg.conf

In this command,

cmmakepkg is the Serviceguard command to create the package

ecmt/db2/db2 is the name of the ECMT DB2 toolkit module

tkit/db2hadr/db2hadr is the name of the DB2 HADR toolkit module

pkg.conf is the name of the package configuration file. Edit this file and apply using the cmapplyconf command to apply the package.

Using the DB2 HADR toolkit 39

Image 39
Contents HP Part Number Published August Edition Page Contents Glossary Index Introduction Advantages OverviewSupported configuration DependenciesSingle-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 GuardHigh availability for data guard broker Setting up Oracle Data Guard toolkitInstalling and uninstalling Oracle Data Guard toolkit # swinstall -s depot path# 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 toolkitTroubleshooting Pkg.conf commandLimitations 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 clustersCmmakepkg -m ecmt/db2/db2 -m tkit/db2hadr/db2hadr pkg.conf Creating packagesTo provide high availability only to primary database Go to the /etc/cmcluster/hadrprimary directoryInstancename Hadrip And, $ cmmodpkg -e hadrpkg Managing packagesRunning packages Maintaining packages# cmhaltpkg packagename Halting packagesHost key verification failed. Lost connection Limitations Information to collect before contacting HP How to contact HPRelated information Typographic conventions Warranty informationHP authorized resellers Documentation feedbackTIP Node2# /usr/bin/ssh-keygen -t rsa Db2 get db cfg for db2 database name grep -i hardNode3# /usr/bin/ssh-keygen -t rsa Node3# /usr/bin/ssh-keygen -t dsaPage To add a new key to/home/user/.ssh/knownhosts Page Glossary Index