Gathering GoldenGate deployment status
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
Previous story
← Is slave_exec_mode idempotent actually idempotent?You May Also Like
These Related Stories
OPatchAuto Bug on 19.3 GI/RDBMS When Patching to 19.6
OPatchAuto Bug on 19.3 GI/RDBMS When Patching to 19.6
Oct 15, 2020 12:00:00 AM
7
min read
How reliable is autoupgrade.jar analyze mode?
How reliable is autoupgrade.jar analyze mode?
Nov 12, 2019 12:00:00 AM
2
min read
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 12:00:00 AM
8
min read
No Comments Yet
Let us know what you think