Now that you have had a chance to read the first two installments of this blog series:
We will now cover how to traverse a trail file. As a review, use the following to invoke logdump.
From the GoldenGate home directory run the following command to invoke the logdump command.
[oracle@ora-oem gghome_1]$ ./logdump
Oracle GoldenGate Log File Dump Utility for Oracle
Version 22.214.171.124.2 OGGCORE_126.96.36.199.0_PLATFORMS_171208.0005
Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
Logdump 1 >detail on
Logdump 2 >detail data
Logdump 3 >ghdr on
Logdump 4 >ggstoken detail
Logdump 5 >usertoken detail
Logdump 6 >open dirdat/lb000000004 — Replaced by your trailfile
For tools to help manage GoldenGate performance, click here
When you traverse a trail file, you can move forward and backward through the file using Logdump. As was shown in the last blog, the n or Next command takes you to the next record in the trail file (moving forward). To reverse the direction, use the pos rev command. This will change the direction that you are moving in. In order to go forward again, use pos for. The movement commands are listed here:
N or NEXT Moves to the next record.
SFNT or SCANFORNEXTTRANS Moves to the next transaction.
SFET or SCANFORENDTRANS Moves to the end of the current transaction.
POS Moves to a specific RBA (Relative Byte Address).
POS FIRST Moves to the first record in the trail file.
POS LAST Moves to the last record in the trail file.
POS EOF Moves to the end of the trail file.
POS FOR/REV Sets the direction to Forward or Reverse.
NEXTTRAIL Moves to the next trail file.
Note: See the Logdump Reference for Oracle GoldenGate for all movement commands.
With these commands, you can traverse a trail file and view record data. In the next installment you will learn how to use the filter command within LogDump.