LOGDUMP (Golden Gate trail file analyzer
From Robs_Wiki
Contents
Introduction
Logdump is a standard utility that comes with the Oracle GoldenGate (OGG) application. Logdump enables the user to view and scan for transactions and records, obtain transaction statistics, and save data contained within OGG Trails.
Step 1 Open a trail file
Logdump is run from a terminal window. When the application starts, a banner is displayed showing the version and copyright information, followed by the Logdump prompt. The command open [trail] will create a shared read file handler to the designated trail file.
[oracle@rob01db01 gg_home1]$ cd $GG_HOME [oracle@rob01db01 gg_home1]$ ./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 9 >open ./dirdat/prd12c/xr000000000 Current LogTrail is /u01/app/oracle/product/12.2.0.1/gg_home1/dirdat/prd12c/xr000000000
Step 2 Count summary information: overview of all records
Logdump 10 >count LogTrail /u01/app/oracle/product/12.2.0.1/gg_home1/dirdat/prd12c/xr000000000 has 551 records Total Data Bytes 174029 Avg Bytes/Record 315 Delete 9 Insert 315 Update 31 GGSPKUpdate 188 DDL 1 Metadata Records 6 Others 1 Before Images 9 After Images 535 Average of 543 Transactions Bytes/Trans ..... 369 Records/Trans ... 1 Files/Trans ..... 1
Step 3 Count detail: view all changed records per table
Logdump> count detail . . . ORABUP0.GG_TBL_CUSTOM_HEARTBEAT2 Partition 12 Total Data Bytes 23134 Avg Bytes/Record 116 Delete 9 Insert 158 GGSPKUpdate 32 Before Images 9 After Images 190 . . .
Step 4 View details of a specific table
Take note that the interface is case sensitive and you have to use capitals for the table names
Count stats for a specific table: Logdump 14 >filter include filename HR.GG_TBL_CUSTOM_HEARTBEAT Logdump 15 >count Scanned 10000 records, RBA 1522870, 2017/07/29 16:17:07.000.000 Scanned 20000 records, RBA 3011160, 2017/07/29 16:20:01.000.000 Scanned 30000 records, RBA 4493502, 2017/07/29 16:20:49.000.000 Scanned 40000 records, RBA 5976177, 2017/07/29 16:21:39.000.000 Scanned 50000 records, RBA 7456410, 2017/07/29 16:21:42.000.000 Scanned 60000 records, RBA 8941683, 2017/07/29 16:23:22.000.000 Scanned 70000 records, RBA 10421673, 2017/07/29 16:23:22.000.000 Scanned 80000 records, RBA 11904237, 2017/07/29 16:24:08.000.000 Scanned 90000 records, RBA 13391129, 2017/07/29 16:26:10.000.000 Scanned 100000 records, RBA 14872115, 2017/07/29 16:26:23.000.000 Scanned 110000 records, RBA 16352105, 2017/07/29 16:26:23.000.000 Scanned 120000 records, RBA 17832788, 2017/07/29 16:26:34.000.000 Scanned 130000 records, RBA 19321436, 2017/07/29 16:29:00.000.000 Scanned 140000 records, RBA 20801411, 2017/07/29 16:29:00.000.000 Scanned 150000 records, RBA 22281401, 2017/07/29 16:29:00.000.000 Scanned 160000 records, RBA 23770813, 2017/07/29 16:31:31.000.000 Scanned 170000 records, RBA 25252982, 2017/07/29 16:32:03.000.000 Scanned 180000 records, RBA 26732972, 2017/07/29 16:32:03.000.000 Scanned 190000 records, RBA 28227079, 2017/07/29 16:35:40.000.000 Scanned 200000 records, RBA 29707054, 2017/07/29 16:35:40.000.000 Scanned 210000 records, RBA 31187014, 2017/07/29 16:35:40.000.000 Scanned 220000 records, RBA 32666989, 2017/07/29 16:35:40.000.000 Scanned 230000 records, RBA 34148593, 2017/07/29 16:36:06.000.000 Scanned 240000 records, RBA 35629075, 2017/07/29 16:36:09.000.000 Scanned 250000 records, RBA 37109050, 2017/07/29 16:36:09.000.000 Scanned 260000 records, RBA 38590367, 2017/07/29 16:36:58.000.000 Scanned 270000 records, RBA 40070357, 2017/07/29 16:36:58.000.000 Scanned 280000 records, RBA 41552008, 2017/07/29 16:37:32.000.000 Scanned 290000 records, RBA 43030924, 2017/07/29 16:37:34.000.000 Scanned 300000 records, RBA 44510884, 2017/07/29 16:37:34.000.000 Scanned 310000 records, RBA 45988685, 2017/07/29 16:37:38.000.000 Scanned 320000 records, RBA 47439025, 2017/07/29 16:45:17.000.000 Scanned 330000 records, RBA 48819025, 2017/07/29 16:45:17.000.000 Scanned 340000 records, RBA 50199025, 2017/07/29 16:45:17.000.000 Scanned 350000 records, RBA 51579025, 2017/07/29 16:45:17.000.000 Scanned 360000 records, RBA 52959025, 2017/07/29 16:45:17.000.000 Scanned 370000 records, RBA 54339025, 2017/07/29 16:45:17.000.000 Scanned 380000 records, RBA 55949416, 2017/07/30 22:40:35.000.000 LogTrail /oracle/trail/SYMF/xr000000008 has 0 records Filtering matched 0 records suppressed 386773 records Logdump 16 > Clear the filter: logdump>filter clear all
Step 5 Move to the current RBA and view which record is being processed
First, check the current RBA with the info replicat statement:
GGSCI> info replicat rhr REPLICAT RHR Last Started 2017-09-20 08:15 Status ABENDED INTEGRATED Checkpoint Lag 00:00:00 (updated 20:15:48 ago) Log Read Checkpoint File ./dirdat/prd12c/x1000000105 2017-09-19 12:04:18.011406 RBA 71587384
Then, open the logfile and navigate to that RBA:
Logdump 37 >open ./dirdat/prd12c/x1000000105 Current LogTrail is ./dirdat/prd12c/x1000000105 Logdump 38 >pos 71587384 Reading forward from RBA 71587384 Logdump 39 >n 2017/09/15 14:22:04.030.476 Insert Len 126 RBA 71587384 Name: HR.GG_TBL_CUSTOM_HEARTBEAT_X1 (TDR Index: 3) After Image: Partition 12 G s 0000 0009 0000 0005 3336 3032 3000 0100 0900 0000 | ........36020....... 0547 5245 454e 0002 0015 0000 3230 3137 2d30 392d | .GREEN......2017-09- 3135 3a31 343a 3232 3a30 3400 0300 15ff ff31 3930 | 15:14:22:04......190 302d 3031 2d30 313a 3030 3a30 303a 3030 0004 0015 | 0-01-01:00:00:00.... ffff 3139 3030 2d30 312d 3031 3a30 303a 3030 3a30 | ..1900-01-01:00:00:0 3000 0500 15ff ff31 3930 302d 3031 2d30 313a 3030 | 0......1900-01-01:00 3a30 303a 3030 | :00:00