本文主要講述:
目前創(chuàng)新互聯(lián)已為近千家的企業(yè)提供了網站建設、域名、雅安服務器托管、網站運營、企業(yè)網站設計、劍河網站維護等服務,公司將堅持客戶導向、應用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。
1.ogg 如何跳過事務
2.logdump 在事務尋找中的關鍵作用
復制進程 abended
GGSCI (ORALTDB.eastmoney.com.sh) 12> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING REPLICAT ABENDED REP_MI01 00:00:00 00:00:25 |
如果要使用 logdump 的話,需要知道進程正在處理的文件,如何獲取這個文件呢?
對于抽取進程來說:
1. 操作系統(tǒng)上最后一個 trail 文件一定是 abended 時正在處理的文件
2. 通過命令查看 info < 進程名 >,detail
對于復制進程來說,操作系統(tǒng)最后一個文件不一定是 replicat 進程正在處理的文件了:
1.info < 進程名 >
2.info < 進程名 >,detail
查看復制進程當前處理的文件和處理到的 RBA 地址
GGSCI (ORALTDB.eastmoney.com.sh) 13> info REP_MI01
REPLICAT REP_MI01 Last Started 2018-12-13 15:07 Status ABENDED Checkpoint Lag 00:00:00 (updated 00:00:35 ago) Log Read Checkpoint File /u01/app/oracle/products/ogg/dirdat/pump_mi01/ p1000000012 2018-12-13 15:04:13.394312 RBA 18728239
|
logdump 工具
[ogg@ORALTDB ogg]$ ./logdump
Oracle GoldenGate Log File Dump Utility for Oracle Version 12.2.0.1.170221 OGGCORE_12.2.0.1.0OGGBP_PLATFORMS_170123.1033
Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
2018-12-13 15:10:33 WARNING OGG-10173 (GLOBALS) line 1: Parsing error, [NOUSEANSISQLQUOTES] is deprecated.
2018-12-13 15:10:33 INFO OGG-06323 NOUSEANSISQLQUOTES is specified. Non ANSI SQL string syntax is used for parameter. Logdump 1 > open /u01/app/oracle/products/ogg/dirdat/pump_mi01/p1000000012 Current LogTrail is /u01/app/oracle/products/ogg/dirdat/pump_mi01/p1000000012 Logdump 2 > pos 18728239 --info 命令查出的 rba 地址 Reading forward from RBA 18728239 Logdump 3 >detail data Logdump 4 >ggstoken detail Logdump 5 >ghdr on Logdump 6 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x00) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 82 (x0052) IO Time : 2018/12/13 15:07:30.282.502 IOType : 170 (xaa) OrigNode : 1 (x01) TransInd : . (x03) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) DDR/TDR Idx: (002, 000) AuditPos : 34596880 Continued : N (x00) RecCount : 1 (x01)
2018/12/13 15:07:30.282.502 Metadata Len 82 RBA 18728239 Name: * DDR Version: 1 Database type: ORACLE Character set ID: zhs16gbk National character set ID: UTF-16 Locale: neutral Case sensitivity: 14 14 14 14 14 14 14 14 14 14 14 14 11 14 14 14 TimeZone: GMT Global name: QUALITY * |
注意 TransInd :
(x00) 事務開始
(x01) 事務中
(x02) 事務最后
(x03) 單條事務
直接跳到當前事務的最后一條
Logdump 9 > sfet End of Transaction found at RBA 49635302 ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x0c) UndoFlag : . (x00) BeforeAfter: B (x42) RecLength : 259 (x0103) IO Time : 2018/12/13 15:07:26.016.944 IOType : 3 (x03) OrigNode : 255 (xff) TransInd : . (x02) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) AuditRBA : 942 AuditPos : 98381560 Continued : N (x00) RecCount : 1 (x01)
2018/12/13 15:07:26.016.944 Delete Len 259 RBA 49635302 Name: MING.T4 (TDR Index: 2) Before Image: Partition 12 G e 0000 0007 0000 0003 5359 5300 0100 2200 0000 1e2f | ........SYS..."..../ 3837 3638 6634 3335 5f54 6578 7446 6965 6c64 4163 | 8768f435_TextFieldAc 6365 7373 6962 6c65 4100 0200 04ff ff00 0000 0300 | cessibleA........... 0900 0000 0533 3732 3932 0004 0004 ffff 0000 0005 | .....37292.......... 000e 0000 000a 4a41 5641 2043 4c41 5353 0006 0015 | ......JAVA CLASS.... 0000 3230 3134 2d30 372d 3037 3a30 363a 3036 3a34 | ..2014-07-07:06:06:4 3200 0700 1500 0032 3031 372d 3131 2d30 373a 3136 | 2......2017-11-07:16 Column 0 (x0000), Len 7 (x0007) 0000 0003 5359 53 | ....SYS Column 1 (x0001), Len 34 (x0022) 0000 001e 2f38 3736 3866 3433 355f 5465 7874 4669 | ..../8768f435_TextFi 656c 6441 6363 6573 7369 626c 6541 | eldAccessibleA Column 2 (x0002), Len 4 (x0004) ffff 0000 | .... Column 3 (x0003), Len 9 (x0009) 0000 0005 3337 3239 32 | ....37292 Column 4 (x0004), Len 4 (x0004) ffff 0000 | .... Column 5 (x0005), Len 14 (x000e) 0000 000a 4a41 5641 2043 4c41 5353 | ....JAVA CLASS Column 6 (x0006), Len 21 (x0015) 0000 3230 3134 2d30 372d 3037 3a30 363a 3036 3a34 | ..2014-07-07:06:06:4 32 | 2 Column 7 (x0007), Len 21 (x0015) 0000 3230 3137 2d31 312d 3037 3a31 363a 3433 3a32 | ..2017-11-07:16:43:2 32 | 2 Column 8 (x0008), Len 23 (x0017) 0000 0013 3230 3134 2d30 372d 3037 3a30 363a 3036 | ....2014-07-07:06:06 3a34 32 | :42 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 Column 13 (x000d), Len 5 (x0005) 0000 0001 31 | ....1 Column 14 (x000e), Len 4 (x0004) ffff 0000 | .... Column 15 (x000f), Len 8 (x0008) 0000 0004 4e4f 4e45 | ....NONE Column 16 (x0010), Len 4 (x0004) ffff 0000 | .... Column 17 (x0011), Len 5 (x0005) 0000 0001 59 | ....Y
GGS tokens: TokenID x52 'R' ORAROWID Info x00 Length 20 4141 4169 3049 4141 4a41 4141 4833 2f41 4139 0001 | AAAi0IAAJAAAH3/AA9..
|
看到 TransInd : . (x02)
說明這是該事務的最后一條
下一個事務或者 DDL :
Logdump 18 >n ___________________________________________________________________ Hdr-Ind : E (x45) Partition : . (x00) UndoFlag : . (x00) BeforeAfter: A (x41) RecLength : 260 (x0104) IO Time : 2018/12/13 15:24:48.500.917 IOType : 170 (xaa) OrigNode : 2 (x02) TransInd : . (x03) FormatType : R (x52) SyskeyLen : 0 (x00) Incomplete : . (x00) DDR/TDR Idx: (002, 003) AuditPos : 564872 Continued : N (x00) RecCount : 1 (x01)
2018/12/13 15:24:48.500.917 Metadata Len 260 RBA 49635641 Name: MING.TEST1 * 1)Name 2)Data Type 3)External Length 4)Fetch Offset 5)Scale 6)Level 7)Null 8)Bump if Odd 9)Internal Length 10)Binary Length 11)Table Length 12)Most Sig DT 13)Least Sig DT 14)High Precision 15)Low Precision 16)Elementary Item 17)Occurs 18)Key Column 19)Sub DataType 20)Native DataType 21)Character Set 22)Character Length 23)LOB Type 24)Partial Type * TDR version: 1 Definition for table MING.TEST1 Record Length: 134 Columns: 3 A 64 50 0 0 0 1 0 50 50 50 0 0 0 0 1 0 1 2 2 -1 0 0 0 EUTIME 192 19 56 0 0 1 0 19 19 19 0 5 0 0 1 0 0 0 12 -1 0 0 0 B 64 50 78 0 0 1 0 50 50 50 0 0 0 0 1 0 0 2 2 -1 0 0 0 End of definition
|
可以看到當前 TransInd 是 (x03) ,說明上個事務結束后,新事務是一個單條事務,這個事務的 RBA 就是我們在尋找的 extrba 的值
當前打開的是 /u01/app/oracle/products/ogg/dirdat/pump_mi01/p1000000012 ,所以 extseqno 是 12
GGSCI (ORALTDB.eastmoney.com.sh) 2> alter replicat rep_mi01,extseqno 12,extrba 49635641
2018-12-13 15:31:45 INFO OGG-06594 Replicat REP_MI01 has been altered through GGSCI. Even the start up position might be updated, duplicate suppression remains active in next startup. To override duplicate suppression, start REP_MI01 with NOFILTERDUPTRANSACTIONS option.
REPLICAT altered.
GGSCI (ORALTDB.eastmoney.com.sh) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING REPLICAT STOPPED REP_MI01 00:00:00 00:00:10
GGSCI (ORALTDB.eastmoney.com.sh) 4> start REP_MI01
Sending START request to MANAGER ... REPLICAT REP_MI01 starting
GGSCI (ORALTDB.eastmoney.com.sh) 5> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING REPLICAT RUNNING REP_MI01 00:00:00 00:00:18 |
這樣就跳過了上一個有問題的事務。
文章標題:ogg之replicat進程跳過事務的方法
標題來源:http://www.rwnh.cn/article0/pgseoo.html
成都網站建設公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、建站公司、響應式網站、外貿網站建設、Google、品牌網站建設
聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)