goldengate 学习系列4-logdump
本站文章除注明转载外,均为本站原创: 转载自love wife love life —Roger的Oracle/MySQL/PostgreSQL数据恢复博客
本文链接地址: goldengate 学习系列4-logdump
logdump是ogg自带的一个用于分析trail文件的工具,该工具还不错,提供了一些列的命令,如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
Logdump 92 >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> <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> 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 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 |
我们常用的命令可能并不多,下面简单列一些,来自官方文档:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
Logdump 1 >open /u01/ggs/dirdat/ex000019 ----打开trail文件 Logdump 1 >ghdr on ---查看header record信息 Logdump 2 >detail on ---Column information includes the number and length in hex and ASCII. Logdump 3> DETAIL DATA ---To add hex and ASCII data values to the column information: Logdump 4> USERTOKEN ON ---view user tokens Logdump 5> RECLEN <length> ----控制显示的长度 Logdump 7> NEXT or N ----To go to the first record and then move through records in sequence Logdump 35> POS <rba> Logdump 36> N ----To go to an RBA anywhere in the file Logdump 37> POS FIRST 或 pos 0 ----查看file中低一条记录 +++++++ 基于表名进行过滤操作 Logdump 60> FILTER INCLUDE/EXCLUDE FILENAME <schema>.<table> Logdump 61> N ----基于某表名进行过滤 Logdump 62> FILTER CLEAR ----清除当前的过滤设置 +++++++ 多条件进行过滤 Logdump 65> FILTER INCLUDE FILENAME <schema>.<table>; FILTER RECTYPE <record_type>; FILTER MATCH ALL Logdump 67> COUNT ---- 统计当前trail文件的记录 +++++++ To save records to a new trail file ----保存整个trail文件 Logdump 68> SAVE <file> Where: <file> is the name of the new file. ----保存某些record记录 Logdump 69> SAVE <file> <n> RECORDS To close the current file and open the next one in the trail Logdump 70> NEXTTRAIL ++++++++ To keep a log of your session ----保存日志 Logdump 71> LOG TO <filename>.txt ----To write text to the log: Logdump 72> WRITELOG “<text>” Logdump 73> LOG STOP ++++++ To see the current Logdump environment Logdump 74> ENV |
下面来尝试一下,如何使用logdump 来分析某个trail文件。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
-bash-3.00$ ./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 71 >open ./dirdat/rm000018 Current LogTrail is /home/ggs/ggs_home/dirdat/rm000018 Logdump 72 >ghdr on Logdump 73 >detail on Logdump 74 >detail data Logdump 75 >usertoken on Logdump 84 >FILTER include filename ROGER.T; Logdump 85 >next ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: B (x42) RecLength : 200 (x00c8) IO Time : 2012/08/31 07:35:43.060.853 IOType : 3 (x03) OrigNode : 255 (xff) TransInd : . (x00) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 8 AuditPos : 19677200 Continued : N (x00) RecCount : 1 (x01) 2012/08/31 07:35:43.060.853 Delete Len 200 RBA 37501 Name: ROGER.T Before Image: Partition 4 G b 0000 000a 0000 0006 5055 424c 4943 0001 0016 0000 | ........PUBLIC...... 0012 4756 2444 425f 4341 4348 455f 4144 5649 4345 | ..GV$DB_CACHE_ADVICE 0002 0004 ffff 0000 0003 0008 0000 0004 3230 3437 | ................2047 0004 0004 ffff 0000 0005 000b 0000 0007 5359 4e4f | ................SYNO 4e59 4d00 0600 1500 0032 3030 352d 3036 2d33 303a | NYM......2005-06-30: 3139 3a31 313a 3034 0007 0015 0000 3230 3035 2d30 | 19:11:04......2005-0 362d 3330 3a31 393a 3131 3a30 3400 0800 1700 0000 | 6-30:19:11:04....... Column 0 (x0000), Len 10 (x000a) 0000 0006 5055 424c 4943 | ....PUBLIC Column 1 (x0001), Len 22 (x0016) 0000 0012 4756 2444 425f 4341 4348 455f 4144 5649 | ....GV$DB_CACHE_ADVI 4345 | CE Column 2 (x0002), Len 4 (x0004) ffff 0000 | .... Column 3 (x0003), Len 8 (x0008) 0000 0004 3230 3437 | ....2047 Column 4 (x0004), Len 4 (x0004) ffff 0000 | .... Column 5 (x0005), Len 11 (x000b) 0000 0007 5359 4e4f 4e59 4d | ....SYNONYM Column 6 (x0006), Len 21 (x0015) 0000 3230 3035 2d30 362d 3330 3a31 393a 3131 3a30 | ..2005-06-30:19:11:0 34 | 4 Column 7 (x0007), Len 21 (x0015) 0000 3230 3035 2d30 362d 3330 3a31 393a 3131 3a30 | ..2005-06-30:19:11:0 34 | 4 Column 8 (x0008), Len 23 (x0017) 0000 0013 3230 3035 2d30 362d 3330 3a31 393a 3131 | ....2005-06-30:19:11 3a30 34 | :04 Column 9 (x0009), Len 9 (x0009) 0000 0005 5641 4c49 44 | ....VALID Column 10 (x000a), Len 5 (x0005) 0000 0001 4e | ....N Column 11 (x000b), Len 5 (x0005) 0000 0001 4e | ....N Column 12 (x000c), Len 5 (x0005) 0000 0001 4e | ....N Filtering suppressed 161 records Logdump 86 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: B (x42) RecLength : 197 (x00c5) IO Time : 2012/08/31 07:35:43.060.853 IOType : 3 (x03) OrigNode : 255 (xff) TransInd : . (x01) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 8 AuditPos : 19677888 Continued : N (x00) RecCount : 1 (x01) 2012/08/31 07:35:43.060.853 Delete Len 197 RBA 37810 Name: ROGER.T Before Image: Partition 4 G m 0000 0007 0000 0003 5359 5300 0100 1900 0000 1547 | ........SYS........G 565f 2453 4741 5f54 4152 4745 545f 4144 5649 4345 | V_$SGA_TARGET_ADVICE 0002 0004 ffff 0000 0003 0008 0000 0004 3230 3438 | ................2048 0004 0004 ffff 0000 0005 0008 0000 0004 5649 4557 | ................VIEW 0006 0015 0000 3230 3035 2d30 362d 3330 3a31 393a | ......2005-06-30:19: 3131 3a30 3400 0700 1500 0032 3030 352d 3036 2d33 | 11:04......2005-06-3 303a 3139 3a31 313a 3034 0008 0017 0000 0013 3230 | 0:19:11:04........20 Column 0 (x0000), Len 7 (x0007) 0000 0003 5359 53 | ....SYS Column 1 (x0001), Len 25 (x0019) 0000 0015 4756 5f24 5347 415f 5441 5247 4554 5f41 | ....GV_$SGA_TARGET_A 4456 4943 45 | DVICE Column 2 (x0002), Len 4 (x0004) ffff 0000 | .... Column 3 (x0003), Len 8 (x0008) 0000 0004 3230 3438 | ....2048 Column 4 (x0004), Len 4 (x0004) ffff 0000 | .... Column 5 (x0005), Len 8 (x0008) 0000 0004 5649 4557 | ....VIEW Column 6 (x0006), Len 21 (x0015) 0000 3230 3035 2d30 362d 3330 3a31 393a 3131 3a30 | ..2005-06-30:19:11:0 34 | 4 Column 7 (x0007), Len 21 (x0015) 0000 3230 3035 2d30 362d 3330 3a31 393a 3131 3a30 | ..2005-06-30:19:11:0 34 | 4 Column 8 (x0008), Len 23 (x0017) 0000 0013 3230 3035 2d30 362d 3330 3a31 393a 3131 | ....2005-06-30:19:11 3a30 34 | :04 Column 9 (x0009), Len 9 (x0009) 0000 0005 5641 4c49 44 | ....VALID Column 10 (x000a), Len 5 (x0005) 0000 0001 4e | ....N Column 11 (x000b), Len 5 (x0005) 0000 0001 4e | ....N Column 12 (x000c), Len 5 (x0005) 0000 0001 4e | ....N Logdump 87 > Logdump 87 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: B (x42) RecLength : 202 (x00ca) IO Time : 2012/08/31 07:35:43.060.853 IOType : 3 (x03) OrigNode : 255 (xff) TransInd : . (x01) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 8 AuditPos : 19678284 Continued : N (x00) RecCount : 1 (x01) 2012/08/31 07:35:43.060.853 Delete Len 202 RBA 38093 Name: ROGER.T Before Image: Partition 4 G m 0000 000a 0000 0006 5055 424c 4943 0001 0018 0000 | ........PUBLIC...... 0014 4756 2453 4741 5f54 4152 4745 545f 4144 5649 | ..GV$SGA_TARGET_ADVI 4345 0002 0004 ffff 0000 0003 0008 0000 0004 3230 | CE................20 3439 0004 0004 ffff 0000 0005 000b 0000 0007 5359 | 49................SY 4e4f 4e59 4d00 0600 1500 0032 3030 352d 3036 2d33 | NONYM......2005-06-3 303a 3139 3a31 313a 3034 0007 0015 0000 3230 3035 | 0:19:11:04......2005 2d30 362d 3330 3a31 393a 3131 3a30 3400 0800 1700 | -06-30:19:11:04..... Column 0 (x0000), Len 10 (x000a) 0000 0006 5055 424c 4943 | ....PUBLIC Column 1 (x0001), Len 24 (x0018) 0000 0014 4756 2453 4741 5f54 4152 4745 545f 4144 | ....GV$SGA_TARGET_AD 5649 4345 | VICE Column 2 (x0002), Len 4 (x0004) ffff 0000 | .... Column 3 (x0003), Len 8 (x0008) 0000 0004 3230 3439 | ....2049 Column 4 (x0004), Len 4 (x0004) ffff 0000 | .... Column 5 (x0005), Len 11 (x000b) 0000 0007 5359 4e4f 4e59 4d | ....SYNONYM Column 6 (x0006), Len 21 (x0015) 0000 3230 3035 2d30 362d 3330 3a31 393a 3131 3a30 | ..2005-06-30:19:11:0 34 | 4 Column 7 (x0007), Len 21 (x0015) 0000 3230 3035 2d30 362d 3330 3a31 393a 3131 3a30 | ..2005-06-30:19:11:0 34 | 4 Column 8 (x0008), Len 23 (x0017) 0000 0013 3230 3035 2d30 362d 3330 3a31 393a 3131 | ....2005-06-30:19:11 3a30 34 | :04 Column 9 (x0009), Len 9 (x0009) 0000 0005 5641 4c49 44 | ....VALID Column 10 (x000a), Len 5 (x0005) 0000 0001 4e | ....N Column 11 (x000b), Len 5 (x0005) 0000 0001 4e | ....N Column 12 (x000c), Len 5 (x0005) 0000 0001 4e | ....N Logdump 88 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: B (x42) RecLength : 198 (x00c6) IO Time : 2012/08/31 07:35:43.060.853 IOType : 3 (x03) OrigNode : 255 (xff) TransInd : . (x01) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 8 AuditPos : 19678668 Continued : N (x00) RecCount : 1 (x01) 2012/08/31 07:35:43.060.853 Delete Len 198 RBA 38381 Name: ROGER.T Before Image: Partition 4 G m 0000 0007 0000 0003 5359 5300 0100 1a00 0000 1647 | ........SYS........G 565f 2453 4547 4d45 4e54 5f53 5441 5449 5354 4943 | V_$SEGMENT_STATISTIC 5300 0200 04ff ff00 0000 0300 0800 0000 0432 3035 | S................205 3000 0400 04ff ff00 0000 0500 0800 0000 0456 4945 | 0................VIE 5700 0600 1500 0032 3030 352d 3036 2d33 303a 3139 | W......2005-06-30:19 3a31 313a 3034 0007 0015 0000 3230 3035 2d30 362d | :11:04......2005-06- 3330 3a31 393a 3131 3a30 3400 0800 1700 0000 1332 | 30:19:11:04........2 Column 0 (x0000), Len 7 (x0007) 0000 0003 5359 53 | ....SYS Column 1 (x0001), Len 26 (x001a) 0000 0016 4756 5f24 5345 474d 454e 545f 5354 4154 | ....GV_$SEGMENT_STAT 4953 5449 4353 | ISTICS Column 2 (x0002), Len 4 (x0004) ffff 0000 | .... Column 3 (x0003), Len 8 (x0008) 0000 0004 3230 3530 | ....2050 Column 4 (x0004), Len 4 (x0004) ffff 0000 | .... Column 5 (x0005), Len 8 (x0008) 0000 0004 5649 4557 | ....VIEW Column 6 (x0006), Len 21 (x0015) 0000 3230 3035 2d30 362d 3330 3a31 393a 3131 3a30 | ..2005-06-30:19:11:0 34 | 4 Column 7 (x0007), Len 21 (x0015) 0000 3230 3035 2d30 362d 3330 3a31 393a 3131 3a30 | ..2005-06-30:19:11:0 34 | 4 Column 8 (x0008), Len 23 (x0017) 0000 0013 3230 3035 2d30 362d 3330 3a31 393a 3131 | ....2005-06-30:19:11 3a30 34 | :04 Column 9 (x0009), Len 9 (x0009) 0000 0005 5641 4c49 44 | ....VALID Column 10 (x000a), Len 5 (x0005) 0000 0001 4e | ....N Column 11 (x000b), Len 5 (x0005) 0000 0001 4e | ....N Column 12 (x000c), Len 5 (x0005) 0000 0001 4e | ....N |
由于ogg trail文件都是以事务为单位进行记录的,可以看到,上面的每次n操作的输出信息都是
一条记录,ogg这里确定一个事务是通过IO Time+AuditRBA来确认的,这是惟一的。
下面来完整的解析trail:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
Logdump 10 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 49 (x0031) IO Time : 2012/08/31 06:00:18.737.774 IOType : 15 (x0f) OrigNode : 255 (xff) TransInd : . (x00) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 8 AuditPos : 9637392 Continued : N (x00) RecCount : 1 (x01) 2012/08/31 06:00:18.737.774 FieldComp Len 49 RBA 1600 Name: GGS.MPS After Image: Partition 4 G b 0000 000a ffff 0000 0000 0000 0000 0007 001f 0000 | .................... 3230 3132 2d30 382d 3331 3a30 363a 3030 3a32 302e | 2012-08-31:06:00:20. 3832 3330 3030 3030 30 | 823000000 Column 0 (x0000), Len 10 (x000a) ffff 0000 0000 0000 0000 | .......... Column 7 (x0007), Len 31 (x001f) 0000 3230 3132 2d30 382d 3331 3a30 363a 3030 3a32 | ..2012-08-31:06:00:2 302e 3832 3330 3030 3030 30 | 0.823000000 |
下面是关于上面输出信息header记录的完整解释:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
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。 |
关于ogg中iotype类型,有一个完整的操作列表,如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
Logdump 72 >show rectype LogTrail 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 - FileHeader |
Leave a Reply
You must be logged in to post a comment.