Examine Oracle GoldenGate Trail Files:
How and when to use the LogDump Utility
IOUG Collaborate 2015
Session: 768
Date: 4/15/2015 @ 8 am
Room: Palm C
@dbasolved
http://dbasolved.com
Work: bobby.l.curtis@accenture.com
Personal: curtisbl@gmail.com
Bobby Curtis
Douglasville, Georgia
Infrastructure Principle
IOUG (RACSIG/DI SIG), RMOUG, GAOUG
Part of Accenture’s Infrastructure Services:
- 52,000 Oracle professionals
- 17,000 Infrastructure Services professionals
Oracle Database & Engineered Systems Solutions:
- Database Migrations
- Oracle Applications on Engineered Systems
- Cloud-based solutions leveraging Engineered Systems
Oracle “Specialized” in the following areas:
- Oracle Database, Oracle Database Security, Oracle Real Application Cluster (RAC),
Oracle Data Warehouse, Oracle Database Performance Turning, Oracle Linux
- Egineered Systems: Oracle Exadata, Oracle Exalogic, Oracle Exalytics
Accenture Enkitec Group
Accenture Enkitec Group
• Our Accenture Enkitec Group resources are members of several Oracle
Database groups such as Oak Table, Oracle ACE, etc and speak frequently
at events across the globe (Oracle Use Groups (OUG), Oracle Open World
(OOW), etc..
• Our team have authored several widely used books specific to Oracle
Database topics ranging from Exadata, performance & tuning to best
practices.
Accenture Enkitec
Group
E4
The only conference with a focus
on the Oracle Exadata platform
REGISTER TODAY
June 1–2, 2015
Dallas, Texas
www.enkitec.com/e4/register
What is GoldenGate?
GoldenGate Architectures
Unidirectional
Query Offloading
Zero-Downtime Migration
Data Integration Cloud or
On-Premise
Bi-Directional
Active-Active for Multi-
Master/HA
Cloud or On-Premises
Data Distribution
via Messaging
Cloud Apps Integration
Big Data Delivery
Real/Time and Batch Delivery
Structured Data to Data Reservoir
Capture
Trail
Files
Pump
Delivery
Trail
Files
Capture (extract): committed transactions are captured (and can be filtered) as they occur by reading the transaction logs. As
of V.11.2.1, GoldenGate offers two options for capture for Oracle; Classic & Integrated Capture
Trail: stages and queues data for routing.
Pump: distributes data for routing to target(s).
Route: data is compressed, encrypted for routing to target(s).
Delivery: applies data with transaction integrity. New with
GoldenGate 12c, Integrated Delivery (replicat).
MGRMGR
GoldenGate Architecture Example
What are Trail Files?
Create Trails
Local
- EXTTRAIL
ADD EXTTRAIL ./dirdat/lt, EXTRACT <group>, MEGABYTES <size>
Remote
- RMTTRAIL
ADD RMTTRAIL ./dirdat/rt, EXTRACT <group>, MEGABYTES <size>
Change Trail File Size
Local
- EXTTRAIL
ALTER EXTTRAIL ./dirdat/lt, EXTRACT <group>, MEGABYTES <size>
Remote
- RMTTRAIL
ALTER RMTTRAIL ./dirdat/rt, EXTRACT <group>, MEGABYTES <size>
Rollover
SEND EXTRACT <group>, rollover
Capture
Trail
Files
Pump
Delivery
Trail
Files
GoldenGate Trail Files
./dirdat/lt ./dirdat/rt
./dirdat/lt00000# ./dirdat/rt00000#
Capture
Trail
Files
Pump
Delivery
Trail
Files
GoldenGate Trail Files
./dirdat/lt00000#
File
Header
Trans
Rec* * * *
Trans
Rec
Trans
Rec
Record
Header
User
Tokens
GGS
Tokens
GHDR DATA
Record
Trailer
When should Trail Files be
consulted?
How do you interact with Trail Files?
Logdump Utility
Located at:
$OGG_HOME/logdump
Logdump Basic Commands
Command Description
OPEN Open Trail File
GHDR ON View record header
DETAIL [ ON | OFF | DETAIL] Adds column information/HEX & ASCII
data
USERTOKEN [ ON | OFF ] Display any user tokens
GGSTOKEN [ ON | OFF ] Display any automatically generated
tokens
RECLEN <integer> Controls the length of the record
displayed
Trail File Navigation
Command Description
NEXT First record then move to the next, in order
SKIP Skips down <count> records
POSITION <RBA> Set position in file [ <rba> | FIRST | LAST | EOF ]
SCANFORRBA Find the next record with rba
SCANFORHEADER Search for the start of a header
SCANFORTYPE Find the next record of <type>
SCANFORTIME Find the next record with timestamp
SCANFORENDTRANS Find the end of the current transaction
SCANFORNEXTTRANS Find start of the next transaction
Trail File Navigation (cont)
Command Description
FILTER Filter the display of records
DUMP Display the specific number of bytes of data from the
current position
ARGENTNODATACHAN
GES |
ARSTOPNODATACHAN
GES
Include/Excludes records that did not result in
changes to the database
EXAMPLE
Logdump Record Hdr-Ind : E (x45) Partition : . (x04)
UndoFlag : . (x00) BeforeAfter: A (x41)
RecLength : 157 (x009d) IO Time : 2015/04/07 21:48:58.000.000
IOType : 5 (x05) OrigNode : 255 (xff)
TransInd : . (x01) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 622 AuditPos : 14273756
Continued : N (x00) RecCount : 1 (x01)
2015/04/07 21:48:58.000.000 Insert Len 157 RBA 1818
Name: GGPDB.SOE.ADDRESSES
After Image: Partition 4 G m
0000 000a 0000 0000 0000 0016 e361 0001 000a 0000 | .............a......
0000 0000 000f 4241 0002 0015 0000 3230 3135 2d30 | ......BA......2015-0
342d 3037 3a32 313a 3438 3a30 3000 0300 0700 0000 | 4-07:21:48:00.......
0331 3432 0004 000f 0000 000b 5374 7265 6574 204e | .142........Street N
616d 6500 0500 0a00 0000 0649 7276 696e 6500 0600 | ame........Irvine...
0f00 0000 0b57 6573 7420 5375 7373 6578 0007 000d | .....West Sussex....
0000 0009 4c69 7468 7561 6e69 6100 0800 0c00 0000 | ....Lithuania.......
Column 0 (x0000), Len 10 (x000a)
0000 0000 0000 0016 e361 | .........a
Column 1 (x0001), Len 10 (x000a)
0000 0000 0000 000f 4241 | ........BA
.......
GGS tokens:
5200 0014 4141 4157 6b35 4141 5141 4141 4153 6d41 | R...AAAWk5AAQAAAASmA
4259 0001 | BY..
.
Logdump 1 >open ./dirdat/lt000000
Logdump 2 >ghdr on
Logdump 3 >detail on
Logdump 4 >detail data
Logdump 5 >usertoken on
Logdump 6 >ggstoken on
Logdump 7 >next
Examine Record - Header
Hdr-Ind : E (x45) Partition : . (x04)
UndoFlag : . (x00) BeforeAfter: A (x41)
RecLength : 157 (x009d) IO Time : 2015/04/07 21:48:58.000.000
IOType : 5 (x05) OrigNode : 255 (xff)
TransInd : . (x01) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 622 AuditPos : 14273756
Continued : N (x00) RecCount : 1 (x01)
.
Examine Record - Body
2015/04/07 21:48:58.000.000 Insert Len 157 RBA 1818
Name: GGPDB.SOE.ADDRESSES
After Image: Partition 4 G m
0000 000a 0000 0000 0000 0016 e361 0001 000a 0000 | .............a......
0000 0000 000f 4241 0002 0015 0000 3230 3135 2d30 | ......BA......2015-0
342d 3037 3a32 313a 3438 3a30 3000 0300 0700 0000 | 4-07:21:48:00.......
0331 3432 0004 000f 0000 000b 5374 7265 6574 204e | .142........Street N
616d 6500 0500 0a00 0000 0649 7276 696e 6500 0600 | ame........Irvine...
0f00 0000 0b57 6573 7420 5375 7373 6578 0007 000d | .....West Sussex....
0000 0009 4c69 7468 7561 6e69 6100 0800 0c00 0000 | ....Lithuania.......
Column 0 (x0000), Len 10 (x000a)
0000 0000 0000 0016 e361 | .........a
Column 1 (x0001), Len 10 (x000a)
0000 0000 0000 000f 4241 | ........BA
.......
GGS tokens:
5200 0014 4141 4157 6b35 4141 5141 4141 4153 6d41 | R...AAAWk5AAQAAAASmA
4259 0001 | BY..
.
Examining Oracle GoldenGate Trail Files

Examining Oracle GoldenGate Trail Files

  • 1.
    Examine Oracle GoldenGateTrail Files: How and when to use the LogDump Utility IOUG Collaborate 2015 Session: 768 Date: 4/15/2015 @ 8 am Room: Palm C
  • 2.
    @dbasolved http://dbasolved.com Work: bobby.l.curtis@accenture.com Personal: curtisbl@gmail.com BobbyCurtis Douglasville, Georgia Infrastructure Principle IOUG (RACSIG/DI SIG), RMOUG, GAOUG
  • 3.
    Part of Accenture’sInfrastructure Services: - 52,000 Oracle professionals - 17,000 Infrastructure Services professionals Oracle Database & Engineered Systems Solutions: - Database Migrations - Oracle Applications on Engineered Systems - Cloud-based solutions leveraging Engineered Systems Oracle “Specialized” in the following areas: - Oracle Database, Oracle Database Security, Oracle Real Application Cluster (RAC), Oracle Data Warehouse, Oracle Database Performance Turning, Oracle Linux - Egineered Systems: Oracle Exadata, Oracle Exalogic, Oracle Exalytics Accenture Enkitec Group
  • 4.
    Accenture Enkitec Group •Our Accenture Enkitec Group resources are members of several Oracle Database groups such as Oak Table, Oracle ACE, etc and speak frequently at events across the globe (Oracle Use Groups (OUG), Oracle Open World (OOW), etc.. • Our team have authored several widely used books specific to Oracle Database topics ranging from Exadata, performance & tuning to best practices.
  • 5.
    Accenture Enkitec Group E4 The onlyconference with a focus on the Oracle Exadata platform REGISTER TODAY June 1–2, 2015 Dallas, Texas www.enkitec.com/e4/register
  • 6.
  • 7.
    GoldenGate Architectures Unidirectional Query Offloading Zero-DowntimeMigration Data Integration Cloud or On-Premise Bi-Directional Active-Active for Multi- Master/HA Cloud or On-Premises Data Distribution via Messaging Cloud Apps Integration Big Data Delivery Real/Time and Batch Delivery Structured Data to Data Reservoir
  • 8.
    Capture Trail Files Pump Delivery Trail Files Capture (extract): committedtransactions are captured (and can be filtered) as they occur by reading the transaction logs. As of V.11.2.1, GoldenGate offers two options for capture for Oracle; Classic & Integrated Capture Trail: stages and queues data for routing. Pump: distributes data for routing to target(s). Route: data is compressed, encrypted for routing to target(s). Delivery: applies data with transaction integrity. New with GoldenGate 12c, Integrated Delivery (replicat). MGRMGR GoldenGate Architecture Example
  • 9.
  • 10.
    Create Trails Local - EXTTRAIL ADDEXTTRAIL ./dirdat/lt, EXTRACT <group>, MEGABYTES <size> Remote - RMTTRAIL ADD RMTTRAIL ./dirdat/rt, EXTRACT <group>, MEGABYTES <size>
  • 11.
    Change Trail FileSize Local - EXTTRAIL ALTER EXTTRAIL ./dirdat/lt, EXTRACT <group>, MEGABYTES <size> Remote - RMTTRAIL ALTER RMTTRAIL ./dirdat/rt, EXTRACT <group>, MEGABYTES <size> Rollover SEND EXTRACT <group>, rollover
  • 12.
  • 13.
    Capture Trail Files Pump Delivery Trail Files GoldenGate Trail Files ./dirdat/lt00000# File Header Trans Rec** * * Trans Rec Trans Rec Record Header User Tokens GGS Tokens GHDR DATA Record Trailer
  • 14.
    When should TrailFiles be consulted?
  • 15.
    How do youinteract with Trail Files?
  • 16.
  • 17.
    Logdump Basic Commands CommandDescription OPEN Open Trail File GHDR ON View record header DETAIL [ ON | OFF | DETAIL] Adds column information/HEX & ASCII data USERTOKEN [ ON | OFF ] Display any user tokens GGSTOKEN [ ON | OFF ] Display any automatically generated tokens RECLEN <integer> Controls the length of the record displayed
  • 18.
    Trail File Navigation CommandDescription NEXT First record then move to the next, in order SKIP Skips down <count> records POSITION <RBA> Set position in file [ <rba> | FIRST | LAST | EOF ] SCANFORRBA Find the next record with rba SCANFORHEADER Search for the start of a header SCANFORTYPE Find the next record of <type> SCANFORTIME Find the next record with timestamp SCANFORENDTRANS Find the end of the current transaction SCANFORNEXTTRANS Find start of the next transaction
  • 19.
    Trail File Navigation(cont) Command Description FILTER Filter the display of records DUMP Display the specific number of bytes of data from the current position ARGENTNODATACHAN GES | ARSTOPNODATACHAN GES Include/Excludes records that did not result in changes to the database
  • 20.
  • 21.
    Logdump Record Hdr-Ind: E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 157 (x009d) IO Time : 2015/04/07 21:48:58.000.000 IOType : 5 (x05) OrigNode : 255 (xff) TransInd : . (x01) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 622 AuditPos : 14273756 Continued : N (x00) RecCount : 1 (x01) 2015/04/07 21:48:58.000.000 Insert Len 157 RBA 1818 Name: GGPDB.SOE.ADDRESSES After Image: Partition 4 G m 0000 000a 0000 0000 0000 0016 e361 0001 000a 0000 | .............a...... 0000 0000 000f 4241 0002 0015 0000 3230 3135 2d30 | ......BA......2015-0 342d 3037 3a32 313a 3438 3a30 3000 0300 0700 0000 | 4-07:21:48:00....... 0331 3432 0004 000f 0000 000b 5374 7265 6574 204e | .142........Street N 616d 6500 0500 0a00 0000 0649 7276 696e 6500 0600 | ame........Irvine... 0f00 0000 0b57 6573 7420 5375 7373 6578 0007 000d | .....West Sussex.... 0000 0009 4c69 7468 7561 6e69 6100 0800 0c00 0000 | ....Lithuania....... Column 0 (x0000), Len 10 (x000a) 0000 0000 0000 0016 e361 | .........a Column 1 (x0001), Len 10 (x000a) 0000 0000 0000 000f 4241 | ........BA ....... GGS tokens: 5200 0014 4141 4157 6b35 4141 5141 4141 4153 6d41 | R...AAAWk5AAQAAAASmA 4259 0001 | BY.. . Logdump 1 >open ./dirdat/lt000000 Logdump 2 >ghdr on Logdump 3 >detail on Logdump 4 >detail data Logdump 5 >usertoken on Logdump 6 >ggstoken on Logdump 7 >next
  • 22.
    Examine Record -Header Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 157 (x009d) IO Time : 2015/04/07 21:48:58.000.000 IOType : 5 (x05) OrigNode : 255 (xff) TransInd : . (x01) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 622 AuditPos : 14273756 Continued : N (x00) RecCount : 1 (x01) .
  • 23.
    Examine Record -Body 2015/04/07 21:48:58.000.000 Insert Len 157 RBA 1818 Name: GGPDB.SOE.ADDRESSES After Image: Partition 4 G m 0000 000a 0000 0000 0000 0016 e361 0001 000a 0000 | .............a...... 0000 0000 000f 4241 0002 0015 0000 3230 3135 2d30 | ......BA......2015-0 342d 3037 3a32 313a 3438 3a30 3000 0300 0700 0000 | 4-07:21:48:00....... 0331 3432 0004 000f 0000 000b 5374 7265 6574 204e | .142........Street N 616d 6500 0500 0a00 0000 0649 7276 696e 6500 0600 | ame........Irvine... 0f00 0000 0b57 6573 7420 5375 7373 6578 0007 000d | .....West Sussex.... 0000 0009 4c69 7468 7561 6e69 6100 0800 0c00 0000 | ....Lithuania....... Column 0 (x0000), Len 10 (x000a) 0000 0000 0000 0016 e361 | .........a Column 1 (x0001), Len 10 (x000a) 0000 0000 0000 000f 4241 | ........BA ....... GGS tokens: 5200 0014 4141 4157 6b35 4141 5141 4141 4153 6d41 | R...AAAWk5AAQAAAASmA 4259 0001 | BY.. .