LogDump and Understanding header information in Oracle GoldenGate Trail Files
Replication of data is always a fun thing to look at; What is replicating?! Discussions around, How do I get data from server/database A to server/database B or even to server/database C are valid questions and are often asked by management. Often the simple (knee jerk) answer is, just set it up and start replicating. Although Oracle GoldenGate may be simple (for some architectures) to meet the demands of management and the task at hand, problems will arise with the data being replicated.
when problems arise, the need to identify and resolve the replication issue becomes a critical and time consuming task. Oracle GoldenGate provides a few utility to help in diagnosing and resolving replication issues. One such utility is the LogDump utility. The LogDump utility is used to read the local and remote trail files that are used to support the continuous extraction and replication of transaction changes within the database.
Knowing what trail files are used for is part of the battle when troubleshooting replication issues with Oracle GoldenGate. How do we use LogDump to read these trail files? What are we looking for or at in a trail file to understand what is gong on? To answer these questions, we need to start the LogDump utility.
To start LogDump, we just need to be in the OGG_HOME and run the LogDump command. The below code set shows you how to run LogDump.
[oracle@oel oggcore_1]$ pwd /oracle/app/product/12.1.2/oggcore_1 [oracle@oel oggcore_1]$ ./logdump Oracle GoldenGate Log File Dump Utility for Oracle Version 12.1.2.0.0 17185003 17451407 Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved. Logdump 22 >
Note: Your LogDump session should start at 1 not 22 (Logdump 22). LogDump remembers session info until you log out of the server.
Once LogDump has been started, we need to open a trail file and setup how we want the information to be displayed. Commands for LogDump can be displayed by using the “help” command. In the following code block, we see that we are opening a local trail (lt) file and setting a few environment options.
Note: Trail files (local and remote) normally are pre-fixed with two (2) letters followed by a six ( 6 ) digit string. In new environments trail files will start with (prefix)000000 (lt000000 or rt000000).
Logdump 15 >open ./dirdat/lt000000 Current LogTrail is /oracle/app/product/12.1.2/oggcore_1/dirdat/lt000000 Logdump 16 >ghdr on Logdump 17 >detail on Logdump 18 >detail data Logdump 19 >usertoken on Logdump 20 >
The “help” command inside of LogDump provides more options. The options that we are using in this example are:
- ghdr on = toggle header display on | off
- detail on = toggle detailed data display (on | off | data)
- detail data = toggle detailed data display (on | off | data) (repeated this just to make sure)
- usertoken on = show user token information (on | off| detail)
With the LogDump environment set, we can now use the “next (n)” command to see the information in the trail file.
Logdump 20 > n
Once the header output is displayed, we need to understand how to read this information. Image 1 provides us with a quick explanation of each major component within a trial file transaction. We can see the following items for a transaction in trail file (lt000000):
- Header Area: Transaction information
- Data/Time and type of transaction
- Object associated with the transaction
- Image of transaction (before/after)
- Columns associated with the transaction
- Transaction data formatted in Hex
- Length of the record
- ASCII format of the data
- Record position within the trail file (RBA)
Image 1: Header Information
At this point, we maybe asking: Why is this important? Understanding the trail files and how to find information within the trail files is an important part of troubleshooting the Oracle GoldenGate environment.
Example: If a replicat abends and we need to start the replicat from a given RBA. Being able to identify the first, next and last RBA in the trail file is helpful in understanding why the abend happened and identifying a starting point to restarting successfully.
In the end, the Oracle GoldenGate environment can be simple yet complex at the same time. Understanding the different components of the environment is very useful and worth the time involved to learn it.
Enjoy!
twitter: @dbasolved
blog: http://dbasolved.com
Current Oracle Certs
Bobby Curtis
I’m Bobby Curtis and I’m just your normal average guy who has been working in the technology field for awhile (started when I was 18 with the US Army). The goal of this blog has changed a bit over the years. Initially, it was a general blog where I wrote thoughts down. Then it changed to focus on the Oracle Database, Oracle Enterprise Manager, and eventually Oracle GoldenGate.
If you want to follow me on a more timely manner, I can be followed on twitter at @dbasolved or on LinkedIn under “Bobby Curtis MBA”.
I’ll use what I have and you’ll do the sameI like how you thinkYour ideas are refreshingly bold
can you buy priligy in the u.s. Keep in mind that these diets are likely temporary
rReach out and grab onto something newHesitation stands in the way of boldness
And I like how you elevate me into your sphere
reddit priligy Inhibition of the platelet aggregating activity of two human adenocarcinomas of the colon and an anaplastic murine tumor with a specific thrombin inhibitor dansylarginine N 3 ethyl 1, 5 pentanediyl amide
buy priligy tablets To advance the measurement of distributed neuronal population representations of targeted motor actions on single trials, we developed an optical method COSMOS for tracking neural activity in a largely uncharacterized spatiotemporal regime