ResetLogs 選項學習與測試
ResetLogs 選項學習與測試
目錄
1 ResetLogs Overview
2 When do we need ResetLog
3 ResetLog的作用
4 在RMAN 中OPEN RESETLOGS 與 SQLPLUS中OPEN RESETLOGS 的區別
5 在重建控制檔案的時候使用ResetLog
1 ResetLogs Overview
The primary function of resetlogs is to discard the redo that was not applied during incomplete recovery, ensuring that the skipped redo can never be accidentally applied by a subsequent recovery. To accomplish this, resetlogs effectively invalidates all existing redo in all online and archived redo logfiles. This has the side effect of making any existing datafile backups unusable for future recovery operations.Resetlogs also reinitializes the controlfile information about online logs and redo threads, clears the contents of any existing online redo log files, creates the online redo log files if they do not currently exist, and resets the log sequence number in all threads to one.
2 When do we need ResetLog
以下條件需要使用resetlog
1)在不完全恢復(介質恢復)
2)使用備份控制檔案(backup的控制檔案一般從日誌檔案和資料庫的資訊以及SCN的資訊,相比目前的狀態都已經過期了)
3 ResetLog的作用
(1) 將重做日誌的序列號設為1
(2) 一般以該子句開啟資料庫後,要立即備份資料庫,因為這個子句會使資料庫以前的備份不能用.
(3) 在重做日誌當前日誌組出現錯誤時,要以該子句開啟資料庫.該子句會重新設定重做日誌檔案的狀態.
(4) 讓資料庫系統歸檔初始化,重新生成歸檔檔案.
4 在RMAN 中OPEN RESETLOGS 與 SQLPLUS中OPEN RESETLOGS 的區別
1) If you run the RMAN command (not the SQL statement) ALTER DATABASE OPEN RESETLOGS, then RMAN automatically creates a new database incarnation record in the recovery catalog. RMAN implicitly and automatically issues a RESET DATABASE command, which specifies that this new incarnation of the database is the current incarnation. RMAN associates all subsequent backups and log archiving done by the target database with the new database incarnation.
2) If you issue the SQL statement (not the RMAN command) ALTER DATABASE OPEN RESETLOGS, then RMAN does not automatically run a RESET DATABASE command. Hence, RMAN cannot access the recovery catalog because it cannot distinguish between a RESETLOGS command and an accidental restore of an old control file. To solve this problem, you must manually run the RESET DATABASE command in RMAN after executing the SQL statement ALTER DATABASE OPEN RESETLOGS.
The RESET DATABASE command updates the repository to indicate that the target database has been opened with the RESETLOGS option. In the rare situation in which you wish to restore backups of a prior incarnation of the database, use the RESET DATABASE TO INCARNATION key command to change the current incarnation to an older incarnation. For example, if you accidentally drop a table immediately after the most recent RESETLOGS, then you may want to
recover the database to just before the time of the most recent RESETLOGS and then open it with the RESETLOGS option, thereby creating a new incarnation.
5 在重建控制檔案的時候使用ResetLog
create controlfile resetlogs/noresetlogs
1) 用noresetlogs重建控制檔案時,控制檔案中 datafile checkpoint scn來自online logs中的Current log頭
2) 用resetlogs重建控制檔案時,控制檔案中datafile Checkpoint SCN來自各資料檔案頭(Start SCN)。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10248702/viewspace-628775/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- nologging選項的學習與測試
- Oracle Job學習與測試Oracle
- Oracle privilege學習與測試Oracle
- Oracle Roles學習與測試Oracle
- Oracle Audit 學習與測試Oracle
- RMAN Catalog 學習與測試
- Oracle DB Links學習與測試Oracle
- Oracle約束的學習與測試Oracle
- 恢復控制檔案避免使用resetlogs選項
- 並行執行的學習與測試並行
- Oracle Audit學習與測試 參考文件Oracle
- 安全測試學習
- 學習 第2章:備份與恢復選項
- 效能測試學習(1)-效能測試分類與常見術語
- Oracle SCN相關問題學習與測試Oracle
- redo log file 物理結構學習與測試
- javascript的學習測試JavaScript
- 測試學習SQL篇SQL
- 學習測試框架Mocha框架
- 單元測試學習
- Flutter 學習之路 - 測試(單元測試,Widget 測試,整合測試)Flutter
- 關於開啟資料庫時的resetlogs選項資料庫
- 軟體測試學習教程—迴歸測試
- PostCSS深入學習:設定選項CSS
- 測試主機網路連通性ping命令引數選項-linux網路管理學習Linux
- Bitmap Indexes 學習與測試_20091213Index
- 學習筆記之測試筆記
- MySQL學習 - 基準測試MySql
- 學習旅途(軟體測試)
- 軟體測試整理學習
- js型別測試學習JS型別
- 【實驗】關於HWM(高水位)的學習與測試
- 軟體測試學習——移動端功能測試分析
- 軟體測試學習教程—軟體測試質量
- 軟體測試學習 ——五種軟體測試模型模型
- 軟體測試學習筆記:測試點總結筆記
- 軟體測試培訓分享:學習能力差可以學習軟體測試嗎
- 雲巴-JavaScript API測試與例項(新)JavaScriptAPI