DataGuard:Physical Standby Failover
DataGuard:Physical Standby Failover
接physical standby switchover
primary db :db2
standby db :db1
一般情況下failover都是表示primary資料庫癱瘓,最起碼也是起不來了,因此這種型別的切換基本上不需要primary資料庫做什麼操作。所以下列步驟中如果有提到primary和standby執行的,只是建議你如果primary還可以用,那就執行一下,即使不去執行,對failover來說也沒有關係
1.檢查歸檔檔案是否連續,是否有gap
在standby庫執行
SQL> select THREAD#,LOW_SEQUENCE#,HIGH_SEQUENCE# from v$archive_gap;
2.如果步驟1查詢出來紀錄,則在primary庫上執行,否則跳過此步驟
在主庫上執行語句,按步驟1查詢出來的紀錄找出歸檔檔案
SQL> SELECT NAME FROM V$ARCHIVED_LOG WHERE THREAD#=1 AND DEST_ID=1 AND SEQUENCE# BETWEEN XX AND XX;
--如果primary存在,拷貝相應的歸檔到STANDBY資料庫,並註冊.
SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE 'xxx';
3.檢查歸檔檔案是否完整
分別在primary/standby執行下列語句:
SQL> select distinct thread#,max(sequence#) over(partition by thread#) a from v$archived_log;
把相差的歸檔複製到待轉換的standby伺服器,並手工register
4.開始做failover
察看standby 程式狀態
SQL> select process,client_process,sequence#,status from v$managed_standby;
PROCESS CLIENT_P SEQUENCE# STATUS
--------- -------- ---------- ------------
ARCH ARCH 30 CLOSING
ARCH ARCH 0 CONNECTED
RFS LGWR 31 IDLE
RFS ARCH 0 IDLE
RFS N/A 0 IDLE
MRP0 N/A 31 APPLYING_LOG
SQL> alter database recover managed standby database finish force ;
FORCE關鍵字將會停止當前活動的RFS程式,以便立刻執行failover。
或
SQL> alter database recover managed standby database finish skip standby logfile;
SQL> alter database commit to switchover to primary;
SQL> shutdown immediate
SQL> startup
SQL> select database_role,protection_mode,protection_level,open_mode from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL OPEN_MODE
---------------- -------------------- -------------------- ----------
PRIMARY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE READ WRITE
Failover切換成功
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10159839/viewspace-598218/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DataGuard:Physical Standby Switchover
- oracle Physical Standby failover stepOracleAI
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- DataGuard:Logical Standby FailoverAI
- Performing a Switchover to a Physical Standby Database and failoverORMDatabaseAI
- 【DataGuard】Oracle 11g physical standby switchoverOracle
- ORACLE10g DataGuard 配置Physical Standby DatabaseOracleDatabase
- 關於建立DataGuard Physical Standby資料庫資料庫
- dataguard之物理standby庫failover 切換AI
- 配置 Oracle 10g RAC primary + RAC physical standby dataguardOracle 10g
- Oracle 11g Data Guard (physical standby - active dataguard) [final]Oracle
- 【RAC,DATAGUARD】Creating a physical standby from ASM (RAC ) primary之四ASM
- ORACLE 11G DataGuard Failover後如何修復standby庫OracleAI
- Oracle physical standbyOracle
- 配置Oracle physical DataGuardOracle
- Oracle11g的Dataguard測試,建立物理備庫(Physical Standby Database)OracleDatabase
- Oracle DataGuard環境failover後通過舊備份建立物理StandbyOracleAI
- 一步一步學DataGuard(15)邏輯standby之failoverAI
- 配置Oracle11g的Dataguard測試,建立物理備庫(Physical Standby Database)OracleDatabase
- Dataguard Physical Standy Switchover
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- 10g Data Guard physical standby的主備庫角色轉換測試(switchover & failover)AI
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(10)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(9)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(8)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(7)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(6)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(5)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(4)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(3)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(2)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(1)LinuxOracle 10g
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(7)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(6)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(5)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(4)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(3)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(2)LinuxOracle