Dear Readers,
In this article we will see Logdump utility in Oracle GoldenGate 12c.
We care for your speed. Below is an easy way to perform Logdump utility in Oracle GoldenGate 12c
Logdump utility comes by default with goldengate software. It is part of goldengate home. It is used to read trail files.
Just like in database we have logminor utility to read the archive log files, in the same way to read the trail files of goldengate we have logdump utility.
Trail files which are generated in goldengate they are in binary format and we can not read them directly only logdump can read it so logdump utility allows you to display or search for information that is stored in goldengate trails
The Logdump utility allows you to:
- Display or search for information that is stored in GoldenGate trails or files
- Save a portion of GoldenGate trail to a separate trail file
On Source Machine
Go to Golden Gate installation directory
1 2 3 |
[oracle@gg ~]$ cd $GGS_HOME [oracle@gg ogg_src]$ pwd /u01/app/oracle/product/ogg_src |
Connect to logdump utility
1 2 3 4 5 6 7 8 |
[oracle@gg ogg_src]$ ./logdump Oracle GoldenGate Log File Dump Utility for Oracle Version 19.1.0.0.0 OGGCORE_19.1.0.0.0_PLATFORMS_190508.1447 Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved. Logdump 1 > |
Open trail file
1 2 3 |
Logdump 1 >open dirdat/lt000000016 Current LogTrail is /u01/app/oracle/product/ogg_src/dirdat/lt000000016 |
Setting up parameters to view the trail properly.
To view trail file header
1 2 |
Logdump 2 >fileheader on |
To view detail
1 2 |
Logdump 3 >detail on |
To get clear detailed data
1 2 |
Logdump 4 >detail data |
Viewing trail file header
1 2 |
Logdump 4 >fileheader detail |
To read first record of trail file, do n as
1 2 |
Logdump 6 >n |
Note: In every local trail file first record will be the file header, RBA 0 means first record in the trail file and it will be file header. File header information is goldengate understood file like what is goldengate home,
where it is installed these information will be stored.
Again do n
Note: n means next
- Again do n
1 |
GGSCI> n |
Note: There is nothing now as we did not does any transaction till now so there is no record right now. Lets do some transaction
Update A Row in dept table
On Source Machine
Check dept table
1 2 3 4 5 6 7 8 9 |
SQL> select * from dept; DEPTNO DNAME LOC ---------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON 50 MARKETING USA |
Lets update a row into dept as
- As soon as we commit, extract must have captured it. Now when we do n we should find some data.
Now do n on logdump utility
On above image it shows database related information
Again do n
Now the above image shows table definitions which are captured by extract process
Again do n
- Now you will see data is written, we did one update so update is written as GGSUnifiedUpdate this is the update statement we did. This information is written at RBA 2654
- Now if we do n again, we do not find anything
Now if you need to go at particular RBA, you can also do that
Now i want read pos 2654
Now to read file in reverse direction
Now do n
Now to read file in forward direction
Now do n
We can count no of the transaction using count function in logdump utility.
we use count command
Note :
This is the new feature of 12c that automatically even if you replicating the data between heterogeneous database that is oracle to NoSQL, MySQL to oracle, still goldengate will manage.
It will write the metadata information of database first and then the object and that metadata information will be referred by the replicat process when applying the data from source to target so if we see we are always using in the replicat parameter file ASSUMETARGETDEFS, that means assume the target definition that it is similar to source definition.
By default the source definition is written into extract and replicat referred to the definition file which has been written into the local trail.
And in 11g we had a utility called as Defgen comes with oracle goldengate installation so whatever metadata information we have seen now we used to generate it using defgen utility.
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts