top of page

Runbook: GoldenGate Trail Files Not Purged — Oldest_Chkpt_Seqno 0 and a Stale EXTTRAIL Registration

OmerNarman
Nov 9
9 min read

Nov 9, 2026 · @Omer Narman

A Manager with correct PURGEOLDEXTRACTS rules left five months of trail files on disk because a second Extract carried a never-used registration of the same trail at sequence 0. This runbook walks through the diagnosis in GGSCI, the one-line root cause, and a safe fix for Oracle GoldenGate 19c Classic Architecture. All names are fictional.

Environment

A GoldenGate 19c Classic Architecture hub (gghub01, OGG home /u01/app/ogg19c, OS user ogg) runs integrated Extracts against a multitenant source and fans the trails out to a pump and several Replicats. Names are fictional; the structure is the real one.

Component

Value

Manager (mgr.prm)

PORT 7809; AUTOSTART ER *; AUTORESTART ER *, RETRIES 3, WAITMINUTES 5, RESETMINUTES 30; one PURGEOLDEXTRACTS rule per trail directory with USECHECKPOINTS, MINKEEPHOURS 120

Source database

ORCLCDB (CDB), GoldenGate user C##GGADMIN; PDBAPP1 captured by EXTAPP01, PDBAPP2 by EXTAPP02

Trail aa

/ogg/trails/app1/aa, written by EXTAPP01 (integrated Extract), 500 MB files

Readers of aa

PMPAPP01 (pump → /ogg_remote/dirdat/app1/ra), REPAPP01 and REPAPP11 (Replicats)

Trail ab

/ogg/trails/app2/ab, written by EXTAPP02 (integrated Extract), 500 MB files

Other trails on the hub

/ogg/trails/bill1/ba, /ogg/trails/bill2/bb, /ogg/trails/crm/ca

GoldenGate trail topology showing the stale aa registration on EXTAPP02

trail topology on gghub01 · the dashed line is the stale registration

EXTAPP01 writes aa, which PMPAPP01, REPAPP01 and REPAPP11 read; EXTAPP02 writes ab. The dashed line is a registration of aa on EXTAPP02 that exists only in its checkpoint file and has never moved past sequence 0.

How Manager decides what to purge

Manager purges a trail file only when every process registered against that trail has moved past it. Three facts drive everything in this runbook:

  • Manager learns which trails exist, and who touches them, only from the checkpoint files in dirchk of its own OGG home. A trail that no local checkpoint references is invisible to it and is never purged, however many rules match the directory.

  • For each trail it computes Oldest_Chkpt_Seqno: the minimum sequence number across all checkpoints that reference the trail — the read checkpoints of Replicats and pumps and the write checkpoints of Extracts. With USECHECKPOINTS, file N is eligible only if N < Oldest_Chkpt_Seqno.

  • MINKEEPHOURS, MINKEEPDAYS or MINKEEPFILES is an additional condition, not a substitute: the file must also be older than the retention period. A rule change takes effect only after Manager is restarted, and purging runs on the CHECKMINUTES cycle (default 10 minutes).

Corollary: one process stuck at an old position, or a registration that never moves at all, pins the whole trail from that point onward. SEND MANAGER GETPURGEOLDEXTRACTS shows both the rules Manager has loaded and the Oldest_Chkpt_Seqno it computed, which makes it the first command to run.

Symptom

The app1 trail directory still held files from early July on 9 November, each about 500 MB, while the retention rule said 120 hours:

[ogg@gghub01 ~]$ ls -ltr /ogg/trails/app1
-rw-r----- 1 ogg oinstall 499999278 Jul  2 12:46 aa000011207
-rw-r----- 1 ogg oinstall 499999587 Jul  2 13:02 aa000011208
-rw-r----- 1 ogg oinstall 499999189 Jul  2 13:21 aa000011209
...
-rw-r----- 1 ogg oinstall 499999649 Jul  2 20:21 aa000011232
...

EXTAPP01 was writing aa000018420, so roughly 7,200 files (about 3.5 TB) had accumulated. The Manager parameter file looked right:

PORT 7809

