Uncategorized

Day to Day commands used by goldengate 26ai admin read&learn gg

Photo by Janusz Walczak on Unsplash

This blog gives a glimpse of the most useful commands and checks a goldengate admin would make in his day to day operations. I have been writing a series of blogs trying to teach golden gate 26ai to database professionals , kindly refer to my previous blogs in this series if you wish to learn more concepts.

info all

This is my goto command as soon as i login to the admin client. It shows me 2 things
1. Are all the services up and running (Administration Server , Distribution Server , Receiver Server , Performance Metrics Server )
2. How many Extracts or Replicats are there , are they running or abended or stopped , do they have a lag ?

This command mostly tells me what kind of golden gate deployment it is , if it only has extracts that means its a source database . If it only has replicats it means its a target database . If it has both (replicats and extracts ) It could either be a bidirectional setup or a cascading setup. Another important info i look up is the lag .

> info all
Program     Status      Group       Type                   Lag at Chkpt       Time Since Chkpt
 
ADMINSRVR   RUNNING
DISTSRVR    RUNNING
PMSRVR      RUNNING
RECVSRVR    RUNNING
EXTRACT     RUNNING     ESRC1       INTEGRATED                  00:00:02           00:00:09
REPLICAT    RUNNING     RSRC1       INTEGRATED                  00:00:00           00:00:02

“info distpath all” and “info distpath <distpath> detail”

These 2 commands tell me the distribution paths if it exists and the details about them. Lets take a look

>info distpath all
 dtrg1      running
 dtrg2      running

>info distpath dtrg1 detail

 Path Name: dtrg1
 Status: running
 Source: trail://myhost1.example.com:9202/services/v2/sources?trail=ESRC1/ea
 Target:  ws://myhost2.example.com:9203/services/v2/targets?trail=RTRG1/ra
....
....

With this info you will immediately come to know the source and the target hosts. Important thing to notice here is the “ws” or the “Web Socket” protocol enabled for target host . This means that a connection is continuously open between source and target servers for a seamless low latency transfer of trail files. It also tells me the directory where the source and target trail files are stored incase i ever have to check. Source directory $OGG_VAR_HOME/lib/data/ESRC1 and target trail file directory is $OGG_VAR_HOME/lib/data/RTRG1. Notice the port number in Source and Target urls, 9202 is port of distribution service on source and 9203 is port of receiver service on target.

“info extract <extname> detail” and “info replicat <repname> detail”

If i ever find lag during a “info all” check , i would immediately run these commands to check more details on the lag . Most of the times you may find a replicat lag and major cause of replicat lag is either a Long running transaction or a Barrier transaction. Replicats usually run with a higher degree of mapper or applier process. During replicat lags a key thing to notice is the “Log Read Checkpoint File RSRC1/ra000000007” and the RBA(Relative Byte Address) number .

If RBA is continuously increasing it means the trail files are getting processed . RBA is almost equivalent to the size of trail file (in bytes) , hence it gives an idea of how much trail file is read. If trail file number and RBA is stuck at a point for long duration , check the report of trail file to confirm if its a long running transaction. This command also gives out the path of “Report file” , “Parameter file” and “Error log” which are all crucial to check during an issue troubleshooting. You may also check the Error Log file

>info extract esrc1 detail

Extract    ESRC1     Last Started 2026-07-09 16:21   Status RUNNING
Checkpoint Lag       00:00:01 (updated 00:00:06 ago)
Process ID           xxxxxx
Log Read Checkpoint  Oracle Integrated Redo Logs
                     2026-07-22 09:42:16
                     SCN xxxx.xxxxx (xxxxxxx)

Current directory    /home/oracle

Report file          /u01/deploy_db/var/lib/report/ESRC1.rpt
Parameter file       /u01/deploy_db/etc/conf/ogg/esrc1.prm
Checkpoint file      /u01/deploy_db/var/lib/checkpt/ESRC1.cpe
Process file         /u01/deploy_db/var/run/ESRC1.pce
Error log            /u01/deploy_db/var/log/ggserr.log

>info replicat rsrc1 detail

2026-07-22T16:44:55Z  INFO    OGG-08100  INTEGRATED Replicat

Replicat   RSRC1     Last Started 2026-07-09 16:23   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:09 ago)
Process ID           xxxxx
Log Read Checkpoint  File RSRC1/ra000000007
                     2026-07-22 09:39:40.218441  RBA xxxxxx

Current Log BSN value: xxxxxx

