You are on page 1of 6

7/27/2017 Using Oracle Golden Gate logdump utility

Using Oracle Golden Gate logdump utility


oracle golden gate logdump utility is used to view, filter and perform various other task on extract or trail file. in this blog,
we will read a golden gate trail file using logdump utility

(GG112-DB:ODIREPO)$ ./logdump

Oracle GoldenGate Log File Dump Utility for Oracle


Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.

Logdump 1 >open ./dirdat/tr000006


Current LogTrail is /u02/gg1120/dirdat/tr000006
Logdump 2 >ghdr on
Logdump 3 >detail on
Logdump 4 >detail data
Logdump 5 >usertoken on
Logdump 6 >n

2014/05/13 02:54:27.443.867 FileHeader Len 1030 RBA 0


Name: *FileHeader*
3000 01a2 3000 0008 4747 0d0a 544c 0a0d 3100 0002 | 0...0...GG..TL..1...
0003 3200 0004 2000 0000 3300 0008 02f2 1f75 fdad | ..2... ...3......u..
049b 3400 0026 0024 7572 693a 6767 736f 7572 6365 | ..4..&.$uri:ggsource
3a6c 6f63 616c 646f 6d61 696e 3a3a 7530 323a 6767 | :localdomain::u02:gg
3131 3230 3600 0013 0011 2e2f 6469 7264 6174 2f74 | 11206....../dirdat/t
7230 3030 3030 3637 0000 0101 3800 0004 0000 0006 | r0000067....8.......
39ff 0008 0000 0000 0000 0000 3a00 0081 0731 3138 | 9...........:....118

Logdump 7 >n
___________________________________________________________________
Hdr-Ind : E (x45) Partition : . (x00)
UndoFlag : . (x00) BeforeAfter: A (x41)
RecLength : 0 (x0000) IO Time : 2014/05/13 02:54:27.443.867
IOType : 151 (x97) OrigNode : 0 (x00)
TransInd : . (x03) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 0 AuditPos : 0
Continued : N (x00) RecCount : 0 (x00)
http://mrafeyblog.blogspot.in/2014/05/using-oracle-golden-gate-logdump-utility.html 1/6
7/27/2017 Using Oracle Golden Gate logdump utility

2014/05/13 02:54:27.443.867 RestartOK Len 0 RBA 1038


Name:
After Image: Partition 0 G s
Logdump 8 >n
___________________________________________________________________
Hdr-Ind : E (x45) Partition : . (x04)
UndoFlag : . (x00) BeforeAfter: A (x41)
RecLength : 49 (x0031) IO Time : 2014/05/13 03:24:27.000.000
IOType : 5 (x05) OrigNode : 255 (xff)
TransInd : . (x03) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 121 AuditPos : 12087824
Continued : N (x00) RecCount : 1 (x01)
2014/05/13 03:24:27.000.000 Insert Len 49 RBA 1099
Name: TEST.TCUSTMER
After Image: Partition 4 G s
0000 0008 0000 0004 3231 3031 0001 0008 0000 0004 | ........2101........
5445 5354 0002 000d 0000 0009 5341 4e20 4449 4547 | TEST........SAN DIEG
4f00 0300 0400 0043 41 | O......CA
Column 0 (x0000), Len 8 (x0008)
0000 0004 3231 3031 | ....2101
Column 1 (x0001), Len 8 (x0008)
0000 0004 5445 5354 | ....TEST
Column 2 (x0002), Len 13 (x000d)
0000 0009 5341 4e20 4449 4547 4f | ....SAN DIEGO
Column 3 (x0003), Len 4 (x0004)
0000 4341 | ..CA

Comment: IO Type = 5 (insert), other possible values are below

3 - Delete
5 - Insert
10 - Update(full record)
15 - Update(compressed record)

other important column to notice is TransInd

x00 - start of transaction

http://mrafeyblog.blogspot.in/2014/05/using-oracle-golden-gate-logdump-utility.html 2/6
7/27/2017 Using Oracle Golden Gate logdump utility

x01 - middle of transaction


x02 - end of transaction
x03 - only record in transaction

Logdump 10 >help

FC [<num> | <string>] - Edit previous command


HISTORY - List previous commands
OPEN | FROM <filename> - Open a Log file
RECORD | REC - Display audit record
NEXT [ <count> ] - Display next data record
SKIP [ <count> ] [FILTER] - Skip down <count> records
FILTER - Apply filter during skip
COUNT - Count the records in the file
[START[time] <timestr>,]
[END[time] <timestr>,]
[INT[erval] <minutes>,]
[LOG[trail] <wildcard-template>,]
[FILE <wildcard-template>,]
[DETAIL ]
<timestr> format is
[[yy]yy-mm-dd] [hh[:mm][:ss]]
POSITION [ <rba> | FIRST | LAST | EOF ] - Set position in file
REVerse | FORward - Set read direction
RECLEN [ <size> ] - Sets max output length
EXIT | QUIT - Exit the program
FILES | FI | DIR - Display filenames
ENV - Show current settings
VOLUME | VOL | V - Change default volume
DEBUG - Enter the debugger
GHDR ON | OFF - Toggle GHDR display
DETAIL ON | OFF | DATA - Toggle detailed data display
RECLEN <nnn> - Set data display length
SCANFORHEADER (SFH) [PREV] - Search for the start of a header
SCANFORTYPE (SFT) - Find the next record of <TYPE>
<typename> | <typenumber>
[,<filename-template>]
SCANFORRBA (SFR) - Find the next record with <SYSKEY>

