Gathering GoldenGate deployment status
The objective of this post is to demonstrate how to gather existing GoldenGate deployment status. The rationale is to gather all the pertinent information for GoldeGate deployment using RAC in order to relocate the GoldenGate trail from DBFS to ACFS file system. Although the deployment gathering can be performed manually, I have chosen to script as much of the process as possible since this will be performed for multiple environments versus just one. Implementation created is also reusable for troubleshooting; hence, the work is not in vain. WARNING: gi.env is used to dynamically source ASM instance provided the following requirements are met: Last character from short host name must match ASM instance number. Acceptable: racnode-dc1-1/+ASM1 and racnode-dc1-2/+ASM2 UNAcceptable: host05/+ASM1 and host06/+ASM1 I chose to create gi.env so that the script can be deployed in any environment with the least possible change as long as the requirements above are met. $ cat gi.env
set +x
unset ORACLE_UNQNAME
h=$(hostname -s)
n=1
. oraenv <<< +ASM${h:${#h} - $n}
export GRID_HOME=$ORACLE_HOME
env|egrep 'ORACLE|GRID'
sysresv|tail -1
From ogg_status.sh, grid (+ASM[n]) is sourced using gi.env. $ cat ogg_status.sh
#!/bin/sh -ex
# MDinh : Feb 2019
. ~/working/dinh/gi.env
set -x
agctl query releaseversion
agctl query deployment
agctl status goldengate gg_xx
agctl config goldengate gg_xx
crsctl stat res -t|egrep -A2 'acfs|dbfs|xag'
crsctl stat res -t -w 'TYPE = ora.acfs.type'
crsctl stat res -t -w 'TYPE = xag.goldengate.type'
crsctl stat res -t -w 'TYPE = app.appvipx.type'
crsctl stat res -t -w 'TYPE = local_resource'
crsctl stat res -w "TYPE = xag.goldengate.type" -p|awk -F'=' '$2'
exit
Ideally, instead of hard coding goldengate instance_name (gg_xx) it can be determined using:
$ crsctl stat res -w 'TYPE = xag.goldengate.type'
NAME=xag.gg_xx.goldengate
TYPE=xag.goldengate.type
TARGET=ONLINE
STATE=ONLINE on host01
For now, I did not want to complicate the script too much. Here is a demo from the script. Do you see any potential issues from the output?
$ ./ogg_status.sh + . /home/oracle/working/dinh/gi.env ++ set +x ORACLE_SID = [+ASM1] ? The Oracle base remains unchanged with value /u01/app/oracle ORACLE_SID=+ASM1 ORACLE_BASE=/u01/app/oracle GRID_HOME=/u02/app/12.1.0/grid ORACLE_HOME=/u02/app/12.1.0/grid Oracle Instance alive for sid "+ASM1" + agctl query releaseversion The Oracle Grid Infrastructure Agents release version is 3.1.0 + agctl query deployment The Oracle Grid Infrastructure Agents deployment is bundled + agctl status goldengate gg_xx Goldengate instance 'gg_xx' is running on host01 + agctl config goldengate gg_xx GoldenGate location is: /u03/app/gg/12.2.0 GoldenGate instance type is: target Configured to run on Nodes: host01 host02 ORACLE_HOME location is: /u01/app/oracle/product/12.1.0/db_1 File System resources needed: dbfs_mount Extracts to monitor: Replicats to monitor: Critical extracts: Critical replicats: Autostart on DataGuard role transition to PRIMARY: no Autostart JAgent: no + egrep -A2 'acfs|dbfs|xag' + crsctl stat res -t dbfs_mount ONLINE ONLINE host01 STABLE OFFLINE OFFLINE host02 STABLE -- ora.dbfs.db 1 ONLINE ONLINE host01 Open,STABLE 2 ONLINE ONLINE host02 Open,STABLE -- xag.gg_xx-vip.vip 1 ONLINE ONLINE host01 STABLE xag.gg_xx.goldengate 1 ONLINE ONLINE host01 STABLE -------------------------------------------------------------------------------- + crsctl stat res -t -w 'TYPE = ora.acfs.type' + crsctl stat res -t -w 'TYPE = xag.goldengate.type' -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- xag.gg_xx.goldengate 1 ONLINE ONLINE host01 STABLE -------------------------------------------------------------------------------- + crsctl stat res -t -w 'TYPE = app.appvipx.type' -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- xag.gg_xx-vip.vip 1 ONLINE ONLINE host01 STABLE -------------------------------------------------------------------------------- + crsctl stat res -t -w 'TYPE = local_resource' -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- dbfs_mount ONLINE ONLINE host01 STABLE OFFLINE OFFLINE host02 STABLE -------------------------------------------------------------------------------- + awk -F= '$2' + crsctl stat res -w 'TYPE = xag.goldengate.type' -p NAME=xag.gg_xx.goldengate TYPE=xag.goldengate.type ACL=owner:ggsuser:rwx,pgrp:dba:r-x,other::r-- ACTION_SCRIPT=%CRS_HOME%/bin/aggoldengateas ACTION_TIMEOUT=60 AGENT_FILENAME=%CRS_HOME%/bin/scriptagent AUTO_START=restore CARDINALITY=1 CHECK_INTERVAL=30 CLEAN_TIMEOUT=60 DATAGUARD_AUTOSTART=no DEGREE=1 DELETE_TIMEOUT=60 DESCRIPTION="Oracle GoldenGate Clusterware Resource" ENABLED=1 FAILURE_INTERVAL=600 FAILURE_THRESHOLD=5 FILESYSTEMS=dbfs_mount GG_HOME=/u03/app/gg/12.2.0 GG_INSTANCE_TYPE=target HOSTING_MEMBERS=host01 host02 INSTANCE_FAILOVER=1 JAGENT_AUTOSTART=no LOAD=1 LOGGING_LEVEL=1 MODIFY_TIMEOUT=60 ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1 PLACEMENT=restricted RELOCATE_BY_DEPENDENCY=1 RESTART_ATTEMPTS=5 SCRIPT_TIMEOUT=60 START_DEPENDENCIES=hard(xag.gg_xx-vip.vip,dbfs_mount) pullup(xag.gg_xx-vip.vip,dbfs_mount) START_TIMEOUT=300 STOP_DEPENDENCIES=hard(xag.gg_xx-vip.vip,intermediate:dbfs_mount) STOP_TIMEOUT=300 UPTIME_THRESHOLD=10m USER_WORKLOAD=no VERSION=2 VIP_CREATED=1 VIP_NAME=xag.gg_xx-vip.vip + exitIn conclusion, scripting the process with some simple automation will provide better efficiencies to review and troubleshoot GoldenGate deployment for RAC on DBFS or ACFS.
Share this
You May Also Like
These Related Stories
Moving Oracle Datafiles to a ZFS Filesystem with the Correct Recordsize
Moving Oracle Datafiles to a ZFS Filesystem with the Correct Recordsize
Aug 19, 2009
8
min read
Migrating btrfs root partition to ext4 in OVM
Migrating btrfs root partition to ext4 in OVM
Oct 18, 2018
2
min read
After the migration: How to get the most out of your Google Cloud migration
After the migration: How to get the most out of your Google Cloud migration
Jan 24, 2023
3
min read
No Comments Yet
Let us know what you think