Logdump

You can use the GoldenGate Logdump utility to view records in the GoldenGate trail files. The Logdump

utility is part of the regular GoldenGate software installation. Logdump lets you view the unstructured

trail data in hex and ASCII format and count the number of records in the trail for debugging purposes.

You can also filter the trail for desired records and save them to a new trail for reprocessing if needed.

how to use logdump:

[[email protected] ogg]$ ./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 44 >help

FC [ | ]
    – Edit previous command

HISTORY                   – List previous commands

OPEN | FROM  <filename>   – Open a Log file

RECORD | REC              - Display audit record

NEXT [ ]          - Display next data record

SKIP [ ] [FILTER] – Skip down <count> records

FILTER               – Apply filter during skip

COUNT                     – Count the records in the file

[START[time] ,]

[END[time] ,]

[INT[erval] ,]

[LOG[trail] ,]

[FILE ,]

[DETAIL ]

<timestr> format is

[[yy]yy-mm-dd] [hh[:mm][:ss]]

POSITION [ | FIRST | LAST | EOF ] – Set position in file

REVerse | FORward              - Set read direction

RECLEN [ ]  - 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>

[,]

SCANFORRBA    (SFR) – Find the next record with <SYSKEY>

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

,<filename-template>

SCANFORTIME  (SFTS) – Find the next record with timestamp

<date-time string>

[,]

<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 ]- 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 [ | ]

FILTER MATCH     ANY | ALL

FILTER [INClude | EXCLude] <filter options>

<filter options> are

RECTYPE  <type number | type name>

STRING [BOTH] // [

]

HEX      <hex string>  [

]

TRANSID  <TMF transaction identifier>

FILENAME <filename template>

PROCESS  <processname template>

INT16    <16-bit integer>

INT32    <32-bit integer>

INT64    <64-bit integer>

STARTTIME <date-time string>

ENDTIME   <date-time string>

SYSKEY   [] <32/64-bit syskey>

SYSKEYLEN [] []

TRANSIND [] <nn>

UNDOFLAG [] <nn>

RECLEN   [] <nn>

AUDITRBA [] <nnnnnnnn>

ANSINAME <ansi table name>

GGSTOKEN <tokenname> [] []

USERTOKEN <tokenname> [] []

CSN | LogCSN [] []

<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 ( , [,])]
– Savefile Extent sizes on NSK

[MEGabytes ]             – For extent size calculation

[TRANSIND ]               – Set the transind field

[COMMITTS ]               – Set the committs field

USERTOKEN     on  | OFF | detail  - Show user token info

HEADERTOKEN   on  | OFF | detail  - Show header token info

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 ]       – sprintf format default %f

Logdump 45 >

Logdump 45 >history

23> n

24> n

25> n

26> n

27> n

28> n

29> open

30> open /opt/ogg/dirdat/k1000000

31> ghdr on

32> detail on

33> dat

34> detail data

35> usertoken on

36> n

37> sfh

38> filter include filename zbdba.test;

39> n

40> n

41> filter clear

42> env

43> fileheader detail

44> help

45> history

Logdump 50 >open ./dirdat/k1000005

Current LogTrail is /opt/ogg/dirdat/k1000005

After you open the trail file, you need to turn on some useful features to make full use of the

Logdump utility. The first command is GHDR ON. It enables display of the record header for the

transactions in the trail file for Oracle GoldenGate:

Logdump 51 >ghdr on

Next, you need to toggle the option for viewing the hex and ASCII values for trailfile data. To do so,

execute the detail data command:

Logdump 52 >detail data

Now you can move to the next record in the trail file by using the next command in Logdump. When

you issue the next command, Logdump moves forward one record:

Logdump 53 >next

2014/09/09 21:05:02.655.182 FileHeader           Len  1007 RBA 0

Name: *FileHeader*

3000 0196 3000 0008 4747 0d0a 544c 0a0d 3100 0002 | 0…0…GG..TL..1…

