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 Data Guard快速啟動故障切換 - fast-start failover(FSFO)OracleASTAI
- Oracle物理DG自動切換——Dataguard Broker配置Oracle
- oracle 11g dg broker開啟和配置Oracle
- 使用Broker實現DG切換
- 【DATAGUARD】物理dg配置客戶端無縫切換 (八.2)--Fast-Start Failover 的配置客戶端ASTAI
- Data Guard Broker系列之六:Fast-Start FailoverASTAI
- 【DATAGUARD】物理dg的failover切換(六)AI
- Oracle RAC DG手動切換Oracle
- Oracle Data Guard 快速啟動故障切換指南Oracle
- Oracle 11g dg switchover切換操作流程Oracle
- 單節點DG的failover切換介紹AI
- oracle dg切換操作示例Oracle
- Redis主從複製 - 通過Keepalived實現Redis Failover自動故障切換功能RedisAI
- Oracle DG管理Broker配置Oracle
- Oracle Failover - TAF 透明應用切換OracleAI
- 物理DG角色轉換: failoverAI
- oracle DG VCS切換異常問題Oracle
- ORACLE資料庫Dataguard dg brokerOracle資料庫
- 主備切換(failover)AI
- DG的切換操作
- 5分鐘,徹底精通Oracle DG切換Oracle
- Oracle DG Broker配置的管理週期Oracle
- ORACLE 11.2.0.4 DG(Broker) for linux 部署OracleLinux
- Dataguard failover切換實驗AI
- Oracle ADG 自動切換指令碼分享Oracle指令碼
- 【DATAGUARD】物理dg配置客戶端無縫切換 (八.1)--Data Guard Broker 的配置客戶端
- 使用broker工具failover切換之後恢復原來的主庫為新備庫AI
- dg切換操作文件
- 【DG】三大模式切換模式
- oracle DG資料庫切換步驟筆記Oracle資料庫筆記
- ORA-16139 Oracle DG無法正常切換Oracle
- oracle 10g dg切換步驟記錄Oracle 10g
- oracle_DG+broker+Keepalived的部署文件Oracle
- 【ASK_ORACLE】手動配置DataGuard的自動化Client Failover(故障轉移)的serviceOracleclientAI
- oracle 11g datagurd主從切換Oracle
- Oracle 11g AMM與ASMM切換OracleASM
- oracle開機自啟動Oracle