DG物理standby,failover步驟
DG物理standby,failover步驟
環境為11gR2,oracle linux 6.4;物理standby,單例項;假設primary(db20)異常關閉資料庫,需要切換物理standby(db66)為新primary 資料庫;
步驟1:檢查歸檔日誌是否缺失
如果異常的primary資料庫還能夠mount上,則啟動到mount狀態,然後執行SQL,補發日誌;
SQL> ALTER SYSTEM FLUSH REDO TO target_db_name;
target_db_name 為db_unique_name,log_archive_dest_n中指定的;如果執行成功,則可以保證資料無丟失;
如果異常主庫不能mount,則需要複製備庫缺失的歸檔日誌到備庫,然後註冊;
SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1';
步驟2:備庫停止redo應用
db66:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
步驟3:手動完成所有redo應用
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
如果執行沒有報任何錯誤,則執行步驟4;如果報錯並不能夠解決,則執行activate, SQL> ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;
然後執行步驟6;
步驟4:查詢備庫狀態
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
-----------------
TO PRIMARY
1 row selected
如果SWITCHOVER_STATUS 為TO PRIMARY 或 SESSIONS ACTIVE值,為正常狀態,可以switchover為primary;
步驟5:切換到主庫
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
步驟6:開啟新主庫到open
SQL> ALTER DATABASE OPEN;
開啟新主庫;備份新主庫,然後啟動其他物理備庫已經停止的日誌應用;
開啟新主庫是報錯:
SQL> startup open
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2233000 bytes
Variable Size 637537624 bytes
Database Buffers 192937984 bytes
Redo Buffers 6574080 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 12427
Session ID: 191 Serial number: 3
檢視alert日誌檔案,如下:
Error 12514 received logging on to the standby
LGWR: Error 12514 verifying archivelog destination LOG_ARCHIVE_DEST_2
Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED
LGWR: Continuing...
LGWR: Minimum of 1 applicable standby database required
Errors in file /u01/app/oracle/diag/rdbms/db66/oradb/trace/oradb_lgwr_12367.trc:
ORA-16072: a minimum of one standby database destination is required
LGWR (ospid: 12367): terminating the instance due to error 16072
System state dump requested by (instance=1, osid=12367 (LGWR)), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/oracle/diag/rdbms/db66/oradb/trace/oradb_diag_12357.trc
Dumping diagnostic data in directory=[cdmp_20140228172732], requested by (instance=1, osid=12367 (LGWR)), summary=[abnormal instance termination].
Instance terminated by LGWR, pid = 12367
透過上面的內容,發現報錯在歸檔日誌位置LOG_ARCHIVE_DEST_2,這個引數設定DG下primary資料庫的日誌傳送;由於原來的DG是maximize protect模式,而在failover後,原primary無法達到,則報錯;修改DG的保護模式為maximize availability即可
SQL> alter database set standby database to maximize availability;
Database altered.
SQL> select protection_mode,protection_level from v$database;
PROTECTION_MODE PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM AVAILABILITY RESYNCHRONIZATION
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/16976507/viewspace-1266120/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DG物理standby,switchover步驟
- DG物理standby,Failover之後原primary重回DGAI
- DG學習筆記(4)_建立物理Standby步驟及注意事項筆記
- 物理DG角色轉換: failoverAI
- Data Guard學習之物理standby建立步驟
- 【DATAGUARD】物理dg的failover切換(六)AI
- dataguard之物理standby庫failover 切換AI
- 物理Standby角色切換作業failoverAI
- DATA GUARD物理STANDBY的FAILOVER切換AI
- 邏輯 rac standby和物理 rac standby的switchover 和 failoverAI
- Oracle10g物理DG詳細配置方法及步驟Oracle
- DG -- READ ONLY模式開啟物理Standby模式
- RAC DG 物理standby ASM無法啟動ASM
- oracle 9iDATA GUARD物理STANDBY的 SWITCHOVER切換步驟Oracle
- PIX 535 LAN FAILOVER 配置步驟AI
- 一步一步學DataGuard(15)邏輯standby之failoverAI
- Logical Standby Database的配置步驟.Database
- Oracle DataGuard環境failover後通過舊備份建立物理StandbyOracleAI
- DG 進行failoverAI
- DataGuard:Physical Standby FailoverAI
- 一步一步學DataGuard(5)物理standby之建立示例
- oracle9i(9204)data guard(dg)_logical standby_failover操作指南OracleAI
- ORACLE 11gR2 11.2.0.4 一步一步 物理DGOracle
- 【DG】DG之Switchover和Failover的區別AI
- ASM 仲裁盤OCR DG損壞,重建步驟ASM
- oracle Physical Standby failover stepOracleAI
- DataGuard:Logical Standby FailoverAI
- 【DG】物理DG中LNSn、NSS、NSA程式
- FAILOVER後DG的重新搭建AI
- oracle DG online_redolog新增步驟Oracle
- oracle DG資料庫切換步驟筆記Oracle資料庫筆記
- oracle 10g dg切換步驟記錄Oracle 10g
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- 盛哥學習 Data Guard 第四篇《物理standby之failover 丟棄切換》AI
- Oracle:Failover 到物理備庫OracleAI
- 物理備庫failover實驗AI
- DataGuard搭建物理StandBy
- 【DATAGUARD】物理dg配置客戶端無縫切換 (八.2)--Fast-Start Failover 的配置客戶端ASTAI