模擬oracle rac節點異常時如何保持ogg正常執行
環境簡介
|
系統 |
Oracle 版本 |
OGG 版本 |
|
源端 |
Linux 6.9 |
oracle11204 |
112101 |
|
目標端 |
Linux 6.9 |
oracle11204 |
122022 |
|
準備測試ogg 環境
源端ogg
GGSCI (rac11gn1) 2> info *
EXTRACT EXT28 Last Started 2020-11-06 11:20 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:09 ago)
Log Read Checkpoint Oracle Redo Logs
2020-11-06 11:38:43 Thread 1, Seqno 10, RBA 180652544
SCN 2979.2159160499 (12796866735283)
Log Read Checkpoint Oracle Redo Logs
2020-11-06 11:38:43 Thread 2, Seqno 17, RBA 573440
SCN 2979.2159160499 (12796866735283)
----- 挖掘程式的具體引數-----
GGSCI (rac11gn1) 3> view param ext28
extract ext28
setenv (NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK")
--setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
userid odc,password odc
exttrail ./dirdat/z3
tranlogoptions dblogreader
FETCHOPTIONS FETCHPKUPDATECOLS
ddl include objname test.* exclude objtype 'TRIGGER'
ddloptions addtrandata
table test.test1;
目標端ogg
GGSCI (oradb) 4> info rep28
REPLICAT REP28 Last Started 2020-11-05 13:38 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:07 ago)
Process ID 5044
Log Read Checkpoint File ./dirdat/z3000010
2020-11-06 13:48:24.927157 RBA 1567
----- 應用程式的具體引數-----
GGSCI (oradb) 5> view param rep28
replicat rep28
setenv (NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK")
userid odc, password odc
ASSUMETARGETDEFS
ALLOWNOOPUPDATES
DBOPTIONS DEFERREFCONST
HANDLETPKUPDATE
ddl include mapped
DISCARDFILE /ogg/dirrpt/z3.dsc, APPEND megabytes 20
DISCARDROLLOVER on sunday
map test.* target test.*;
測試RAC 中一個節點掛機
將二節點關機
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
觀察ogg 變化
觀察挖掘程式資訊,可以看到二節點的RBA 變為了0.
GGSCI (rac11gn1) 10> info *
EXTRACT DMP28 Last Started 2020-11-06 13:27 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:19 ago)
Log Read Checkpoint File ./dirdat/z3000013
2020-11-06 11:20:33.296830 RBA 1075
EXTRACT EXT28 Last Started 2020-11-06 13:27 Status RUNNING
Checkpoint Lag 00:00:02 (updated 00:00:03 ago)
Log Read Checkpoint Oracle Redo Logs
2020-11-06 13:27:37 Thread 1, Seqno 10, RBA 187623440
SCN 2979.2159173792 (12796866748576)
Log Read Checkpoint Oracle Redo Logs
2020-11-06 13:26:37 Thread 2, Seqno 18, RBA 0
SCN 2979.2159173716 (12796866748500)
觀察日誌資訊,出現大量關於二節點資訊
2020-11-06 13:30:01 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext28.prm: Positioning to (Thread 2) Sequence 18, RBA 0, SCN 2979.2159173716.
2020-11-06 13:30:02 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext28.prm: Positioning to (Thread 2) Sequence 18, RBA 0, SCN 2979.2159173716.
2020-11-06 13:30:04 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext28.prm: Positioning to (Thread 2) Sequence 18, RBA 0, SCN 2979.2159173716.
2020-11-06 13:30:05 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext28.prm: Positioning to (Thread 2) Sequence 18, RBA 0, SCN 2979.2159173716.
2020-11-06 13:30:06 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext28.prm: Positioning to (Thread 2) Sequence 18, RBA 0, SCN 2979.2159173716.
2020-11-06 13:30:07 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext28.prm: Positioning to (Thread 2) Sequence 18, RBA 0, SCN 2979.2159173716.
2020-11-06 13:30:08 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext28.prm: Positioning to (Thread 2) Sequence 18, RBA 0, SCN 2979.2159173716.
2020-11-06 13:30:09 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext28.prm: Positioning to (Thread 2) Sequence 18, RBA 0, SCN 2979.2159173716.
2020-11-06 13:30:10 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext28.prm: Positioning to (Thread 2) Sequence 18, RBA 0, SCN 2979.2159173716.
刪除二節點
此時挖掘程式無法正常抽取資料,有兩種方法恢復ogg正常執行,一種是重建程式,另外一種則是先排除第二個節點,後續還可以加回去。
我們採用第二種方案。
1. 確認資料庫節點順序
SQL> select distinct thread# from v$log;
THREAD#
----------
1
2
--- 注意日誌節點順序與ogg 節點順序是否一致
2.禁用 二節點redo
SQL> alter database disable thread 2;
3. 加入引數排除二節點
如果上述日誌節點不是順序排序,排除時根據相應的節點排除
GGSCI (rac11gn1) 11> view param ext28
extract ext28
setenv (NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK")
userid odc,password odc
exttrail ./dirdat/z3
tranlogoptions dblogreader
FETCHOPTIONS FETCHPKUPDATECOLS
THREADOPTIONS PROCESSTHREADS EXCEPT 2
或者 THREADOPTIONS PROCESSTHREADS SELECT 1
ddl include objname xjm.* exclude objtype 'TRIGGER'
ddloptions addtrandata
table test.test1;
4. 觀察日誌
2020-11-06 14:51:42 ERROR OGG-01937 Oracle GoldenGate Capture for Oracle, ext28.prm: Extract is not configured to capture changes from thread 2,158,926,566. To avoid data loss, the Extract must be dropped and recreated with the THREADS option to specify the correct number of RAC instances. See the Oracle GoldenGate administration documentation for the procedure to follow.
5. 加入引數修復錯誤
根據mos 參考檔案:
該 bug 是在 ogg11.2.0.5 以下版本中會出現,在 11.2.0.5 中已被修復好
GGSCI (rac11gn1) 28> view param ext28
extract ext28
setenv (NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK")
--setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
userid odc,password odc
exttrail ./dirdat/z3
tranlogoptions dblogreader
FETCHOPTIONS FETCHPKUPDATECOLS
THREADOPTIONS PROCESSTHREADS EXCEPT 2
TRANLOGOPTIONS _IGNORETHREADEVENT
ddl include objname test.* exclude objtype 'TRIGGER'
ddloptions addtrandata
table test.test1;
觀察後臺日誌,沒有明顯錯誤出現。
新增二節點
1.
--- 將挖掘的引數檔案中將二節點新增回去
GGSCI (rac11gn1) 11> view param ext28
extract ext28
setenv (NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK")
userid odc,password odc
exttrail ./dirdat/z3
tranlogoptions dblogreader
FETCHOPTIONS FETCHPKUPDATECOLS
--THREADOPTIONS PROCESSTHREADS EXCEPT 2
TRANLOGOPTIONS _IGNORETHREADEVENT
ddl include objname test.* exclude objtype 'TRIGGER'
ddloptions addtrandata
table test.test1;
--啟用 二節點redo
SQL> alter database enable thread 2;
2. 將二節點拉起來
SQL>startup
觀察程式是否都正常執行。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29956245/viewspace-2932732/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle 11.2.0.4 rac節點異常當機之ORA-07445Oracle
- Oracle RAC某一節點異常,你該怎麼辦?Oracle
- RAC二節點啟動異常
- ORACLE 11.2.0.4 rac for linux 鏈路宕導致的單節點異常當機OracleLinux
- Oracle RAC新增節點Oracle
- oracle11g RAC新增節點Oracle
- 關於Oracle 11G RAC雙節點之間存在防火牆導致只能一個節點執行Oracle防火牆
- 記一次oracle 19c RAC叢集重啟單節點DB啟動異常(二)Oracle
- Oracle RAC啟動因CTSS導致的異常Oracle
- 兩種異常(CPU異常、使用者模擬異常)的收集
- pxc 三個節點全部異常和正常關閉的啟動順序
- Oracle Linux 6.7中 Oracle 11.2.0.4 RAC叢集CRS異常處理OracleLinux
- 多執行緒執行任務時,某個執行緒拋異常,如何讓程式立即退出執行緒
- 教育直播APP開發過程中,如何保持系統正常執行?APP
- oracle11g_RAC新增刪除節點Oracle
- Oracle 11g RAC重新新增節點Oracle
- 配置ogg異構oracle到mysqlOracleMySql
- oracle 11g rac新增節點前之清除節點資訊Oracle
- 【RAC】Oracle10g rac新增刪除節點命令參考Oracle
- 如何執行一個 Conflux 節點UX
- 用Go語言異常機制模擬TryCatch異常捕捉Go
- 正常執行時間監控
- 21. 羅列常見的幾個執行時異常
- Oracle優化案例-新增RAC節點(二十九)Oracle優化
- Oracle 11g RAC到單例項OGG同步Oracle單例
- Oracle 變數窺視引起執行計劃異常故障分析Oracle變數
- oracle 12c RAC安裝,例項不能多節點同時啟動Oracle
- oracle 異常Oracle
- selenium-grid 有多個節點,但 pytest.main 批次執行用例,每次只有一個節點執行用例,不能同時多個節點執行,要怎樣才能多個節點同時執行AI
- 執行緒池OOM異常執行緒OOM
- 程式執行異常: Modulo by zero
- win10系統安裝模擬器後無法正常啟動執行如何解決Win10
- Oracle RAC重新執行root.sh指令碼Oracle指令碼
- 執行 locust 的異常 pywintypes.error 如何解決?Error
- 如何在 Windows 中檢查計算機正常執行時間Windows計算機
- Geth簡介及如何執行以太坊節點
- 執行程式時,程式返回TooManyResultsException異常行程OOMException
- 2節點RAC安裝