主庫歷經open resetlogs後,如何redo apply 物理備庫_flashback physical standby db
Flashing Back a Physical Standby Database to a Specific Point-in-Time
The following steps describe how to avoid re-creating a physical standby database after you issued the OPEN RESETLOGS statement on the primary database.
Step 1 Determine the SCN before the RESETLOGS operation occurred.
On the primary database, use the following query to obtain the value of the system change number (SCN) that is 2 SCNs before the RESETLOGS operation occurred on the primary database:
SQL> SELECT TO_CHAR(RESETLOGS_CHANGE# - 2) FROM V$DATABASE;
Step 2 Obtain the current SCN on the standby database.
On the standby database, obtain the current SCN with the following query:
SQL> SELECT TO_CHAR(CURRENT_SCN) FROM V$DATABASE;
Step 3 Determine if it is necessary to flash back the database.
If the value of CURRENT_SCN is larger than the value of resetlogs_change# - 2, issue the following statement to flash back the standby database.
SQL> FLASHBACK STANDBY DATABASE TO SCN resetlogs_change# -2;
-
If the value of CURRENT_SCN is less than the value of the resetlogs_change# - 2, skip to Step .
-
If the standby database's SCN is far enough behind the primary database's SCN, log apply services will be able to continue through the OPEN RESETLOGS statement without stopping. In this case, flashing back the database is unnecessary because log apply services do not stop upon reaching the OPEN RESETLOGS statement in the redo data.
補註:
1,備庫在啟用flashback前,須配置db_recovery_file_dest[_size],此二個引數為依賴性引數,少一不可
2,主庫的alter database open resetlogs,須是主庫經歷不完全恢復,現在想出如何模擬此種情景
3,開啟備庫flashback,就是為了主庫open resetlogs後,避免重構備庫
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-626119/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12.2 physical standby備庫收集AWR報告Oracle
- 搭建windows到linux的oracle 12c physical standby備庫WindowsLinuxOracle
- 在Oracle DG Standby庫上啟用flashback database功能OracleDatabase
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Polardb資料庫掛庫後,如何恢復主備關係資料庫
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- Oracle:Failover 到物理備庫OracleAI
- Oracle 10g/11g下如何將物理Standby庫臨時啟用用於災備測試Oracle 10g
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- 【DG】Data Guard搭建(physical standby)
- 10 管理物理和快照備庫
- 4 Creating a Logical Standby Database 建立邏輯備庫Database
- 華為GaussDB T資料庫主備物理複製搭建過程資料庫
- 主庫到standby報錯解決:Error 12154 received logging on to the standby ORA-12154Error
- 成為MySQL DBA後,再看ORACLE資料庫(十三、物理備份)MySqlOracle資料庫
- Oracle資料庫恢復之resetlogsOracle資料庫
- MySQL 5.7 主庫崩潰切備庫MySql
- 【Flashback】Flashback Database閃回資料庫功能實驗Database資料庫
- SQLServer2012映象主庫掛掉如何切換到映象備庫SQLServer
- 通過RMAN設定standby接收日誌後主庫歸檔日誌才可刪除
- [資料庫][分庫分表]分庫分表之後,id主鍵如何處理資料庫
- Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1)
- 【DATAGUARD】Oracle Dataguard物理備庫切換最佳實踐(sqlplus)OracleSQL
- DB2資料庫自動備份方法TRDB2資料庫
- Oracle 12c DG備庫啟動報錯standby database requires recoveryOracleDatabaseUI
- dg主庫建立檔案備庫未同步解決方法
- 主庫千萬級的資料更新後,STANDBY日誌應用大量延遲的問題處理
- 【DG】Data Guard主備庫Failove切換AI
- 【DG】Data Guard主備庫Switchover切換
- Oracle 12c 使用RMAN搭建物理備庫(RAC to RAC)Oracle
- RAC下主機修改時區導致db無法open
- Oracle RAC+DG 調整redo/standby log fileOracle
- DG -- READ ONLY模式開啟物理Standby模式
- Oracle ADG 備庫新增備庫Oracle
- 8. Oracle日常管理——8.2.DB日常管理——8.2.4. DB物理備份及恢復Oracle
- 案例:DG主庫未設定force logging導致備庫壞塊
- 達夢資料守護系統(主備架構)如何正確重啟備庫架構
- DB資料庫面試資料庫面試
- db2 資料庫DB2資料庫