0003 3200 0004 2000 0000 3300 0008 02f2 28df 1908 | ..2… …3…..(…

bace 3400 0013 0011 7572 693a 6f67 6731 3a3a 6f70 | ..4…..uri:ogg1::op

743a 6f67 6736 0000 1a00 182f 6f70 742f 6f67 672f | t:ogg6…../opt/ogg/

6469 7264 6174 2f6b 3130 3030 3030 3537 0000 0101 | dirdat/k10000057….

3800 0004 0000 0005 39ff 0008 0000 0000 0000 0000 | 8…….9………..

3a00 0081 0731 3433 3339 3539 0000 0000 0000 0000 | :….1433959……..

Logdump 54 >n

___________________________________________________________________

Hdr-Ind    :     E  (x45)     Partition  :     .  (x00)

UndoFlag   :     .  (x00)     BeforeAfter:     A  (x41)

RecLength  :     0  (x0000)   IO Time    : 2014/09/09 21:05:02.628.813

IOType     :   150  (x96)     OrigNode   :     0  (x00)

TransInd   :     .  (x03)     FormatType :     R  (x52)

SyskeyLen  :     0  (x00)     Incomplete :     .  (x00)

AuditRBA   :          0       AuditPos   : 0

Continued  :     N  (x00)     RecCount   :     0  (x00)

2014/09/09 21:05:02.628.813 RestartAbend         Len     0 RBA 1015

Name:

After  Image:                                             Partition 0   G  s

Logdump 55 >n

___________________________________________________________________

Hdr-Ind    :     E  (x45)     Partition  :     .  (x04)

UndoFlag   :     .  (x00)     BeforeAfter:     B  (x42)

RecLength  :    46  (x002e)   IO Time    : 2014/09/09 23:14:09.000.000

IOType     :     3  (x03)     OrigNode   :   255  (xff)

TransInd   :     .  (x03)     FormatType :     R  (x52)

SyskeyLen  :     0  (x00)     Incomplete :     .  (x00)

AuditRBA   :         30       AuditPos   : 24111432

Continued  :     N  (x00)     RecCount   :     1  (x01)

2014/09/09 23:14:09.000.000 Delete               Len    46 RBA 1074

Name: OGG.GGS_MARKER

Before Image:                                             Partition 4   G  s

0000 0008 0000 0004 3130 3031 0001 0005 0000 0001 | ……..1001……..

3200 0200 1500 0032 3031 342d 3039 2d30 3420 3032 | 2……2014-09-04 02

3a33 373a 3331                                    | :37:31

Column     0 (x0000), Len     8 (x0008)

0000 0004 3130 3031                               | ….1001

Column     1 (x0001), Len     5 (x0005)

0000 0001 32                                      | ….2

Column     2 (x0002), Len    21 (x0015)

0000 3230 3134 2d30 392d 3034 2030 323a 3337 3a33 | ..2014-09-04 02:37:3

31                                                | 1

Logdump 56 >n

___________________________________________________________________

Hdr-Ind    :     E  (x45)     Partition  :     .  (x04)

UndoFlag   :     .  (x00)     BeforeAfter:     B  (x42)

RecLength  :    46  (x002e)   IO Time    : 2014/09/09 23:44:11.000.000

IOType     :     3  (x03)     OrigNode   :   255  (xff)

TransInd   :     .  (x03)     FormatType :     R  (x52)

SyskeyLen  :     0  (x00)     Incomplete :     .  (x00)

AuditRBA   :         30       AuditPos   : 24441148

Continued  :     N  (x00)     RecCount   :     1  (x01)

2014/09/09 23:44:11.000.000 Delete               Len    46 RBA 1235

Name: OGG.GGS_MARKER

Before Image:                                             Partition 4   G  s

0000 0008 0000 0004 3135 3137 0001 0005 0000 0001 | ……..1517……..

3200 0200 1500 0032 3031 342d 3039 2d30 3420 3232 | 2……2014-09-04 22

3a33 363a 3036                                    | :36:06

Column     0 (x0000), Len     8 (x0008)

0000 0004 3135 3137                               | ….1517

Column     1 (x0001), Len     5 (x0005)

0000 0001 32                                      | ….2

Column     2 (x0002), Len    21 (x0015)

0000 3230 3134 2d30 392d 3034 2032 323a 3336 3a30 | ..2014-09-04 22:36:0

36                                                | 6

Logdump 57 >

时间: 2024-11-05 14:46:45

Logdump的相关文章

GoldenGate的Logdump工具使用简介

Logdump工具是GoldenGate提供的一个用于查询.分析.过滤.查看和保存存储在trail文件或extract文件中的数据的工具. 1.启动Logdump工具 [[email protected] ~]$ cd /ogg [[email protected] ogg]$ ./logdump Oracle GoldenGate Log File Dump Utility for Oracle Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_1

使用OGG的logdump工具检查OGG trail file中存在不存在相关表的记录

本文是原创文章,转载请务必注明出处,否则谢绝转载:http://blog.csdn.net/msdnchina/article/details/47625661 OGG和logdump工具的关系,类似于Oracle Database 和logminer工具的关系. $ logdump Oracle GoldenGate Log File Dump Utility for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0

Oracle GoldenGate Logdump工具简要说明

Logdump enables you to search for, filter, view, and save data that is stored in a trail or extract file. 查看记录 [[email protected] ogg]$ ./logdump  Oracle GoldenGate Log File Dump Utility for Oracle Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_1512

ogg logdump工具使用介绍

转自:http://www.cnblogs.com/jimeper/p/4299530.html 在GGSCI中使用如下命令查看当前处理的队列文件和RBA号,例如:GGSCI (br-jl-accs-db1) 3> info REPYXAREPLICAT   REPYXA    Last Started 2011-01-08 19:48   Status RUNNINGCheckpoint Lag       00:00:00 (updated 136:41:42 ago)Log Read Ch

Logdump使用指引

Logdump使用指引 Logdump使用指引在GGSCI中使用如下命令查看当前处理的队列文件和RBA号,例如:GGSCI (br-jl-accs-db1) 3> info REPYXAREPLICAT   REPYXA    Last Started 2011-01-08 19:48   Status RUNNINGCheckpoint Lag       00:00:00 (updated 136:41:42 ago)Log Read Checkpoint  File ./dirdat/p1

Goldengate进程的合并与拆分规范

Goldengate抽取进程的合并与拆分原则 1.    文档综述 1.1.  文档说明 本文档描述了对GoldenGate的抽取进程进行拆分和合并的基本原则和详细步骤.  1.2.  读者范围 本文档主要容灾相关人员.纳入数据级容灾范围的应用系统相关人员使用,在Goldengate实施.运维的整个生命周期中,必须严格遵循本系列文档. 1.3.  术语说明 序号 完整说法 缩略说法 1 GoldenGate GG或OGG         2.      抽取进程的拆分 2.1.  拆分原则  

GoldenGate 异常处理预案

异常处理一般步骤 如果GoldenGate复制出现异常,可以通过以下步骤尝试解决问题: 1)        通过ggsci>view report命令查找ERROR字样,确定错误原因并根据其信息进行排除: 2)        通过ggsci>view ggsevt查看告警日志信息: 3)        检查两端数据库是否正常运行,网络是否连通: 4)        如不能确定错误原因,则可以寻求Oracle技术支持.在寻求技术支持时一般需要提供以下信息: ü  错误描述 ü  进程报告,位于d

GoldenGate 配置

准备:两个已经有数据库的虚拟机,现在关闭状态 --源端数据库的操作[[email protected] ~]# su - oracle[[email protected] ~]$ sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.4.0 Production on Sat Sep 19 13:54:26 2015 Copyright (c) 1982, 2013, Oracle.  All rights reserved. Connected

GoldenGate 1403错误解决方法

OGG  oracle goldengate 1403错误解决方法 1. 错误描述WARNING OGG-01154 Oracle GoldenGate Delivery for Oracle, repyxb.prm: SQL error 1403 mapping SGPM.P_SMS_SEND to SGPM.P_SMS_SEND.WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, repyxb.prm:  Repositionin