http://mrafeyblog.blogspot.in/2014/05/using-oracle-golden-gate-logdump-utility.html 3/6
7/27/2017 Using Oracle Golden Gate logdump utility

<syskey> - syskey = -1 scans for next record


,<filename-template>
SCANFORTIME (SFTS) - Find the next record with timestamp
<date-time string>
[,<filename-template>]
<date-time string> format is
[[yy]yy-mm-dd] [hh[:mm][:ss]]
SCANFORENDTRANS (SFET) - Find the end of the current transaction
SCANFORNEXTTRANS (SFNT) - Find start of the next transaction
SHOW <option> - Display internal information
[OPEN] - list open files
[TIME] - print current time in various formats
[ENV] - show current environment
[RECTYPE] - show list of record types
[FILTER] - show active filter items
BIO <option> - Set LargeBlock I/O info
[ON] - Enable LargeBlock I/O (default)
[OFF] - Disable LargeBlock I/O
[BLOCK <nnnn>]- Set LargeBlock I/O size
TIMEOFFSET <option> - Set the time offset from GMT
[LOCAL] - Use local time
[GMT] - Use GMT time
[GMT +/- hh[:mm]] - Offset +/- from GMT
FILTER SHOW
FILTER ENABLE | ON - Enable filtering
FILTER DISABLE | OFF - Disable filtering
FILTER CLEAR [ <filterid> | <ALL> ]
FILTER MATCH ANY | ALL
FILTER [INClude | EXCLude] <filter options>
<filter options> are
RECTYPE <type number | type name>
STRING [BOTH] /<text>/ [<column range>]
HEX <hex string> [<column range>]
TRANSID <TMF transaction identifier>
FILENAME <filename template>
PROCESS <processname template>
INT16 <16-bit integer>
INT32 <32-bit integer>

http://mrafeyblog.blogspot.in/2014/05/using-oracle-golden-gate-logdump-utility.html 4/6
7/27/2017 Using Oracle Golden Gate logdump utility

INT64 <64-bit integer>


STARTTIME <date-time string>
ENDTIME <date-time string>
SYSKEY [<comparison>] <32/64-bit syskey>
SYSKEYLEN [<comparison>] [<value>]
TRANSIND [<comparison>] <nn>
UNDOFLAG [<comparison>] <nn>
RECLEN [<comparison>] <nn>
AUDITRBA [<comparison>] <nnnnnnnn>
ANSINAME <ansi table name>
GGSTOKEN <tokenname> [<comparison>] [<tokenvalue>]
USERTOKEN <tokenname> [<comparison>] [<tokenvalue>]
CSN | LogCSN [<comparison>] [<value>]
<column range>
<start column>:<end column>, ie 0:231
<comparison>
=, ==, !=, <>, <, >, <=, >= EQ, GT, LE, GE, LE, NE
X <program> [string] - Execute <program>
TRANSHIST nnnn - Set size of transaction history
TRANSRECLIMIT nnnn - Set low record count threshold
TRANSBYTELIMIT nnnn - Set low byte count threshold
LOG {STOP} | { [TO] <filename> } - Write a session log
BEGIN <date-time> - Set next read position using a timestamp
SAVEFILECOMMENT on | OFF - Toggle comment records in a savefile
SAVE <savefilename> [!] <options> - Write data to a savefile
<options> are
nnn RECORDS | nnn BYTES
[NOCOMMENT] - Suppress the Comment header/trailer recs, Default
[COMMENT] - Insert Comment header/trailer recs
[OLDFORMAT] - Force oldformat records
[NEWFORMAT] - Force newformat records
[TRUNCATE ] - purgedata an existing savefile
[EXT ( <pri>, <sec> [,<max>])] - Savefile Extent sizes on NSK
[MEGabytes <nnnn>] - For extent size calculation
[TRANSIND <nnn>] - Set the transind field
[COMMITTS <nnn>] - Set the committs field
USERTOKEN on | OFF | detail - Show user token info
HEADERTOKEN on | OFF | detail - Show header token info

http://mrafeyblog.blogspot.in/2014/05/using-oracle-golden-gate-logdump-utility.html 5/6
7/27/2017 Using Oracle Golden Gate logdump utility

GGSTOKEN on | OFF | detail - Show GGS token info


FILEHEADER on | OFF | detail - Display file header contents
ASCIIHEADER ON | off - Toggle header charset
EBCDICHEADER on | OFF - Toggle header charset
ASCIIDATA ON | on - Toggle user data charset
EBCDICDATA on | OFF - Toggle user data charset
ASCIIDUMP ON | off - Toggle charset for hex/ascii display
EBCDICDUMP on | OFF - Toggle charset for hex/ascii display
TRAILFORMAT old | new - Force trail type
PRINTMXCOLUMNINFO on | OFF - Toggle SQL/MX columninfo display
TMFBEFOREIMAGE on | OFF - Toggle display of TMF before images
FLOAT <value> - Interpret a floating point number
[FORMAT <specifier>] - sprintf format default %f
Posted 13th May 2014 by Rafey
Labels: Golden Gate

0 Add a comment

Enter your comment...

Comment as: bj (Google) Sign out

Publish Preview Notify me

http://mrafeyblog.blogspot.in/2014/05/using-oracle-golden-gate-logdump-utility.html 6/6

You might also like