Configure Oracle GoldenGate autorstart in Non-RAC Environment with Grid Infrastructure and XAG.

If your database and golden gate are running on a server with Oracle Grid Infrastructure, you can use Oracle Grid Infrastructure Bundled Agent (XAG) for the autostart configuration of your GoldenGate instance.  XAG is a set of components that provide the HA framework and contains pre-defined Oracle Grid Infrastructure resource configurations and application agents for complete application HA. With XAG you don’t need to write your own scripts and configurations for GoldenGate integrating into Grid Infrasturcture CRS stack.

Hire is my experience with configuration of the GoldenGate instance into Grid Infrastructure in Non-RAC Oracle environment:

XAG installation

Although that the XAG is since GI version 12.1 a component of the Grid Infrastructure, in my case for a single host GI installation was the XAG  not propably configured .I decided to download and install the actual XAG version separately from GI_HOME.

  1. XAG can be downloaded from the Oracle Clusterware Downlad Page:

  1. Unzip downloaded file in a temporary directory:
  1. Change to the unpacked directory and install as oracle user the XAG into a new created XAG_HOME:
./ --install --directory /u01/app/oracle/product/xag


  1. Add GoldenGate  instance configuration into CRS.
agctl add goldengate gg_1 --gg_home /golden_gate/ogg --instance_type source --databases ora.ggsource.db --oracle_home /u01/app/oracle/product/12.1.0/dbhome_1 --jagent_autostart yes

If you use GoldenGate Monitoring Agent and you want to start it automatically with the GoldenGate instance, you must add –jagent_autostart yes to the configuration command(since GoldenGate version 12.2 Oracle removed autostart jagent parameter from the manager process configuration).  For monitoring Agent is important that the default JVM version on the system is greater as minimal required for the agent. OpenJDK can’t be used for the monitoring agent!

crsctl stat res -t shows that the new resource was successful configured:

[root@gg1 gg1]# crsctl stat res -t


Name           Target  State        Server                   State details      


Local Resources



               ONLINE  ONLINE       gg1                      STABLE


               ONLINE  ONLINE       gg1                      STABLE


               ONLINE  ONLINE       gg1                      Started,STABLE


               OFFLINE OFFLINE      gg1                      STABLE


Cluster Resources



      1        ONLINE  ONLINE       gg1                      STABLE


      1        OFFLINE OFFLINE                               STABLE


      1        ONLINE  ONLINE       gg1                      STABLE


      1        ONLINE  OFFLINE                               Instance Shutdown,ST



      1        ONLINE  OFFLINE                               STABLE


      1        OFFLINE OFFLINE                               STABLE


Starting of the Oracle GoldenGate instance.

Now we want to start our GoldenGate Instance with the GridInfrastructure:

crsctl start res xag.gg_1.goldengate

But…It’s not working.

A look into a ggserror.log file:

2016-10-19 15:16:25  ERROR   OGG-00664  Oracle GoldenGate Manager for Oracle, mgr.prm:  OCI Error beginning session (status = 1034-ORA-

01034: ORACLE not available

ORA-27101: shared memory realm does not exist

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3640

Additional information: -1977179833).

2016-10-19 15:16:25  ERROR   OGG-01668  Oracle GoldenGate Manager for Oracle, mgr.prm:  PROCESS ABENDING.

=> Check the target database: the database is available.

Look into the XAG log file (locates in the directory XAG_HOME/log)

2016-10-19 15:04:55: executing cmd: /u01/app/12.1.0/grid_1/bin/crsctl status res ora.ggsource.db -f

2016-10-19 15:04:55: GEN_USR_ORA_INST_NAME\@SERVERNAME\(gg1\)

2016-10-19 15:04:55: getting instancename using GEN_USR_ORA_INST_NAME@SERVERNAME(gg1) on ora.ggsource.db

2016-10-19 15:04:55: Exported ORACLE_SID ora.ggsource.db


The XAG uses the GI database resource name ora.ggsource.db instead of the real db instance name ggsource. I looked into the XAG scripts and found the following functionality: To recognize the database SID the XAG reads all CRS configuration attributes for the used database and takes as the SID a value of the  GEN_USR_ORA_INST_NAME@SERVERNAME(<host>) property. It works for RAC but not for single host oracle GI installation. For Non-RAC environment is the value empty and in this case uses the XAG the CRS database resource name as the ORACLE_SID.

To fix it in the current XAG Version you need to modify the file in the XAG_HOME directory.

Open the file and find the following lines,

                          $nodeName . ')';

comment they out, and insert after the lines the functionality replacement for single host environment.

        my $sidAttrName = 'GEN_USR_ORA_INST_NAME';

You will have now the following code block:

      #my $sidAttrName = 'GEN_USR_ORA_INST_NAME@SERVERNAME(' .
      #                    $nodeName . ')';
      my $sidAttrName = 'GEN_USR_ORA_INST_NAME';

Now we can start our GoldenGate instance as a GI resource.

crsctl start res xag.gg_1.goldengate

      1        ONLINE ONLINE                               STABLE


[oracle@gg1 ogg]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version OGGCORE_12.
Linux, x64, 64bit (optimized), Oracle 12c on Nov 11 2015 03:53:23
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.

GGSCI (gg1) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s