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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Oracle 12.2 physical standby備庫收集AWR報告Oracle
- 【DG】Data Guard搭建(physical standby)
- 搭建windows到linux的oracle 12c physical standby備庫WindowsLinuxOracle
- 10GR2下建立物理standby STEP BY STEP
- Oracle Physical Database LimitsOracleDatabaseMIT
- Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1)
- Oracle dataguard failover 實戰OracleAI
- Step by Step Data Replication Using Oracle GoldenGateOracleGo
- Oracle的快照standbyOracle
- Oracle:Failover 到物理備庫OracleAI
- Oracle Dataguard故障轉移(failover)操作OracleAI
- Oracle DG Standby Database型別OracleDatabase型別
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- Oracle 11.2.0.4 physical dataguard和snapshot dataguard切換Oracle
- Oracle 19c Concepts(11):Physical Storage StructuresOracleStruct
- Oracle 11g dg broker自動failoverOracleAI
- Oracle dataguard報錯:Error 1017 received logging on to the standbyOracleError
- Oracle 18c&19c physical dg切換總結Oracle
- Oracle 12.2 How to Generate AWRs in Active Data Guard Standby DatabasesOracleDatabase
- Oracle 12.2 使用Database Link優化Standby Database WorkloadOracleDatabase優化
- Oracle RAC+DG 調整redo/standby log fileOracle
- 在Oracle DG Standby庫上啟用flashback database功能OracleDatabase
- React Step by StepReact
- 【mos 1265700.1】Oracle Patch Assurance - Data Guard Standby-First Patch ApplyOracleAPP
- dataguard 搭建 oracle_sid相同 2節點 primary+standbyOracle
- dataguard 搭建 oracle_sid不同 2節點 primary+standbyOracle
- Command 模式 Step by Step模式
- oracle 19c使用dgmgrl來執行switchover和failover切換OracleAI
- oracle12.2 adg ORA-46952: standby database format mismatch for password fileOracleDatabaseORM
- Promise的實現(step by step)Promise
- Shell Step by Step (4) —— Cron & Echo
- ASA failover配置(A/S)AI
- Oracle 12C RAC的單機Standby returning error ORA-16191OracleError
- Physical Samples Management in SAP QM
- oracle ocp 19c考題8,科目082考試題-logical and physical database structuresOracleDatabaseStruct
- Step by Step 安裝 BizTalk Server 2009Server