Low Watermark CSN value: xxxxxxx
(All source transactions prior to this scn have been applied)

High Watermark CSN value: xxxxxxx
Current directory    /home/oracle

Report file          /u01/deploy_db/var/lib/report/RSRC1.rpt
Parameter file       /u01/deploy_db/etc/conf/ogg/rsrc1.prm
Checkpoint file      /u01/deploy_db/var/lib/checkpt/RSRC1.cpe
Process file         /u01/deploy_db/var/run/RSRC1.pce
Error log            /u01/deploy_db/var/log/ggserr.log

“view params <extname/repname>” / “edit params <extname/repname>”

These commands are useful to check the parameters set for an extract or a replicat and modify accordingly. Let me explain with few examples .
1) You have a continuous replicat backlog , you would want to check the degree of parallelism set for mapper and applier process and increase it if necessary using the edit command.
2) Someone pokes you ,hey i don’t see records getting replicated for a particular table , you might wanna view the parameter file of extract in source and replicat in target to see if its not commented.
3) If replicat is frequently abending , you might wanna see the value of “REPERROR” parameter and modify as needed.
There are many more examples you would encounter , which will allow you to use these commands.

>view params 
extract esrc1
USERIDALIAS admin DOMAIN OracleGoldenGate
EXTTRAIL ESRC1/ea
TRANLOGOPTIONS EXCLUDEUSER admin
 
--IE parameters
TRANLOGOPTIONS EXCLUDEUSER SYSTEM
TRANLOGOPTIONS EXCLUDEUSER SYS
TRANLOGOPTIONS EXCLUDETAG 00
REPORTCOUNT EVERY 10 MINUTES, RATE
STATOPTIONS REPORTFETCH, RESETREPORTSTATS
REPORT AT 02:00
REPORTROLLOVER AT 02:00
DISCARDROLLOVER at 00:00
BR BRDIR /ogg_home/var/run/BR
CACHEMGR CACHESIZE 2GB, CACHEDIRECTORY /deploy_db/var/lib/data/CACHEDIRECTORY
 
TABLE SAMPLE.EMPLOYEE;
TABLE SAMPLE.ADDRESS;

### This command opens the parameter file in "vi" editor mode
>edit params rsrc1
replicat rsrc1
USERIDALIAS oggadmin DOMAIN OracleGoldenGate
 
DISCARDROLLOVER at 00:00
DISCARDFILE rsrc1.dsc, APPEND, megabytes 500
REPERROR (2291, ABEND)
REPERROR (DEFAULT, DISCARD)
--REPERROR (DEFAULT, ABEND)
MAP_PARALLELISM 4
APPLY_PARALLELISM 4
 
-- Tables
HANDLECOLLISIONS
MAP SCOTT.table1, TARGET EMP.table1;
NOHANDLECOLLISIONS
MAP SCOTT.table2, TARGET EMP.table2;

“view report <extname/repname>”

This command is useful when you observer either a lag or a process abend issue . If an Extract or Replicat abends, drill to the bottom of the report to find the error . Also in case of a lag you may check for “long running transaction has started” in the info.

>view report esrc1
...
...
...
>view report rsrc1
...
...
...

“stats <extname/rptname>”

Stats command displays (Total / Daily / Hourly )statistics of tables for extract or replicat. Lets see below to get an idea what it displays.

>stats extract esrc1 daily
...
...
Extracting from  SCOTT.TABLE1 to SCOTT.TABLE1:

*** Daily statistics since 2026-07-28 00:00:00 ***
    Total inserts                       200.00
    Total updates                       300.00
    Total deletes                         2.00
    Total upserts                         0.00
    Total discards                        0.00
    Total operations                    502.00
...
...
...
> stats replicat rsrc1 hourly
Replicating from SCOTT.TABLE1 to SCOTT.TABLE1:

*** Hourly statistics since 2026-07-28 08:00:00 ***
    Total inserts                          517.00
    Total updates                          514.00
    Total deletes                            0.00
    Total upserts                            0.00
    Total discards                           10.00
    Total operations                       1041.00

Stats command lists down the operations which are replicated like inserts , updates , deletes and upserts . It also displays a unique operation called “discard”. It shows how many rows were discarded due to invalid column mappings or database constraints. Keep an eye on this number—ideally, it should be 0. If it isn’t, you should always investigate and fix the cause.

Conclusion

These commands will come in handy 99% of the time while managing goldengate . Only with hands on experience this blog would make more sense to you . Hope you have enjoyed this goldengate journey with my series of blogs so far.

Leave a Reply