Skip to content

How to Check if GoldenGate is in Sync

  • by

Is Data in Sync?

After building OGG data synchronization, we'd like to make sure all EXTRACT log are applied to the REPLICAT database in Oracle GoldenGate. Let's see current status.

[oracle@boston ~]$ cd $OGG_HOME
[oracle@boston ogg]$ ./ggsci
...
GGSCI (boston) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     R_ERPAPP    00:00:08      00:00:00

As you can see, there's a lag at checkpoint about 8 seconds, which means not all data has been applied to the standby database. Actually, a few seconds of apply lag is pretty normal in a busy database. So, how do we verify that the data is in sync between source and target databases?

Solution

To confirms that REPLICAT server has processed all logs from the data source at run-time. We can send REPLICAT a LOGEND check message to the process.

GGSCI (boston) 2> send R_ERPAPP, LOGEND

Sending LOGEND request to REPLICAT R_ERPAPP ...
NO.

GGSCI (boston) 3> send R_ERPAPP, LOGEND

Sending LOGEND request to REPLICAT R_ERPAPP ...
NO.

...

After several NO, we saw a positive answer finally.

GGSCI (boston) 5> send R_ERPAPP, LOGEND

Sending LOGEND request to REPLICAT R_ERPAPP ...
YES.

A returned YES can confirm that the replicat has applied all changes from the extract, so far. In a very dynamic environment, you might see hundreds of NO before a YES.

For newer Oracle GoldenGate, you should use adminclient instead of ggsci. There're differences between adminclient and ggsci, you may take a look.

Leave a Reply

Your email address will not be published.