Gathering GoldenGate deployment status

1 min read
Feb 26, 2019 12:00:00 AM

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.


Strategic Automation: The Rationale for Scripting

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 

Orchestrating the Status Check: ogg_status.sh

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 

Execution and Diagnostic Output

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  + exit 

Conclusion: Driving Efficiency in RAC Environments

In conclusion, scripting the process with some simple automation will provide better efficiencies to review and troubleshoot GoldenGate deployment for RAC on DBFS or ACFS.

Oracle Database Consulting Services

Ready to optimize your Oracle Database for the future?

{% module_block module "widget_15ebcc88-fca5-4743-9cd8-73f2e3edc6ca" %}{% module_attribute "button" is_json="true" %}[{"size":"large","shape":"default","tooltip":{"block_properties":{"text_align":"center","width":"200"},"color":"accent","placement":"top","placement_fallback":"","show_as_block":false,"trigger":"on-hover"},"fill":"fill","color":"accent","gradient_end":{"color":"#0099FF","css":"#0099FF","hex":"#0099FF","opacity":null,"rgb":"rgb(0, 153, 255)","rgba":"rgba(0, 153, 255, 1)"},"text":"Speak with our Oracle Database consultants -> ","internal_name":"Button","solid_color":{"color":"#2BBAD6","css":"#2BBAD6","hex":"#2BBAD6","opacity":null,"rgb":"rgb(43, 186, 214)","rgba":"rgba(43, 186, 214, 1)"},"text_color":{"color":"#ffffff","css":"#ffffff","hex":"#ffffff","opacity":null,"rgb":"rgb(255, 255, 255)","rgba":"rgba(255, 255, 255, 1)"},"gradient_fallback":{"color":"#2BBAD6","css":"#2BBAD6","hex":"#2BBAD6","opacity":null,"rgb":"rgb(43, 186, 214)","rgba":"rgba(43, 186, 214, 1)"},"gradient_start":{"color":"#38C9C4","css":"#38C9C4","hex":"#38C9C4","opacity":null,"rgb":"rgb(56, 201, 196)","rgba":"rgba(56, 201, 196, 1)"},"add_icon":false,"icon":{"icon":{"icon_set":"fontawesome-5.14.0"},"icon_position":"right","icon_size":60},"type":"link","link":{"no_follow":false,"open_in_new_tab":true,"rel":"noopener","sponsored":false,"url":{"content_id":null,"href":"https://pythian.com/oracle-consulting-services/oracle-database-consulting-services","href_with_scheme":"https://pythian.com/oracle-consulting-services/oracle-database-consulting-services","type":"EXTERNAL"},"user_generated_content":false}}]{% end_module_attribute %}{% module_attribute "child_css" is_json="true" %}{}{% end_module_attribute %}{% module_attribute "css" is_json="true" %}{}{% end_module_attribute %}{% module_attribute "definition_id" is_json="true" %}null{% end_module_attribute %}{% module_attribute "field_types" is_json="true" %}{"button":"group","settings":"group","wrapper":"group"}{% end_module_attribute %}{% module_attribute "label" is_json="true" %}null{% end_module_attribute %}{% module_attribute "module_id" is_json="true" %}189729484136{% end_module_attribute %}{% module_attribute "path" is_json="true" %}"/Pythian-Act3/modules/button"{% end_module_attribute %}{% module_attribute "schema_version" is_json="true" %}2{% end_module_attribute %}{% module_attribute "smart_objects" is_json="true" %}[]{% end_module_attribute %}{% module_attribute "smart_type" is_json="true" %}"NOT_SMART"{% end_module_attribute %}{% module_attribute "tag" is_json="true" %}"module"{% end_module_attribute %}{% module_attribute "type" is_json="true" %}"module"{% end_module_attribute %}{% module_attribute "wrap_field_tag" is_json="true" %}"div"{% end_module_attribute %}{% end_module_block %}

 

On this page

Ready to unlock value from your data?

With Pythian, you can accomplish your data transformation goals and more.