How do we configure GoldenGate replication to read from Oracle Data Guard Standby

How do we configure GoldenGate replication to read from Oracle Data Guard Standby
How do we configure GoldenGate replication to read from Oracle Data Guard Standby

In this article we will see how we can set one up extract process so that it can export its trail files from the Standby logs without affecting the Primary. This way is called Classic Capture in Active Data Guard (ADG) only mode.

As the name suggests, the extract process it cannot work in integrated but only in the old classic capture (we can read the differences between integrated and classic capture here).

The limitations don't end here as we can't replicate compressed tables and we can't enable supplemental logging on only a specific table (add trandata) and we need to enable it in the whole schema (add schematrandata).

We can read the limitations of ADG mode here.

The prerequisites

For this article we assume that we already have a complete GoldenGate installation.

How to install and configure can be read in the article here.

Then we must have installed the GoldenGate software on Standby or have it on a shared disk.

The footsteps

In this particular installation we have chosen to have GoldenGate installed on a shared disk, so we will have to raise the GoldenGate manager from StandBy.

Go to the folder where the installation is located (we have passed the path to the environment) and connect to the GoldenGate interface:

cd $GGHOME

ggsci

We start the manager:

start manager

After starting the manager, we should connect through the ggsci of the Standby to the Primary in order to activate the supplemental logging (we do not have the option from the Standby):

dblogin useridalias ggadmin
add schematrandata stratos

Then we create the credentialstore that will connect to the Standby (where oracledb_dr is the tnsnames entry for the Standby):

add credentialstore
alter credentialstore add user ggadmin@oracledb_dr alias ggadmin_dr

Then we connect with the alias we made in Standby:

dblogin useridalias ggadmin_dr

Then we edit the extract and add it TRANLOGOPTION MINEFROMACTIVEDG:

edit param ora_ext
EXTRACT ora_ext
USERIDALIAS ggadmin_dr
TRANLOGOPTION MINEFROMACTIVEDG
RMTHOST sqlserverhost.mshome.net, MGRPORT 7809
RMTTRAIL ./dirdat/aa
TABLE STRATOS.*;

Then we are careful by registering the extract not to put the integrated parameter as we said it should be classic capture:

add extract ora_ext, tranlog, begin now
add rmttrail ./dirdat/aa , ext ora_ext

That's it, now replication will be done from Standby, all we have to do is start the extract process:

start ora_ext

Sources:

Share it

Leave a reply