【DG】三大模式切換
一:最大效能轉最大可用(預設DG是最大效能模式)
1.確認主備資料庫模式
1)主庫:
SYS@ORA11GR2>select protection_mode,protection_level from v$database;
PROTECTION_MODE PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE
SYS@ORA11GR2>
SYS@ORA11GR2>select name,protection_mode,database_role,switchover_status from v$database;
NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ORA11GR2 MAXIMUM PERFORMANCE PRIMARY SESSIONS ACTIVE
SYS@ORA11GR2>
2)備庫:
SQL> select name,protection_mode,database_role,switchover_status from v$database;
NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ORA11GR2 MAXIMUM PERFORMANCE PHYSICAL STANDBY NOT ALLOWED
2.主庫重啟到mount
SYS@ORA11GR2>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@ORA11GR2>
SYS@ORA11GR2>startup mount;
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 503319672 bytes
Database Buffers 322961408 bytes
Redo Buffers 2392064 bytes
Database mounted.
SYS@ORA11GR2>
3.修改引數
SYS@ORA11GR2>alter system set LOG_ARCHIVE_DEST_2='SERVICE=ocm LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=OCMU';
System altered.
SYS@ORA11GR2>alter database set standby database to maximize availability;
Database altered.
4.開啟主庫驗證:
SYS@ORA11GR2>alter database open;
Database altered.
SYS@ORA11GR2>select name,protection_mode,database_role,switchover_status from v$database;
NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ORA11GR2 MAXIMUM AVAILABILITY PRIMARY SESSIONS ACTIVE
5.備庫確認:
SQL> select name,protection_mode,database_role,switchover_status from v$database;
NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ORA11GR2 MAXIMUM AVAILABILITY PHYSICAL STANDBY NOT ALLOWED
——最好把備庫也改一下,以便在主備切換時,依舊是最大可用:
SQL> alter system set LOG_ARCHIVE_DEST_2='SERVICE=ora lgwr sync VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORA11GR2';
System altered.
二:最大可用模式切換為最大保護模式
(因為最大可用模式和最大保護模式對應的引數都是LGWR和SYNC,所以不需要再改引數了)
1.主庫操作:
SYS@ORA11GR2>alter database set standby database to maximize protection;
Database altered.
——檢視狀態:
SYS@ORA11GR2>select name,protection_mode,database_role,switchover_status from v$database;
NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ORA11GR2 MAXIMUM PROTECTION PRIMARY SESSIONS ACTIVE
2.檢視備庫狀態:
SQL> select name,protection_mode,database_role,switchover_status from v$database;
NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ORA11GR2 MAXIMUM PROTECTION PHYSICAL STANDBY NOT ALLOWED
備庫修改引數,與主庫相同,上面已經修改過了;
三:最大保護模式轉最大效能模式
(最大效能引數問LGWR、SYNC或者ASYNC或者ARCH、SYNC,因為上面已經改為LGWR、SYNC,所以不需要再設定了,直接轉換)
1.主庫:
SYS@ORA11GR2>alter database set standby database to maximize performance;
Database altered.
SYS@ORA11GR2>select name,protection_mode,database_role,switchover_status from v$database;
NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ORA11GR2 MAXIMUM PERFORMANCE PRIMARY SESSIONS ACTIVE
SYS@ORA11GR2>
2.備庫:
SQL> select name,protection_mode,database_role,switchover_status from v$database;
NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ORA11GR2 MAXIMUM PERFORMANCE PHYSICAL STANDBY NOT ALLOWED
最好把備庫也改一下,以便在主備切換時,依舊是最大效能。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31444259/viewspace-2146993/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DG_三大模式切換模式
- Oracle DG管理模式和只讀模式相互切換Oracle模式
- DG的切換操作
- DG中3種保護模式之間的切換模式
- dg切換操作文件
- oracle dg切換操作示例Oracle
- 使用Broker實現DG切換
- Oracle RAC DG手動切換Oracle
- 【DATAGUARD】物理dg的switchover切換(五)
- 【DG】Data Guard主備庫Switchover切換
- RAC+單例項DG的切換單例
- oracle DG VCS切換異常問題Oracle
- 【DATAGUARD】物理dg的failover切換(六)AI
- 【DG】Data Guard主備庫Failove切換AI
- 5分鐘,徹底精通Oracle DG切換Oracle
- Oracle物理DG自動切換——Dataguard Broker配置Oracle
- 單節點DG的switchover切換介紹
- Oracle 11g dg switchover切換操作流程Oracle
- 10g DG保護模式的切換:從最大效能到最大可用模式
- Weblogic產品模式切換與JVM切換Web模式JVM
- 單例項DG切換中的虛擬IP單例
- oracle DG資料庫切換步驟筆記Oracle資料庫筆記
- ORA-16139 Oracle DG無法正常切換Oracle
- 單節點DG的failover切換介紹AI
- oracle 10g dg切換步驟記錄Oracle 10g
- Oracle日誌模式切換Oracle模式
- 商品顯示模式切換模式
- DataGuard切換保護模式模式
- 2013-3-19資料庫DG切換資料庫
- Oracle 18c&19c physical dg切換總結Oracle
- Win10怎樣切換平板模式_win10如何切換到平板模式Win10模式
- ROSE HA切換節點導致DG失敗、恢復ROS
- win10怎麼切換到桌面模式_win10平板模式和桌面模式的切換教程Win10模式
- KindEditor如何切換成簡單模式??模式
- 從簡單恢復模式切換模式
- ora11_node_dg(2)ADG做(switchover)切換測試
- 歸檔模式與非歸檔模式的切換模式
- oracle 跨小版本dg切換應用補丁報錯處理Oracle