oracle Physical Standby failover step
Performing a Failover to a Physical Standby Database
以下是failover步驟
Step 1 Flush any unsent redo from the primary database to the target standby database.
在主庫執行以下命令
ALTER SYSTEM FLUSH REDO TO target_db_name
Step 2 Verify that the standby database has the most recently archived redo log file for each primary database redo thread.
查詢V$ARCHIVED_LOG檢視看最近的歸檔有沒傳送到備庫
For example:
SQL> SELECT UNIQUE THREAD# AS THREAD, MAX(SEQUENCE#) ->
OVER (PARTITION BY thread#) AS LAST from V$ARCHIVED_LOG;
THREAD LAST---------- ----------
1 100
如果沒有應用,則手工應用
For example:
SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1';
Step 3 Identify and resolve any archived redo log gaps.
檢視有沒丟失相關歸檔,然後手工註冊
Query the V$ARCHIVE_GAP view on the target standby database to determine if there are any redo gaps on the target standby database.
For example:
SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP; THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#---------- ------------- -------------- 1 90 92
For example:
SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1';
Step 4 Repeat Step 3 until all gaps are resolved.
重複上面的檢查
Step 5 Stop Redo Apply.
備庫停止日誌應用
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Step 6 Finish applying all received redo data.
備庫完全日誌應用
Issue the following SQL statement on the target standby database:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
Step 7 Verify that the target standby database is ready to become a primary database.
檢查相關狀態
Query the SWITCHOVER_STATUS column of the V$DATABASE view on the target standby database.
For example:
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE; SWITCHOVER_STATUS-----------------
TO PRIMARY1 row selected
Step 8 Switch the physical standby database to the primary role.
failover成主庫
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
Note:
The WITH SESSION SHUTDOWN clause can be omitted from the switchover statement if the query of the SWITCHOVER_STATUS column performed in the previous step returned a value of TO PRIMARY.
Step 9 Open the new primary database.
SQL> ALTER DATABASE OPEN;
開啟資料庫
Step 10 Back up the new primary database.
Oracle recommends that a full backup be taken of the new primary database.
If the error condition cannot be resolved, a failover can still be performed (with some data loss) by issuing the following SQL statement on the target standby database:
SQL> ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;
對開啟的主庫進行備份。
如果有相關歸檔丟失等,則丟失部分資料,直接啟用standby 資料庫即可
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-1966042/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DataGuard:Physical Standby FailoverAI
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- Performing a Switchover to a Physical Standby Database and failoverORMDatabaseAI
- Oracle physical standbyOracle
- Step By Step Guide To Create Physical Standby Database Using RMAN [ID 469493.1]GUIIDEDatabase
- Step-By-Step Guide To Create Physical Standby On Normal File System For ASM Primary using RMANGUIIDEORMASM
- Step By Step Guide On Creating Physical Standby Using RMAN Duplicate In ASM Filesystem For ASM PrimaGUIIDEASM
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- Step by Step Guide on Creating Physical Standby Using RMAN DUPLICATE...FROM ACTIVE DATABASE WithoutGUIIDEDatabase
- Step By Step Configure DataGuard (10g) Physical Standby Database On Linux X86_64(2/2)DatabaseLinux
- 【DataGuard】Oracle 11g physical standby switchoverOracle
- Oracle10G Physical Standby Database setupOracleDatabase
- oracle 10g physical standby 切換操作Oracle 10g
- ORACLE10g DataGuard 配置Physical Standby DatabaseOracleDatabase
- oracle 10g physical standby database creationOracle 10gDatabase
- DataGuard:Physical Standby Switchover
- Step By Step Configure DataGuard (10g) Physical Standby Database On Linux X86_64(1/2待續...)DatabaseLinux
- 建立Local Physical Standby Oracle9i standby 資料庫筆記Oracle資料庫筆記
- 在Oracle 10g下單機Physical StandbyOracle 10g
- oracle實驗記錄 (flashback,physical standby resetlogs)Oracle
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- 10g Data Guard physical standby的主備庫角色轉換測試(switchover & failover)AI
- Oracle 12.2 physical standby備庫收集AWR報告Oracle
- Oracle Data Gurad Physical Standby 相關說明Oracle
- 配置 Oracle 10g RAC primary + RAC physical standby dataguardOracle 10g
- Oracle physical standby中的邏輯備份(exp命令)Oracle
- oracle 9i physical standby database狀態查詢OracleDatabase
- Brief description of Oracle physical standby database configuration and managementOracleDatabase
- Brief description of Oracle physical standby database configuration and managemeOracleDatabase
- Oracle 9i Logical Standby與Physical standby歸檔恢復區別Oracle
- 【DG】Data Guard搭建(physical standby)
- Creating a Physical Standby DatabaseDatabase
- DataGuard:Logical Standby FailoverAI
- Physical Standby Database 切換到 Snapshot Standby DatabaseDatabase
- ORACLE10G DG配置下Physical Standby Database的管理OracleDatabase
- Oracle Data Guard Linux 平臺 Physical Standby 搭建例項OracleLinux
- Oracle 11g Data Guard (physical standby - active dataguard) [final]Oracle
- oracle實驗記錄 (physical standby 日誌應用方面)Oracle