Logdump is installed in the Oracle GoldenGate Installation home directory. You can start Logdump using the following commands:
- $GOLDENGATE_HOME/logdump
- GGSCI>sh ./logdump
| A Demonstration Video of Logdump |
2.1 Example 1: Skipping transactions in replicat
The first example (op000000) shows how to use logdump to skip transactions on the replicat side. This happens when some wrong transactions are executed on the source database while the replication is running. In this example, while replicating only the MEMBER tables from the PANU schema, there are some transactions updating on the WORLD_REGION table. Because there is no WORLD_REGION table on the target, the replicat will abend. The solution is to find the transactions for the WORLD_REGION table and skip them. Let's look at how we can find this using logdump.
First, we start the logdump and enable ggstoken detail display shown as follows:
Logdump>open dirdat/op000000 Current LogTrail is /u02/data/ggdata/dirdat/op000000 Logdump>ggstoken detail Logdump>detail on
Logdump 108 >count ** Count begins at RBA 1973 LogTrail /u02/data/ggdata/dirdat/op000000 has 5 records Total Data Bytes 139 Avg Bytes/Record 27 Delete 2 Insert 3 Before Images 2 After Images 3 Average of 5 Transactions Bytes/Trans ..... 75 Records/Trans ... 1 Files/Trans ..... 1 PDB1.PANU.MEMBER Partition 4 Total Data Bytes 41 Avg Bytes/Record 41 Insert 1 After Images 1 PDB1.PANU.WORLD_REGION Partition 4 Total Data Bytes 98 Avg Bytes/Record 24 Delete 2 Insert 2 Before Images 2 After Images 2
2016/06/24 12:12:10.443.824 Delete Len 14 RBA 2451 Name: PDB1.PANU.WORLD_REGION Before Image: Partition 4 G s 0000 000a 0000 0000 0000 0000 02c3 | .............. Column 0 (x0000), Len 10 (x000a) GGS tokens: TokenID x52 'R' ORAROWID Info x00 Length 20 4141 4157 6147 4141 4b41 4141 4143 4641 4142 0001 | AAAWaGAAKAAAACFAAB.. TokenID x4c 'L' LOGCSN Info x00 Length 7 3431 3938 3137 34 | 4198174 TokenID x36 '6' TRANID Info x00 Length 9 382e 3235 2e34 3137 38 | 8.25.4178 TokenID x69 'i' ORATHREADID Info x01 Length 2 0001 | .. Logdump 97 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 41 (x0029) IO Time : 2016/06/27 11:17:10.106.983 IOType : 5 (x05) OrigNode : 255 (xff) TransInd : . (x03) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 244 AuditPos : 8756240 Continued : N (x00) RecCount : 1 (x01) Logdump 97 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 41 (x0029) IO Time : 2016/06/27 11:17:10.106.983 IOType : 5 (x05) OrigNode : 255 (xff) TransInd : . (x03) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 244 AuditPos : 8756240 Continued : N (x00) RecCount : 1 (x01) 2016/06/27 11:17:10.106.983 Insert Len 41 RBA 2596 Name: PDB1.PANU.MEMBER After Image: Partition 4 G s 0000 000a 0000 0000 0000 0000 0009 0001 0009 0000 | .................... 0005 0a65 7269 6300 0200 0a00 0000 0662 6f73 746f | ...eric........bosto 6e | n Column 0 (x0000), Len 10 (x000a) Column 1 (x0001), Len 9 (x0009) Column 2 (x0002), Len 10 (x000a) GGS tokens: TokenID x52 'R' ORAROWID Info x00 Length 20 4141 4157 6449 4141 4b41 4141 4143 5841 4143 0001 | AAAWdIAAKAAAACXAAC.. TokenID x4c 'L' LOGCSN Info x00 Length 7 3435 3831 3932 36 | 4581926 TokenID x36 '6' TRANID Info x00 Length 9 332e 3332 2e34 3439 35 | 3.32.4495 TokenID x69 'i' ORATHREADID Info x01 Length 2 0001 | ..
GGSCI (dbaas11-ggcs-1 as tpcadb@ORCL11g) 69> alter repop extrba 0 2016-06-28 22:09:57 INFO OGG-06594 Replicat REPOP has been altered through GGSCI. Even the start up position might be updated, duplicate suppression remains active in next startup. To override duplicate suppression, start REPOP with NOFILTERDUPTRANSACTION option. REPLICAT (Integrated) altered. GGSCI>start repop afterscn 4198174 GGSCI> start repop nofilterduptransactions
GGSCI> alter repop extrba 2596 2016-06-28 22:04:56 INFO OGG-06594 Replicat REPOP has been altered through GGSCI. Even the start up position might be updated, duplicate suppression remains active in next startup. To override duplicate suppression, start REPOP with NOFILTERDUPTRANSACTION option. REPLICAT (Integrated) altered. GGSCI> start repop nofilerduptransactions Sending START request to MANAGER ... REPLICAT REPOP starting
You can also use logdump to discovery some mysterous transactions in your replication. In this example, after I enabled the automatic heartbeat table feature, I found the size of the trail file keeps increasing even there is no transaction on the source database. I stop the extract and perform and ETROLLOVER to create a new trail file.
GGSCI> alter extract extgdrds etrollover 2016-12-08 21:09:22 INFO OGG-01520 Rollover performed. For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file; it will not happen automatically. EXTRACT altered. GGSCI> start * Sending START request to MANAGER ... EXTRACT EXTGDRDS starting Sending START request to MANAGER ... EXTRACT PMPGDRDS starting GGSCI> sh ls dirdat rd000000000 rd000000001 rd000000002
GGSCI (ip-172-30-3-169.ec2.internal) 10> sh ./logdump Oracle GoldenGate Log File Dump Utility for Oracle Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401 Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved. Logdump 26 >open dirdat/rd000000002 Current LogTrail is /gg12/dirdat/rd000000002 Logdump 27 >count LogTrail /gg12/dirdat/rd000000002 has 7 records Total Data Bytes 6169 Avg Bytes/Record 881 GGSPKUpdate 4 Metadata Records 2 Others 1 After Images 4 Average of 7 Transactions Bytes/Trans ..... 929 Records/Trans ... 1 Files/Trans ..... 1
- Oracle A-Team Paper: Oracle GoldenGate: Logdump
- Oracle® GoldenGate Logdump Reference for Oracle GoldenGate
- 6/28/2016: Added the example to reposition reposition replication process.
- 12/8/2016: Added the example analyizing heartbeat seed records in the trail file with automatic heartbeat table feature enabled.