Pages

Tuesday, January 2, 2024

High Availability Architecture implementation Commands - Part 1

 High Availability Architecture implementation Commands:

Environment Details: 


Source Cluster:

 It is two node cluster and Grid Home & database versions are 19c


Node1 → sourcedb01.oracle.com

Node2 → sourcedb02.oracle.com


Source DB Name: sourcedb


Target Cluster:

 It is two node cluster and Grid Home & database versions are 19c


Node1 → targetdb01.oracle.com

Node2 → targetdb02.oracle.com


Target DB Name: targetdb


Installed Goldengate Version: 19

Architecture: Classic Architecture


Source side GG services: EXT, PMP are extract and pump processes.

Target side GG services: REP is the replicat process.


Note: This implementation is considered that unidirectional goldengate replication is already setup and only implementing HA for Goldengate services. 



Implementation Steps:

  1. Download XAG agent binaries.
    What is XAG: Oracle Grid Infrastructure Bundled Agents (XAG) are Oracle Grid Infrastructure components that provide the HA framework to application resources and resource types managed through the bundled agent management interface, AGCTL.
    https://www.oracle.com/database/technologies/xag-agents-download.html

  2. To configure Grid agent, application vip resource is needed, select a free ip from cluster’s public network and assign it to a vip host.

Source cluster application vip is gg-sourcedb-vip.oracle.com

Target Cluster Application vip is gg-targetdb-vip.oracle.com

Note: These application vip names should be added in the DNS before the configuration.

  1. XAG installation

Copy the downloaded zip file in step-1 to source and target cluster nodes ( sourcedb01, sourcedb02, targetdb01 & targetdb02 ) stage directory and follow below steps in all the nodes.


  1. Unzip the file to stage directory:


$ cd /u01/app/oracle/xag_stage

$ unzip -q p31215432_190000_Generic.zip



  1. Create XAG installation directory:

$ mkdir -p /u01/app/oracle/xag

  1. Add XAG agent to PATH variable and also update the .bash_profile for persistence:


$ export PATH=$PATH:/u01/app/oracle/xag/bin



  1. Install XAG agent:

$ cd /u01/app/oracle/xag_stage/xag

$ ./xagsetup.sh --install --directory \

/u01/app/oracle/xag --all_nodes



  1. Verify the XAG agent release version after installation


$ agctl query releaseversion




  1.  Add service & TNS alias as mentioned below.

Commands for Goldengate source database: 


Run below commands from grid home owner:


$ srvctl add service -db SOURCEDB -service SOURCEDB_OGG -role PRIMARY -preferred SOURCEDB1 -available SOURCEDB2        



$ srvctl start service -db SOURCEDB -service SOURCEDB_OGG



$ srvctl status service -db SOURCEDB -service SOURCEDB_OGG



Node-1 TNS Names:


SOURCEDB_OGG=

   (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = sourcedb01.oracle.com)(PORT = 1521))

    (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = sourcedb_ogg)))


Node-2 TNS Names:


SOURCEDB_OGG=

   (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = sourcedb02.oracle.com)(PORT = 1521))

    (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = sourcedb_ogg)))


Verify the service status using crsctl from Grid Home:

$ crsctl stat res | grep -i sourcedb_ogg


NAME=ora.sourcedb.sourcedb_ogg.svc → Command Output



Commands for Goldengate Target database: 


Run below commands from grid home owner:


$ srvctl add service -db TARGETDB -service TARGETDB_OGG -role PRIMARY -preferred TARGETDB1 -available TARGETDB2        



$ srvctl start service -db TARGETDB -service TARGETDB_OGG

$ srvctl status service -db TARGETDB -service TARGETDB_OGG



Node-1 TNS Names:


TARGETDB_OGG=

   (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = targetdb01.oracle.com)(PORT = 1521))

    (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = targetdb_ogg)))


Node-2 TNS Names:


TARGETDB_OGG=

   (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = targetdb02.oracle.com)(PORT = 1521))

    (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = targetdb_ogg)))


Verify the service status using crsctl:

$ crsctl stat res | grep -i targetdb_ogg


NAME=ora.targetdb.targetdb_ogg.svc → Command Output





No comments:

Post a Comment