Extracting DML Stats With GGate

Hi all,

After having GoldenGate setup in your environment, on of the most frequent questions you most likely face is how much work is being done by your GGate environment. Or even you may want to set up some dummy extraction just to measure it before start your GGate implementation project.

GoldenGate provides stats command to report the work which is done. It’s recommended to reset the counters/stats before any testing you want or before start gathering, for better outputs.

The retrieving can be done for the total (since last reset), daily or even on table level, as per below:

1. Reset counters/stats:

stats extract ext_test, reset

2. Retrieve stats for a Table since Reset:

stats extract ext_test, table owner1.test, latest

3. Retrieve stats Total since last start of extract:

stats extract ext_int, totalsonly owner1.test

4. Retrieve stats from the day of a table:

stats extract ext_int, daily, table owner1.test

5. Retrieve stats from the day of all schema tables configured on extract:

stats extract ext_int, daily, table owner1.*

 

Example of Output:

GGSCI (myserver.local) 1> stats ext_test total daily

Sending STATS request to EXTRACT EXT_TEST ...

Start of Statistics at 2019-12-16 15:21:56.

Output by User Exit:

Extracting from OWNER1.TABLE1 to OWNER1.TABLE1:

*** Total statistics since 2019-12-16 07:18:14 ***
        Total inserts                                   2744.00
        Total updates                                      0.00
        Total deletes                                    300.00
        Total discards                                     0.00
        Total operations                                3044.00

*** Daily statistics since 2019-12-16 07:18:14 ***
        Total inserts                                   2744.00
        Total updates                                      0.00
        Total deletes                                    300.00
        Total discards                                     0.00
        Total operations                                3044.00

More about it?
Here: https://docs.oracle.com/goldengate/1212/gg-winux/GWURF/ggsci_commands030.htm#GWURF216

Hope it Helps!

GGATE ABBENDED: ORA-00308: Cannot Open Archived Log

Hi all!
Ok, so this is one of the most common issues for GGate administration. How to solve it? Easy thing.

First let’s understand what it means: It means the redologs don’t have the required information (assuming integrated) and you have already deleted archivelogs the extract needs. Why? Probably because you already backed up those archivelogs and they were not needed for the database anymore.

Unfortunately we don’t have any kind of ARCHIVELOG DELETION POLICY to guarantee extracts had already read it, like we have for Dataguard. So, what can we do?

Restore the missing archivelogs.

But first let’s confirm on the errors. Some examples:

ERROR OGG-00446 Oracle GoldenGate Capture for Oracle, ext1.prm: Opening ASM file +ARCH/2_11055_742755632.dbf in DBLOGREADER mode: (308) ORA-00308: cannot open archived log '+ARCH/2_11055_742755632.dbf' ORA-17503.

or

ERROR OGG-01028 Oracle GoldenGate Capture for Oracle,ext1.prm: Getting attributes for ASM file +ARCH/2_86720_716466928.dbf,

SQL : (15056)

ORA-15056: additional error message ORA-15173: entry '2_86720_716466928.dbf' does not exist in directory '/...


SOLUTION
:

Restore all archive logs starting from recovery checkpoint until the current checkpoint and restart the extract:
More“GGATE ABBENDED: ORA-00308: Cannot Open Archived Log”