PURGEOLDEXTRACTS /ogg/trails/app1/*, USECHECKPOINTS, MINKEEPHOURS 120
PURGEOLDEXTRACTS /ogg/trails/app2/*, USECHECKPOINTS, MINKEEPHOURS 120
PURGEOLDEXTRACTS /ogg/trails/bill1/*, USECHECKPOINTS, MINKEEPHOURS 120
PURGEOLDEXTRACTS /ogg/trails/bill2/*, USECHECKPOINTS, MINKEEPHOURS 120

AUTOSTART ER *
AUTORESTART ER *, RETRIES 3, WAITMINUTES 5, RESETMINUTES 30

Nothing in it explains the backlog, which is exactly why the usual suspects (a path typo, a missing Manager restart) need to be ruled out with evidence rather than by reading the file again.

Diagnosis, step by step

Step 1 — Ask Manager what it sees.

GGSCI (gghub01) 3> SEND MANAGER GETPURGEOLDEXTRACTS

PurgeOldExtracts Rules
Fileset                         MinHours MinFiles UseCP
/ogg/trails/app1/*                   120        1   Y
/ogg/trails/app2/*                   120        1   Y
/ogg/trails/bill1/*                  120        1   Y
/ogg/trails/bill2/*                  120        1   Y
OK
Extract Trails
Filename                        Oldest_Chkpt_Seqno
/ogg/trails/crm/ca                     183
/ogg/trails/bill1/ba                  7423
/ogg/trails/bill2/bb                  3649
/ogg/trails/app1/aa                      0

What to look for: an empty rule list means mgr.prm changed and Manager was never restarted. A trail missing from the list means no local checkpoint references it. A trail with an implausibly low Oldest_Chkpt_Seqno means a reader or writer is stuck there. Here all rules were loaded, app1/aa showed 0 (no file can be below 0, so nothing is ever purged), app2/ab was absent despite having a rule, and crm/ca had a trail but no rule.

Step 2 — Find every checkpoint that references the trail. Checkpoint files store the trail path as plain text:

[ogg@gghub01 ogg19c]$ grep -l "app1/aa" dirchk/*
dirchk/EXTAPP01.cpe
dirchk/EXTAPP02.cpe
dirchk/PMPAPP01.cpe
dirchk/REPAPP01.cpr
dirchk/REPAPP11.cpr

All five files had been modified within the last minute, so all five groups were alive (a stopped group's checkpoint file stops changing; a group in an AUTORESTART loop still touches it on each start). The pump and both Replicats were checked with INFO ..., SHOWCH and sat at current positions. That left two Extracts referencing one trail, which is unusual on its own: a trail normally has exactly one writer.

Step 3 — Compare the two Extracts' checkpoints.

GGSCI (gghub01) 9> INFO EXTRACT EXTAPP01, SHOWCH
GGSCI (gghub01) 16> INFO EXTRACT EXTAPP02, SHOWCH

Both were integrated Extracts, RUNNING, with a checkpoint lag of a few seconds, reading the same database at the same point (SCN 2217.4100233741 at 00:13:43 and 2217.4100236102 at 00:14:41; the gap is the minute between the two commands). The SCN 0.0 shown under Startup Checkpoint and BR Startup Recovery Checkpoint is normal for integrated Extracts positioned by timestamp. The read side was healthy; the write side of EXTAPP02 was not:

Write Checkpoint #1
  GGS Log Trail
  Current Checkpoint (current write position):
    Sequence #: 0
    RBA: 0
    Timestamp: 2026-05-21 09:12:44.118207
    Extract Trail: /ogg/trails/app1/aa
    Seqno Length: 6
    Flip Seqno Length: Yes
    Trail Type: EXTTRAIL

Write Checkpoint #2
  GGS Log Trail
  Current Checkpoint (current write position):
    Sequence #: 20117
    RBA: 95320011
    Timestamp: 2026-11-09 00:23:48.023748
    Extract Trail: /ogg/trails/app2/ab
    Seqno Length: 9
    Flip Seqno Length: No
    Trail Type: EXTTRAIL

Header:
  # Input Checkpoints = 1
  # Output Checkpoints = 2

Two output trails, one of them at sequence 0 / RBA 0 since the day the group was built, five months earlier. Not even a file header had been written to it. That entry is the 0 Manager reported.

Step 4 — Confirm the registrations.

GGSCI (gghub01) 15> INFO EXTTRAIL *
...
       Extract Trail: /ogg/trails/app1/aa
        Seqno Length: 9
   Flip Seqno Length: no
             Extract: EXTAPP01
               Seqno: 18420
                 RBA: 211004873
           File Size: 500M

       Extract Trail: /ogg/trails/app1/aa
        Seqno Length: 6
   Flip Seqno Length: yes
             Extract: EXTAPP02
               Seqno: 0
                 RBA: 0
           File Size: 1000M

       Extract Trail: /ogg/trails/app2/ab
        Seqno Length: 9
   Flip Seqno Length: no
             Extract: EXTAPP02
               Seqno: 20117
                 RBA: 95320011
           File Size: 500M

Two registrations under one trail name: the real writer at 18420 and a second one that never wrote.

Step 5 — Check what EXTAPP02 is actually configured to do.

GGSCI (gghub01) 14> VIEW PARAMS EXTAPP02

EXTRACT EXTAPP02
--REGISTER EXTRACT EXTAPP02 DATABASE CONTAINER(PDBAPP2)
--ADD EXTRACT EXTAPP02, INTEGRATED TRANLOG, BEGIN NOW
--ADD EXTTRAIL /ogg/trails/app2/ab EXTRACT EXTAPP02, MEGABYTES 1000

USERID C##GGADMIN@ORCLCDB, PASSWORD <encrypted>, BLOWFISH ENCRYPTKEY DEFAULT
...
EXTTRAIL /ogg/trails/app2/ab
...
TABLE PDBAPP2.SALES.ORDERS;
TABLE PDBAPP2.SALES.ORDER_ITEMS;
TABLE PDBAPP2.SALES.PAYMENTS;

The parameter file names one trail, ab, and the build commands kept in comments target ab as well. STATS EXTRACT EXTAPP02, TOTAL confirmed it: output to /ogg/trails/app2/ab, with 612,004,310 inserts on ORDERS, 3,980,215 on ORDER_ITEMS and 418,770 on PAYMENTS since the last restart. The Extract was healthy and needed. Only its checkpoint carried a passenger.

Root cause

A copy-pasted ADD EXTTRAIL /ogg/trails/app1/aa, EXTRACT EXTAPP02 was run during the build on 2026-05-21 at 09:12:44, about ninety seconds after the group was added, most likely lifted from EXTAPP01's build script. The mistake was caught and the right trail, ab, was added — but the wrong registration was never removed.

An Extract writes only to the trails named by EXTTRAIL/RMTTRAIL in its parameter file, so the aa entry in EXTAPP02's checkpoint stayed at sequence 0 / RBA 0 forever. Manager, computing min(EXTAPP01 = 18420, EXTAPP02 = 0, readers) for the trail, got 0, and no file can have a sequence number below 0. MINKEEPHOURS never entered into it.

Side effect: Manager picked up only EXTAPP02's first output trail, so ab never appeared in the Extract Trails list and the app2 directory was not being purged either. One stale entry in a binary checkpoint file disabled purging for two trails.

Fix procedure

The goal is to remove the aa registration from EXTAPP02 without touching EXTAPP01's live one. DELETE EXTTRAIL takes only a trail name, with no EXTRACT clause, and both groups are registered under that name, so it may strip EXTAPP01's registration too. The procedure therefore runs with both Extracts stopped (a running Extract rewrites its own checkpoint file every few seconds) and with a backup of dirchk to restore from.

Expected outage: a few minutes for EXTAPP01 and EXTAPP02. Integrated Extracts resume from their Recovery Checkpoint with no data loss. The pump and the Replicats stay up.

1. Record the current state. Save the output to a file; the write positions are the reference values for step 4.

GGSCI> INFO ALL
GGSCI> INFO EXTTRAIL *
GGSCI> INFO EXTRACT EXTAPP01, SHOWCH
GGSCI> INFO EXTRACT EXTAPP02, SHOWCH

2. Stop both Extracts and confirm STOPPED.

GGSCI> STOP EXTRACT EXTAPP01
GGSCI> STOP EXTRACT EXTAPP02
GGSCI> INFO ALL

3. Back up the checkpoint directory (from the OGG home).

[ogg@gghub01 ogg19c]$ cp -rp dirchk dirchk.bak_$(date +%Y%m%d_%H%M)

4. Remove the stale registration and read the output — it names the Extract(s) the trail was deleted from.

GGSCI> DELETE EXTTRAIL /ogg/trails/app1/aa
GGSCI> INFO EXTTRAIL /ogg/trails/app1/aa

Expected: the trail is listed under EXTAPP01 only, at Seqno 18420 / RBA 211004873, and no longer under EXTAPP02.

5. Only if EXTAPP01's registration was removed as well: with both Extracts still stopped, restore just its checkpoint file and re-check. This brings back EXTAPP01's exact write position while keeping the cleaned EXTAPP02 file.

[ogg@gghub01 ogg19c]$ cp -p dirchk.bak_*/EXTAPP01.cpe dirchk/
GGSCI> INFO EXTTRAIL /ogg/trails/app1/aa

