oracle 11g dg broker 開啟fast-start failover自動故障切換
一.首先保證主從資料庫的閃回資料庫功能以及強制歸檔都開啟,如下保證都為yes
SQL> select flashback_on,force_logging from v$database;
FLASHBACK_ON FOR
------------------ ---
NO NO
1.1開啟閃回資料庫
SQL> ALTER SYSTEM SET db_recovery_file_dest_size=3g SCOPE=BOTH;
System altered.
SQL> alter system set db_recovery_file_dest='/data/u01/app/oracle/fast_recovery_area';
System altered.
SQL> alter database flashback on;
Database altered.
1.2開啟強制歸檔
SQL> alter database force logging;
Database altered.
SQL> select flashback_on,force_logging from v$database;
FLASHBACK_ON FOR
------------------ ---
YES YES
二:開啟fast-start failover
2.1:開啟 fast-start failover
[oracle@beijing-fuli-hadoop-02 ~]$ dgmgrl sys/
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> enable fast_start failover;
Enabled.
2.2.檢視配置狀態,發現警告,因為沒有啟動observer而告警!
DGMGRL> show configuration
Configuration - dbha_c
Protection Mode: MaxPerformance
Databases:
db2 - Primary database
Warning: ORA-16819: fast-start failover observer not started
db1 - (*) Physical standby database
Warning: ORA-16819: fast-start failover observer not started
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
2.3開啟 啟動觀察器(observer):
DGMGRL> show configuration
Configuration - dbha_c
Protection Mode: MaxPerformance
Databases:
db2 - Primary database
db1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
由於observer的啟動會一直佔用session 視窗的,所以建議寫成指令碼掛後臺
這裡我們在備庫上建立指令碼,具體如下
建立一個名叫observer.sql的指令碼,把下面的命令放進去,然後執行該指令碼即可。
nohup dgmgrl sys/oracle@db2 "start observer">>observer.log 2>&1 &
三:驗證自動切換:
db2主庫:
SQL> select DATABASE_ROLE,OPEN_MODE from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PRIMARY READ WRITE
db1為standby
SQL> select DATABASE_ROLE,OPEN_MODE from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
db2主庫模擬異常關閉
SQL> shu abort
ORACLE instance shut down.
再次檢視db1的狀態:
SQL> select DATABASE_ROLE,OPEN_MODE from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PRIMARY READ WRITE
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29654823/viewspace-2649607/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g dg broker自動failoverOracleAI
- oracle 11g dg broker開啟和配置Oracle
- Oracle 11g dg switchover切換操作流程Oracle
- 使用Broker實現DG切換
- Oracle RAC DG手動切換Oracle
- oracle dg切換操作示例Oracle
- Oracle DG管理Broker配置Oracle
- ORACLE 11.2.0.4 DG(Broker) for linux 部署OracleLinux
- oracle 11g datagurd主從切換Oracle
- Oracle DG Broker配置的管理週期Oracle
- 5分鐘,徹底精通Oracle DG切換Oracle
- Oracle Dataguard故障轉移(failover)操作OracleAI
- 【ASK_ORACLE】手動配置DataGuard的自動化Client Failover(故障轉移)的serviceOracleclientAI
- Oracle ADG 自動切換指令碼分享Oracle指令碼
- DG的切換操作
- Oracle 11g 一主多備切換方案Oracle
- oracle 19c使用dgmgrl來執行switchover和failover切換OracleAI
- Oracle DG 管理Broker配置成員的狀態Oracle
- Oracle 18c&19c physical dg切換總結Oracle
- dg切換操作文件
- openGauss主備切換之switchover與failoverAI
- Oracle 11g DG新特性--Automatic block repairOracleBloCAI
- Oracle 11g單主搭建物理DGOracle
- oracle配置開機自啟動Oracle
- Oracle DG同步失敗故障處理(二)Oracle
- oracle 跨小版本dg切換應用補丁報錯處理Oracle
- Oracle 11g關閉開啟AWROracle
- oracle 11g自動記憶體管理Oracle記憶體
- MySQL高可用之MHA切換測試(switchover & failover)MySqlAI
- MySQL Orchestrator自動導換+VIP切換MySql
- Oracle RAC啟動失敗(DNS故障)OracleDNS
- RAC+單例項DG的切換單例
- 【DG】Data Guard主備庫Failove切換AI
- 【DG】Data Guard主備庫Switchover切換
- PostgreSQL 13 非同步流複製+failover切換(#2.3)-202104SQL非同步AI
- 11G oracle資料庫重新啟動crsOracle資料庫
- linux7 開機自啟動oracleLinuxOracle
- Oracle RAC自啟動Oracle