ORA-19909(一次DataGuard Failover導致的故障
某醫院客戶,核心資料庫有兩個備庫。因想將其中一個備庫主機挪作測試使用,所以,想把資料庫切換成讀寫模式。這樣,就涉及到了做備庫的failover動作。這個failover是在另外一個備庫,主庫都存活的情況下進行的。
Faiover進行得很順利。Failover之後,修改了此資料庫的DG的幾個引數,當天以為事情就這麼完了。
第二日,客戶告知另一個備庫的資料沒有同步。於是登入過去,看到告警日誌中有如下錯誤
MRP0: Incarnation has changed! Retry recovery...
Errors in file /oradata/u01/app/diag/rdbms/orcldg/orcl/trace/orcl_pr00_3272.trc:
ORA-19906: recovery target incarnation changed during recovery
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Recovered data files to a consistent state at change 19274002051
Tue Jun 09 16:37:39 2020
started logmerger process
Tue Jun 09 16:37:39 2020
Managed Standby Recovery starting Real Time Apply
Warning: Recovery target destination is in a sibling branch
of the controlfile checkpoint. Recovery will only recover
changes to datafiles.
Datafile 1 (ckpscn 19274002051) is orphaned on incarnation#=3
MRP0: Detected orphaned datafiles!
Recovery will possibly be retried after flashback...
Errors in file /oradata/u01/app/diag/rdbms/orcldg/orcl/trace/orcl_pr00_27714.trc:
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '/oradata/datafile/system01.dbf'
通過RMAN檢視incarnation
connected to target database: ORCL (DBID=1385973181)
RMAN> list incarnation;
using target database control file instead of recovery catalog
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 ORCL 1385973181 PARENT 1 13-SEP-14
2 2 ORCL 1385973181 PARENT 4733207525 12-FEB-15
3 3 ORCL 1385973181 CURRENT 8619762801 08-JUL-17
4 4 ORCL 1385973181 ORPHAN 19273953428 09-JUN-20
其中incarnation 4正是昨天做failover產生的。
解決起來其實也相對較為簡單:
reset database incarnation to 3;
然後在開啟日誌應用即可
Wed Jun 10 11:10:26 2020
RFS[5]: Assigned to RFS process 19310
RFS[5]: Allowing overwrite of partial archivelog for thread 2 sequence 40151
RFS[5]: Opened log for thread 2 sequence 40151 dbid 1385973181 branch 948759254
Completed: alter database recover managed standby database using current logfile disconnect
Archived Log entry 72765 added for thread 2 sequence 40151 rlc 948759254 ID 0x5d2e975e dest 2:
Media Recovery Log /oradata/arch/2_40151_948759254.dbf
Media Recovery Waiting for thread 1 sequence 1748
Archivelog record exists, but no file is found
RFS[5]: Opened log for thread 1 sequence 36160 dbid 1385973181 branch 948759254
Archived Log entry 72766 added for thread 1 sequence 36160 rlc 948759254 ID 0x5d2e975e dest 2:
MRP0: Log being waited on was inappropriate for recovery. Retry recovery...
Errors in file /oradata/u01/app/diag/rdbms/orcldg/orcl/trace/orcl_pr00_19224.trc:
ORA-16426: Recovery requested an incorrect log from which to apply redo data.
Managed Standby Recovery not using Real Time Apply
Wed Jun 10 11:10:34 2020
Recovery interrupted!
Wed Jun 10 11:10:54 2020
started logmerger process
Wed Jun 10 11:10:55 2020
Managed Standby Recovery starting Real Time Apply
Parallel Media Recovery started with 16 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Log /oradata/arch/2_40151_948759254.dbf
Media Recovery Log /oradata/arch/1_36160_948759254.dbf
Media Recovery Log /oradata/arch/2_40152_948759254.dbf
Media Recovery Log /oradata/arch/1_36161_948759254.dbf
此次故障,應當在做failover之前修改主備庫的DG相關引數。作為資料庫工程師,應該考慮更為周全。
幸而影響範圍較小。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2697498/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Dataguard故障轉移(failover)操作OracleAI
- Oracle dataguard failover 實戰OracleAI
- 【ASK_ORACLE】手動配置DataGuard的自動化Client Failover(故障轉移)的serviceOracleclientAI
- 記一次儲存問題導致的rac故障案例
- 一次死鎖導致CPU異常飄高的整個故障排查過程
- pymysql 非執行緒安全導致的故障.MySql執行緒
- strict weak ordering導致公司級故障
- 故障分析 | replace into 導致主備不一致
- 故障分析 | DDL 導致的 Xtrabackup 備份失敗
- ORACLE DATAGUARD災備歸檔空間滿導致的ORA-00600 [2619]Oracle
- HP-UX上一次Oracle軟體安裝目錄磁碟空間滿導致的故障UXOracle
- 故障分析 | MySQL : slave_compressed_protocol 導致 crashMySqlProtocol
- MAC address(實體地址)重複導致的網路故障Mac
- Oracle 11.2.0.4 Dataguard兩則故障處理Oracle
- Oracle RAC日常運維-NetworkManager導致叢集故障Oracle運維
- 修改PT622光貓導致的一系列故障
- 磁碟IO故障導致的SQLServer資料庫無法寫入SQLServer資料庫
- Oracle SYSAUX 表空間使用率100% 導致的DB 故障OracleUX
- 執行SQL查詢導致磁碟耗盡故障演示SQL
- 一次FGC導致CPU飆高的排查過程GC
- 記一次排序導致的記憶體危機排序記憶體
- 子游標過多導致大量mutex爭用故障分析Mutex
- 故障分析 | 手動 rm 掉 binlog 導致主從報錯
- 記錄一次Dataguard的修復過程
- 故障分析 | MySQL convert 函式導致的字符集報錯處理MySql函式
- 一次.net code中的placeholder導致的高cpu診斷
- MySQL:一次timestamp時區轉換導致的問題MySql
- 記一次 Mac 意外重啟導致的 Homestead 問題Mac
- 記錄一次fs配置導致串線的問題
- 記錄一次homestead意外關閉導致的錯誤
- 記一次執行緒池配置導致的ThreadLocal清空執行緒thread
- 故障分析 | MySQL 5.7 使用臨時表導致資料庫 CrashMySql資料庫
- 伺服器不同的故障導致資料丟失都怎麼解決的伺服器
- 因壞道問題導致的硬碟故障如何進行資料恢復?硬碟資料恢復
- 成功恢復某公司伺服器故障導致的資料庫損壞伺服器資料庫
- 一次ajax請求導致status為canceled的原因小記求導
- 記一次crontab中date命令錯用導致的問題
- 一次JVM記憶體問題導致的線上事故JVM記憶體