DG學習筆記(8)_Switchover and Failover
DG學習筆記(8)_Switchover and Failover
目錄
1 Switchover
2 物理Standby的Switchover步驟
3 Failover
4 Failover for Physical Standby Database Using SQL
1 Switchover
角色轉換,將Primary Database切換成 Standby Database, 將其中一個Standby切換成Primary.(資料不會丟失)
Planned role reversal
Used for OS or Hardware maintenance
用來做作業系統或硬體的日常維護
Note: Do not attempt a switchover operation to perform. a rolling upgrade of Oracle software; this is not supported.(什麼叫rolling upgrade ? RAC環境下的線上升級 )
Switchover and failover operations are not invoked automatically. You must initiate switchover or failover operations by using a SQL statement or by using the DG Manager or DG broker CLI.
(DG的Switchover, Failover操作不是自動觸發的.而必須透過手動的觸發.)
物理Standby的Switchover要求關閉和重啟Primary and Standby. 而邏輯Standby不需要關閉和重啟.
Switchover are only initiated on the Primary database.They cannot be initiated from the standby database.
tandby. iguration.
role is no longer capable of returning to being a standby database in the original configuration
After Switchover, Sessions for each system would need to reconnect. Data Guard does not automatically switch over sessions from one database to the other.
必須重連應用會話.
All but one primary instance and one standby instance in a Real Application Clusters configuration are shut down.
(RAC環境下的Switchover必須關閉其餘Instance).
2 物理Standby的Switchover步驟
Original Primary:
1) Verify the SWITCHOVER_STATUS from v$DATABASE is TO_STANDBY.
SELECT SWITCHOVER_STATUS FROM V$DATABASE;
2) ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN WAIT;
The WAIT option will not return control to you until the statement completes.
3) Shutdown the instance and restart it without mounting the database.
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP NOMOUNT;
SQL> ALTER DATABASE MOUNT STANDBY DATABASE;
4) Start the MRP process:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Original Standby:
1) Verify the SWITCHOVER_STATUS from V$DATABASE is SWITCHOVER_PENDING
SQL> Select switchover_status from v$database.
2) Switch the physical standby database role to the primary role.
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN WAIT;
3) Shut down and restart the new primary database.
SQL> SHUTDOWN;
SQL> STARTUP;
4) Begin archiving logs to the physical standby database.
SQL> ALTER SYSTEM ARCHIVE LOG START;
SQL> ALTER SYSTEM SWITCH LOGFILE;
不能做Switchover的情形:
The following are situations when you will not be able to do a switchover:
Missing archives
Point in time recovery is required.you cannot switchover to some time in the past.
Production database is not open and cannot be opened
3 Failover
Primary was removed from the DG Configuration. And one of the Standby switch to Primary.(主庫被移除,其中一個備庫切成主庫,可能會有資料丟失.)
Failover操作由Standby發起,主要用於以下情形:
Unplanned role reversal
Use in emergency
計劃外或緊急的維護
Once you perform. a failover operation, there is no going back. This because the original primary database is incapacitated and the standby database that you fail over to the primary role is no longer capable of returning to being a standby database in the original configuration.
FAILOVER操作是不可逆轉的.
4 Failover for Physical Standby Database Using SQL
Original Standby:
1) Initiate the failover operation on the standby database.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
2) Convert the physical standby database to the primary role.
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
3) Register the missing archived redo logs.
SQL> ALTER DATABASE REGISTER LOGFILE ’/standby/arch_dest/arch_1_101.arc’;
這個註冊與Catalog命令的註冊有何區別?
Primary ?
1) To activate a standby database
SQL> ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;
適合做Failover的情形:
Failures such as the following are good reasons to fail over to the standby database:
Loss of the current online redo log
Loss of system or rollback tablespace
Loss of hardware and the database
Inadvertent database operations that cannot be recovered from quickly, such as dropping a tablespace
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10248702/viewspace-629926/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【DG】DG之Switchover和Failover的區別AI
- DG學習筆記(5)_Standby Redo Log筆記
- DG學習筆記(7)_保護模式筆記模式
- DG學習筆記(11)_Log Transport Services筆記
- DG學習筆記(1)_入門介紹筆記
- DG學習筆記(2)_體系結構筆記
- DG學習筆記(9)_備份與RAC筆記
- DG學習筆記(12)_相關檢視筆記
- CCNA學習筆記8筆記
- Oracle:DG 的 switchoverOracle
- Android學習筆記(8)Android筆記
- In Data Guard,choose switchover or failover?AI
- G01學習筆記-8筆記
- Tensorflow學習筆記No.8筆記
- asio學習筆記8——stackfull coroutine筆記
- k8s學習筆記K8S筆記
- switchover和failover的區別AI
- Data Guard Switchover and Failover Best PracticesAI
- 使用DG_broker工具管理DG之switchover
- DG 進行failoverAI
- 物理DG角色轉換:switchover
- DG物理standby,switchover步驟
- JDK8 新特性學習筆記JDK筆記
- oracle學習筆記8: 分析函式Oracle筆記函式
- angular學習筆記(三十)-指令(8)-scopeAngular筆記
- Performing a Switchover to a Physical Standby Database and failoverORMDatabaseAI
- dataguard switchover & failover steps (rac)AI
- 強化學習-學習筆記8 | Q-learning強化學習筆記
- Flutter學習筆記(8)--Dart物件導向Flutter筆記Dart物件
- Laravel8學習筆記-日誌元件Laravel筆記元件
- DG學習筆記(4)_建立物理Standby步驟及注意事項筆記
- DG物理standby,Failover之後原primary重回DGAI
- numpy的學習筆記\pandas學習筆記筆記
- 物理DG角色轉換: failoverAI
- DG物理standby,failover步驟AI
- FAILOVER後DG的重新搭建AI
- 【DATAGUARD】物理dg的switchover切換(五)
- Pytest學習筆記8-引數化筆記