6. Start both Extracts.

GGSCI> START EXTRACT EXTAPP01
GGSCI> START EXTRACT EXTAPP02
GGSCI> INFO ALL

Rollback: at any point, with the Extracts stopped, copy the contents of dirchk.bak_* back over dirchk and start them. That is a byte-for-byte return to the state before the change.

Roads not taken, and why:

  • Delete and re-add EXTAPP02: repositioning a live integrated Extract to its exact prior SCN (REGISTER ... SCN, dictionary availability, open transactions) is far riskier than removing one registration.

  • NOUSECHECKPOINTS on the rule: it ignores the readers' checkpoints as well; a Replicat or pump down for longer than the retention period would lose data.

  • Adding EXTTRAIL /ogg/trails/app1/aa to EXTAPP02 to "move the checkpoint": two writers on one trail corrupt it.

  • Editing the .cpe file by hand: binary, unsupported, and unnecessary.

Verification

GGSCI> INFO EXTRACT EXTAPP02, SHOWCH        -- Header: # Output Checkpoints = 1 (only /ogg/trails/app2/ab)
GGSCI> SEND MANAGER GETPURGEOLDEXTRACTS     -- app1/aa non-zero; app2/ab now listed

Oldest_Chkpt_Seqno for app1/aa should now equal the position of the slowest reader (PMPAPP01, REPAPP01 or REPAPP11). On its next CHECKMINUTES cycle Manager starts deleting every file below that number that is older than 120 hours, logging OGG-00957 "Purged old extract file ..." to ggserr.log and dirrpt/MGR.rpt for each one.

