ogg logdump

来源:互联网 发布:霍华德巅峰数据 编辑:程序博客网 时间:2024/06/06 13:17

软件下载:https://edelivery.oracle.com/EPD/WelcomePage/get_form?ARU_LANG=ZHS

c:\ggs>logdumpOracle GoldenGate Log File Dump UtilityVersion 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.Logdump 1 >open C:\ggs\dirdat\pt000002Current LogTrail is C:\ggs\dirdat\pt000002Logdump 2 >pos 1438Reading forward from RBA 1438Logdump 3 >nLogdump 4 >helpFC [<num> | <string>]     - Edit previous commandHISTORY                   - List previous commandsOPEN | FROM  <filename>   - Open a Log fileRECORD | REC              - Display audit recordNEXT [ <count> ]          - Display next data recordSKIP [ <count> ] [FILTER] - Skip down <count> records     FILTER               - Apply filter during skipCOUNT                     - 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 directionRECLEN [ <size> ]  - Sets max output lengthEXIT | QUIT        - Exit the programFILES | FI | DIR   - Display filenamesENV                - Show current settingsVOLUME | VOL | V   - Change default volumeDEBUG              - Enter the debuggerGHDR  ON | OFF     - Toggle GHDR displayDETAIL ON | OFF | DATA - Toggle detailed data displayRECLEN <nnn>        - Set data display lengthSCANFORHEADER (SFH)  [PREV]  - Search for the start of a headerSCANFORTYPE   (SFT) - Find the next record of <TYPE>      <typename> | <typenumber>      [,<filename-template>]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>      [,<filename-template>]         <date-time string> format is           [[yy]yy-mm-dd] [hh[:mm][:ss]]SCANFORENDTRANS (SFET) - Find the end of the current transactionSCANFORNEXTTRANS (SFNT) - Find start of the next transactionSHOW <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 itemsBIO  <option>       - Set LargeBlock I/O info      [ON]          - Enable LargeBlock I/O (default)      [OFF]         - Disable LargeBlock I/O      [BLOCK <nnnn>]- Set LargeBlock I/O sizeTIMEOFFSET <option> - Set the time offset from GMT      [LOCAL]            - Use local time      [GMT]              - Use GMT time      [GMT +/- hh[:mm]]  - Offset +/- from GMTFILTER SHOWFILTER ENABLE | ON   - Enable filteringFILTER DISABLE | OFF - Disable filteringFILTER CLEAR [ <filterid> | <ALL> ]FILTER MATCH     ANY | ALLFILTER [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>       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, NEX <program> [string]  - Execute <program>TRANSHIST nnnn        - Set size of transaction historyTRANSRECLIMIT nnnn    - Set low record count thresholdTRANSBYTELIMIT nnnn   - Set low byte count thresholdLOG {STOP} | { [TO] <filename> } - Write a session logBEGIN <date-time>     - Set next read position using a timestampSAVEFILECOMMENT on | OFF  - Toggle comment records in a savefileSAVE <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 fieldUSERTOKEN     on  | OFF | detail  - Show user token infoHEADERTOKEN   on  | OFF | detail  - Show header token infoGGSTOKEN      on  | OFF | detail  - Show GGS token infoFILEHEADER    on  | OFF | detail  - Display file header contentsASCIIHEADER   ON  | off           - Toggle header charsetEBCDICHEADER  on  | OFF           - Toggle header charsetASCIIDATA     ON  | on            - Toggle user data charsetEBCDICDATA    on  | OFF           - Toggle user data charsetASCIIDUMP     ON  | off           - Toggle charset for hex/ascii displayEBCDICDUMP    on  | OFF           - Toggle charset for hex/ascii displayTRAILFORMAT   old | new           - Force trail typePRINTMXCOLUMNINFO  on | OFF       - Toggle SQL/MX columninfo displayTMFBEFOREIMAGE     on | OFF       - Toggle display of TMF before imagesFLOAT  <value>                    - Interpret a floating point number       [FORMAT <specifier>]       - sprintf format default %fLogdump 9 >pos 1438Reading forward from RBA 1438Logdump 10 >n2012/10/17 17:12:46.195.969 Insert               Len    28 RBA 1438Name: 000.TEST1After  Image:                                             Partition 4   G  s 0000 0006 0000 0002 3431 0001 000e 0000 000a 7464 | ........41........td 6164 6473 3333 3363                               | adds333cLogdump 17 >nLogdump 18 >pos 1577Reading forward from RBA 1577Logdump 19 >n2012/10/17 17:14:35.182.695 FieldComp            Len    26 RBA 1577Name: 000.TEST1After  Image:                                             Partition 4   G  s 0000 0004 ffff 0000 0001 000e 0000 000a 6165 6674 | ................aeft 7474 6173 6466                                    | ttasdfLogdump 20 >count** Count begins at RBA 1577LogTrail C:\ggs\dirdat\pt000002 has 1 recordsTotal Data Bytes                26  Avg Bytes/Record              26FieldComp                        1After Images                     1Average of 1 Transactions    Bytes/Trans .....         74    Records/Trans ...          1    Files/Trans .....          1Logdump 21 >show rectypeLogTrail record types    1 - Abort                             2 - Commit    3 - Delete                            4 - EndRollBack    5 - Insert                            6 - Prepared    7 - TMF-Shutdown                      8 - TransBegin    9 - TransRelease                     10 - Update   11 - UpdateComp                       12 - FileAlter   13 - FileCreate                       14 - FilePurge   15 - FieldComp                        16 - FileRename   17 - AuxPointer                       18 - NetworkCommit   19 - NetworkAbort                     20 - CurrentPos   90 - GGSSQLCol                       100 - GGSPurgedata  108 - GGSPurgedataPartonly            101 - GGSPurgeFile  102 - GGSCreateFile                   103 - GGSAlterFile  104 - GGSRenameFile                   105 - GGSSetmode  107 - GGSControl                      106 - GGSChangeLabel  115 - GGSPKUpdate                     117 - GGSPKUpdate32  116 - LargeObject                     132 - Sequence OP  150 - RestartAbend                    151 - RestartOK  152 - RecoveryEnd                     160 - DDLOP  161 - RecordFragment                  200 - GGSBulkio  201 - GGSFileClose                    202 - GGSLoggerTS  203 - GGSExtractTS                    204 - GGSCollectTS  205 - GGSComment                      250 - LibOpenTrace  251 - LibCloseTrace                   252 - LoggerOpenTrace  253 - LoggerCloseTrace                254 - LoggerAddedInfo  249 - LoggerAddedStats                255 - FileHeaderLogdump 22 >scanforendtransEnd of Transaction found at RBA 15772012/10/17 17:14:35.182.695 FieldComp            Len    26 RBA 1577Name: 000.TEST1After  Image:                                             Partition 4   G  s 0000 0004 ffff 0000 0001 000e 0000 000a 6165 6674 | ................aeft 7474 6173 6466                                    | ttasdfLogdump 23 >detail onLogdump 24 >


Hdr-Ind: 该值总是E,表示是extract process创建,如果为其他属性,则表示不可用。
UndoFlag:该属性正常值为0,当为1时则表示先前已经成功的记录进行撤销操作。
          这里我不清楚是不是指这种情况:例如一个大事务未commit的情况,数据已经写入
          到redo中,而ogg是读取redo进行同步的,在ogg抽取数据以后这个事务又被rollback了。

RecLength:record buffer长度,单位是bytes
IOType:表示操作类型,该属性有如下几种值:
3 - Delete
5 - Insert
10 - Update(full record)
15 - Update(compressed record)

TransInd:事务记录标志,有如下4种可能属性;

x00 - start of transaction                 
x01 - middle of transaction    
x02 - end of transaction       
x03 - only record in transaction

SyskeyLen:system key长度。如果system key存在,其第一个bytes表示system key记录,否则该值为0.

AuditRBA:事务record commit地址,同一个事务中,该值均相同。goldengate通过auditRBA+IO Time来确定
          一个事务,其值是唯一的。

Continued:该属性有两种值:Y和N,用来定义数据片大大小,通常lob,clob或varchar类型,该值是Y,否则是N。

Partition:该属性是goldengate内部使用的一个标示,并不是指os或数据库层面的逻辑分区和物理分区。windows和unix
           平台下,该属性值总是为4。
           对于Nonstop的记录,该属性的值取决于如下两个方面:
           1)存在Bulk IO操作的情况下,该值表示源端分区已经完成的bulk IO操作的数量。其取值范围为0~15.
           2)对于其他非bulk io操作的nonstop record情况下,该属性取值通常为0或4. 为4的情况,表示该数据为
              FiledComp record格式 (compress存储格式)。

BeforeAfter: 对于update操作,表示该数据是before image还是after image。对于insert操作,总是after images,
              而delete操作总是before images。

IO Time:记录提交时间,同一个事务内的所有记录,该属性值都是相同的,为GMT格式。

OrigNode:Nonstop情况下,表示extract数据抽取端的节点号,整个cluster内,每个节点的节点号都是唯一的。
          该属性取值范围是0~255. 除nonstop之外的其他情况,该属性值为0.

FormatType:表示数据是从事务日志读取还是直接从数据库中获取的。取值为F和R,F表示fetched from database。
            R表示readable in transaction log。

Incomplete:该属性值从10.4版本就已经废弃了,是向前兼容保留的。

AuditPos: 标示extract process在transaction log中的位置。

RecCount:在windows和unix平台下,ogg处理lob时,是将其split成chunk,然后将chunk写入到file中。
          recCount用来表示在读取时对chunk的合并。



对于logdump 看到的record 记录,其实iotype也就4种,3,5,10,15. 其中15表示compress record。
那么如何启用record的压缩存储呢?其实有个参数控制的,那就是auditcompress。

原创粉丝点击