Logdump使用指引 在GGSCI中使用以下命令查看當前處理的隊列文件和RBA號,例如: GGSCI (br-jl-accs-db1) 3> info REPYXA REPLICAT REPYXA Last Started 2011-01-08 19:48 Status RUNNING Checkpoint Lag 00:00:00 (updated 136:41:42 ago) Log Read Checkpoint File ./dirdat/p1000556 First Record RBA 59193235 檢查discard file: GGSCI (edvmr1p0) 3> sh more dirrpt/rep_5b.dsc GGSCI (edvmr1p0) 4> dblogin userid source, password ggs GGSCI (edvmr1p0) 5> info trandata SOURCE.EMP5B 檢查這個SQL所在的事務,用Logdump: [oracle@edvmr1p0 OGG_Target]$ logdump Logdump 46 >open ./dirdat/5b000000 Current LogTrail is /home/oracle/OGG_Target/dirdat/5b000000 Logdump 47 >ghdr on Logdump 48 >detail on Logdump 49 >detail data Logdump 50 >usertoken on Logdump 51 >pos 153345 Reading forward from RBA 153345 從Discard File獲取這條記錄的RBA,經過Logdump定位到這條記錄 Logdump 60 >pos 153345 Reading forward from RBA 153345 Logdump 61 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 28 (x001c) IO Time : 2011/04/08 00:30:59.001.728 IOType : 15 (x0f) OrigNode : 255 (xff) TransInd : . (x00) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 231 AuditPos : 11214352 Continued : N (x00) RecCount : 1 (x01) 2011/04/08 00:30:59.001.728 FieldComp Len 28 RBA 153345 Name: SOURCE.EMP5B After Image: Partition 4 G b 0000 000a ffff 0000 0000 0000 0000 0006 000a 0000 | .................... 0000 0000 0000 03e8 | ........ Column 0 (x0000), Len 10 (x000a) Column 6 (x0006), Len 10 (x000a) 爲了避免破壞事務的完整性,找到這個SQL的事務結尾,找到下個事務的起始RBA Logdump 62 >scanforendtrans End of Transaction found at RBA 165149 ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 28 (x001c) IO Time : 2011/04/08 00:30:59.001.728 IOType : 15 (x0f) OrigNode : 255 (xff) TransInd : . (x02) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 231 AuditPos : 11246304 Continued : N (x00) RecCount : 1 (x01) 2011/04/08 00:30:59.001.728 FieldComp Len 28 RBA 165149 Name: SOURCE.EMP5B After Image: Partition 4 G e 0000 000a ffff 0000 0000 0000 0000 0006 000a 0000 | .................... 0000 0000 0001 86a0 | ........ Column 0 (x0000), Len 10 (x000a) Column 6 (x0006), Len 10 (x000a) Logdump 63 >pos 165149 Reading forward from RBA 165149 Logdump 64 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 28 (x001c) IO Time : 2011/04/08 00:30:59.001.728 IOType : 15 (x0f) OrigNode : 255 (xff) TransInd : . (x02) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 231 AuditPos : 11246304 Continued : N (x00) RecCount : 1 (x01) 2011/04/08 00:30:59.001.728 FieldComp Len 28 RBA 165149 Name: SOURCE.EMP5B After Image: Partition 4 G e 0000 000a ffff 0000 0000 0000 0000 0006 000a 0000 | .................... 0000 0000 0001 86a0 | ........ Column 0 (x0000), Len 10 (x000a) Column 6 (x0006), Len 10 (x000a) 經過Scanforheader知道下一個事務的開始 Logdump 65 >scanforheader ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x04) UndoFlag : . (x00) BeforeAfter: B (x42) RecLength : 14 (x000e) IO Time : 2011/04/08 00:30:59.001.728 IOType : 3 (x03) OrigNode : 255 (xff) TransInd : . (x00) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 231 AuditPos : 11247120 Continued : N (x00) RecCount : 1 (x01) 2011/04/08 00:30:59.001.728 Delete Len 14 RBA 165268 Name: SOURCE.EMP5B Before Image: Partition 4 G b 0000 000a 0000 0000 0000 0000 0315 | .............. Column 0 (x0000), Len 10 (x000a) Solution: GGSCI (edvmr1p0) 5> alter REP_5B, extseqno 0, extrba 165268 REPLICAT altered.