Plan for the backlog: about 7,200 files (3.5 TB) become eligible at once, which means heavy delete I/O on the trail filesystem. To keep it under control, confirm the readers' current read sequence numbers (INFO REPLICAT REPAPP01, INFO REPLICAT REPAPP11, INFO EXTRACT PMPAPP01) and remove the oldest files in batches by hand first — only files below the smallest read sequence and older than the retention period. Then check df -h on /ogg/trails/app1 and /ogg/trails/app2.

Prevention and lessons learned

  • After building any group, run INFO EXTTRAIL * and INFO <group>, SHOWCH; the Header's "# Output Checkpoints" must equal the number of EXTTRAIL/RMTTRAIL lines in the parameter file. A ten-second checklist item would have caught this on day one.

  • Build groups from a per-group script with the trail name as a variable, not from another group's shell history. Keep the build commands as comments at the top of the .prm (as this team did) — they made the intent obvious during the diagnosis.

  • Add SEND MANAGER GETPURGEOLDEXTRACTS to the periodic health check and alert on any trail whose Oldest_Chkpt_Seqno is 0 or far behind the writer's sequence, and on any directory with a rule but no tracked trail.

  • Give every trail directory a PURGEOLDEXTRACTS rule (crm/ca had none here) and restart Manager after editing mgr.prm.

  • Manager's view is the only one that matters for purging. When trail files pile up, start with what Manager computed, not with the parameter file.

Quick reference

What you see

Check

What it means

Old trail files despite a PURGEOLDEXTRACTS rule

SEND MANAGER GETPURGEOLDEXTRACTS

Start here: loaded rules and the computed Oldest_Chkpt_Seqno per trail

Rule list empty

VIEW PARAMS MGR, Manager start time

mgr.prm changed after Manager started; STOP MGR / START MGR

Trail missing from the Extract Trails list

grep -l "<dir>/<prefix>" dirchk/*

No local checkpoint references it (reader in another OGG home, deleted group, path or symlink mismatch); Manager never purges it

Oldest_Chkpt_Seqno far below the writer's sequence

INFO <reader>, SHOWCH for each file grep returned

A stopped, abended or lagging reader, or an orphan .cpr/.cpe left by a deleted group

Oldest_Chkpt_Seqno = 0

INFO EXTTRAIL *, then INFO <group>, SHOWCH

A registration that never moved: a reader added and never started, or a writer registered by mistake (this case)

Two Extracts under one trail in INFO EXTTRAIL *

VIEW PARAMS of both

A stale registration, or two real writers — the second is a data-integrity problem

Trail written but absent from Manager's list

INFO <writer>, SHOWCH, Header "# Output Checkpoints"

Manager tracked only the Extract's first output trail; fix the stale first entry

 
 
 

Recent Posts

See All

Comments


bottom of page