單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(6)
單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(1):http://space.itpub.net/81227/viewspace-713012
單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(2):http://space.itpub.net/81227/viewspace-713013
單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(3):http://space.itpub.net/81227/viewspace-713014
單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(4):http://space.itpub.net/81227/viewspace-713017
單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(5):http://space.itpub.net/81227/viewspace-713018
Failovers:
FAILOVER切換一般是PRIMARY資料庫發生故障後的切換,這種情況是STANDBY資料庫發揮其作用的情況。這種切換髮生後,可能會造成資料的丟失。而且這個過程不是可逆的,DATA GUARD環境會被破壞。
由於PRIMARY資料庫已經無法啟動,所以FAILOVER切換所需的條件並不多,只要檢查STANDBY是否執行在最大保護模式下,如果是的話,需要將其置為最大效能模式,否則切換到PRIMARY角色也無法啟動。
1.檢視是否有日誌GAP,沒有應用的日誌:
SQL> SELECT UNIQUE THREAD#, MAX(SEQUENCE#) OVER(PARTITION BY THREAD#) LAST FROM V$ARCHIVED_LOG;
SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
如果有,則複製過來並且註冊
SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE '路徑';
重複檢視直到沒有應用的日誌:
2. 然後停止應用歸檔:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Database altered.
3. 下面將STANDBY資料庫切換為PRIMARY資料庫:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
或 SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;
Database altered.
SQL> SELECT DATABASE_ROLE FROM V$DATABASE;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
Database altered.
SQL> ALTER DATABASE OPEN; 或者 shutdown immediate+startup
Database altered.
檢查資料庫是否已經切換成功:
SQL> SELECT DATABASE_ROLE FROM V$DATABASE;
DATABASE_ROLE
----------------
PRIMARY
至此,FAILOVER切換完成。這個時候應該馬上對新的PRIMARY資料庫進行備份。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/81227/viewspace-713019/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(7)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
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(1)LinuxOracle
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(6)LinuxOracle 10g
- 單機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 搭建例項(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平臺Oracle10g DataGuard Logical Standby搭建例項(6)LinuxOracle
- Oracle Data Guard Linux 平臺 Physical Standby 搭建例項OracleLinux
- 單機Linux平臺Oracle 10g DataGuard Logical Standby 搭建例項LinuxOracle 10g
- Oracle Data Guard Linux 平臺 Physical Standby 搭建例項-3OracleLinux
- Oracle Data Guard Linux 平臺 Physical Standby 搭建例項 -2OracleLinux
- Oracle Data Guard Linux 平臺 Physical Standby 搭建例項 -1OracleLinux
- 單機Linux平臺Oracle10g DataGuard Logical Standby搭建例項(5)LinuxOracle
- 單機Linux平臺Oracle10g DataGuard Logical Standby搭建例項(4)LinuxOracle
- 單機Linux平臺Oracle10g DataGuard Logical Standby搭建例項(3)LinuxOracle
- 單機Linux平臺Oracle10g DataGuard Logical Standby搭建例項(2)LinuxOracle
- 【DataGuard】Oracle 11g physical standby switchoverOracle
- Linux平臺Oracle 11g DataGuard Physical Standby 非正常關閉後的啟動LinuxOracle
- 【DG】在Linux平臺上搭建單例項的dataguard--duplicateLinux單例
- Oracle 11g Data Guard (physical standby - active dataguard) [final]Oracle
- Oracle 11g RAC 配置單例項 DataGuardOracle單例
- Oracle11g 搭建單例項DataGuardOracle單例
- DataGuard:Physical Standby Switchover
- 【DG】在Linux平臺上搭建單例項的dataguard--rman還原方式Linux單例
- Oracle 10G windows 平臺 DataGuard 例項Oracle 10gWindows
- DataGuard:Physical Standby FailoverAI
- ORACLE10g DataGuard 配置Physical Standby DatabaseOracleDatabase
- 配置 Oracle 10g 單例項物理dataguard和邏輯standbyOracle 10g單例