恢復控制檔案後,沒有最後一個歸檔日誌的備份,也沒新增歸檔日誌資訊,怎麼恢復?
RMAN> backup database format '/db/backup/data%U' plus archivelog format '/db/backup/arch%U' delete input;
控制檔案備份名稱/db/backup/data2bsepba0_1_1
最後一個歸檔日誌序號為8的備份名稱/db/backup/arch2csepba3_1_1
SQL> alter system archive log current;--9
SQL> alter system archive log current;--10
SQL> alter system archive log current;--11
SQL> alter system archive log current;--12
RMAN> list archivelog all;--有9、10、11、12歸檔日誌
RMAN> list backup;有最後8號歸檔日誌的備份包
SQL> shutdown immediate;
控制檔案沒有最後一個歸檔日誌備份包,怎麼恢復
--透過catalog手工新增
控制檔案中沒有控制檔案備份之後的歸檔日誌,oracle怎麼識別新增的歸檔日誌(沒有9-12號歸檔日誌)
--oracle會自動根據log_archive_format、log_archive_dest_1引數去尋找sequence為9開始的歸檔日誌
SQL> startup nomount;
RMAN> restore controlfile from '/db/backup/data2bsepba0_1_1';
RMAN> alter database mount;
RMAN> list backup;--沒有8號歸檔日誌的備份包
RMAN> catalog backuppiece '/db/backup/arch2csepba3_1_1';--新增8號歸檔日誌的備份包
RMAN> list backup;--有8號歸檔日誌的備份包
RMAN> restore archivelog sequence 8;
RMAN> list archivelog all;--沒有9-12歸檔日誌
RMAN> recover database;--會自動找到9-12號日誌進行恢復
RMAN> list archivelog all;
List of Archived Log Copies for database with db_unique_name TESTDB
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - ---------
83 1 8 A 18-SEP-17
Name: /db/oracle/archivelog/1_8_955034536.dbf
RMAN> recover database ;
Starting recover at 18-SEP-17
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 13 is already on disk as file /db/oracle/oradata/TESTDB/redo01.log
archived log for thread 1 with sequence 14 is already on disk as file /db/oracle/oradata/TESTDB/redo02.log
archived log for thread 1 with sequence 15 is already on disk as file /db/oracle/oradata/TESTDB/redo03.log
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=8
channel ORA_DISK_1: reading from backup piece /db/backup/arch2csepba3_1_1
channel ORA_DISK_1: piece handle=/db/backup/arch2csepba3_1_1 tag=TAG20170918T152907
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/db/oracle/archivelog/1_8_955034536.dbf thread=1 sequence=8
archived log file name=/db/oracle/archivelog/1_9_955034536.dbf thread=1 sequence=9
archived log file name=/db/oracle/archivelog/1_10_955034536.dbf thread=1 sequence=10
archived log file name=/db/oracle/archivelog/1_11_955034536.dbf thread=1 sequence=11
archived log file name=/db/oracle/archivelog/1_12_955034536.dbf thread=1 sequence=12
archived log file name=/db/oracle/oradata/TESTDB/redo01.log thread=1 sequence=13
archived log file name=/db/oracle/oradata/TESTDB/redo02.log thread=1 sequence=14
archived log file name=/db/oracle/oradata/TESTDB/redo03.log thread=1 sequence=15
media recovery complete, elapsed time: 00:00:02
Finished recover at 18-SEP-17
控制檔案備份名稱/db/backup/data2bsepba0_1_1
最後一個歸檔日誌序號為8的備份名稱/db/backup/arch2csepba3_1_1
SQL> alter system archive log current;--9
SQL> alter system archive log current;--10
SQL> alter system archive log current;--11
SQL> alter system archive log current;--12
RMAN> list archivelog all;--有9、10、11、12歸檔日誌
RMAN> list backup;有最後8號歸檔日誌的備份包
SQL> shutdown immediate;
控制檔案沒有最後一個歸檔日誌備份包,怎麼恢復
--透過catalog手工新增
控制檔案中沒有控制檔案備份之後的歸檔日誌,oracle怎麼識別新增的歸檔日誌(沒有9-12號歸檔日誌)
--oracle會自動根據log_archive_format、log_archive_dest_1引數去尋找sequence為9開始的歸檔日誌
SQL> startup nomount;
RMAN> restore controlfile from '/db/backup/data2bsepba0_1_1';
RMAN> alter database mount;
RMAN> list backup;--沒有8號歸檔日誌的備份包
RMAN> catalog backuppiece '/db/backup/arch2csepba3_1_1';--新增8號歸檔日誌的備份包
RMAN> list backup;--有8號歸檔日誌的備份包
RMAN> restore archivelog sequence 8;
RMAN> list archivelog all;--沒有9-12歸檔日誌
RMAN> recover database;--會自動找到9-12號日誌進行恢復
RMAN> list archivelog all;
List of Archived Log Copies for database with db_unique_name TESTDB
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - ---------
83 1 8 A 18-SEP-17
Name: /db/oracle/archivelog/1_8_955034536.dbf
RMAN> recover database ;
Starting recover at 18-SEP-17
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 13 is already on disk as file /db/oracle/oradata/TESTDB/redo01.log
archived log for thread 1 with sequence 14 is already on disk as file /db/oracle/oradata/TESTDB/redo02.log
archived log for thread 1 with sequence 15 is already on disk as file /db/oracle/oradata/TESTDB/redo03.log
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=8
channel ORA_DISK_1: reading from backup piece /db/backup/arch2csepba3_1_1
channel ORA_DISK_1: piece handle=/db/backup/arch2csepba3_1_1 tag=TAG20170918T152907
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/db/oracle/archivelog/1_8_955034536.dbf thread=1 sequence=8
archived log file name=/db/oracle/archivelog/1_9_955034536.dbf thread=1 sequence=9
archived log file name=/db/oracle/archivelog/1_10_955034536.dbf thread=1 sequence=10
archived log file name=/db/oracle/archivelog/1_11_955034536.dbf thread=1 sequence=11
archived log file name=/db/oracle/archivelog/1_12_955034536.dbf thread=1 sequence=12
archived log file name=/db/oracle/oradata/TESTDB/redo01.log thread=1 sequence=13
archived log file name=/db/oracle/oradata/TESTDB/redo02.log thread=1 sequence=14
archived log file name=/db/oracle/oradata/TESTDB/redo03.log thread=1 sequence=15
media recovery complete, elapsed time: 00:00:02
Finished recover at 18-SEP-17
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2145105/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- DG歸檔日誌缺失恢復
- 對歸檔模式下CLEAR 未歸檔日誌後恢復資料庫的一點看法模式資料庫
- oracle dg 歸檔日誌恢復情況Oracle
- Oracle設定多個歸檔路徑生成多份歸檔日誌,Rman備份時也只備份其中的一份歸檔日誌Oracle
- 測試在丟失歸檔日誌的情況下,跳過部分歸檔日誌進行資料恢復資料恢復
- 手工rm刪除歸檔日誌對備份歸檔日誌的影響
- 從備份片中恢復某個指定得歸檔或者資料檔案
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- 檔案替換後怎麼恢復,恢復被覆蓋的檔案
- 剪下後的檔案可以恢復嗎?恢復剪下檔案怎麼辦?
- 歸檔日誌挖掘
- PostgreSQL 歸檔日誌SQL
- oracle歸檔日誌Oracle
- oracle rman備份歸檔日誌需要先切換日誌嗎Oracle
- Rman在run命令塊裡臨時設定歸檔目錄,歸檔日誌能否恢復主要看預設的歸檔路徑
- MySQL 日誌管理、備份與恢復MySql
- MySQL日誌管理,備份和恢復MySql
- RMAN備份整庫和歸檔日誌的方法
- Oralce資料庫關閉歸檔日誌並且刪除歸檔日誌資料庫
- Oracle為什麼使用備份的控制檔案恢復後一定要resetlogsOracle
- ps檔案沒儲存怎麼恢復,一鍵恢復看這裡
- dg丟失歸檔,使用rman增量備份恢復
- 歸檔oracle alert日誌Oracle
- 14. 日誌歸檔
- Oracle歸檔日誌清理Oracle
- 教你自動恢復MySQL資料庫的日誌檔案(binlog)MySql資料庫
- 同名檔案替換怎麼恢復,恢復同名檔案
- 批量註冊歸檔日誌
- uninstall 後的檔案如何恢復
- word怎麼恢復儲存前的檔案,word檔案恢復
- win10沒儲存的檔案怎麼恢復_win10檔案未儲存的恢復方法Win10
- 如何恢復在全備後新增了資料檔案的資料庫資料庫
- 與控制檔案有關的恢復
- 【RMAN】如果控制檔案損壞那麼如何恢復?恢復控制檔案的方式有哪幾種?
- ArgoWorkflow教程(四)---Workflow & 日誌歸檔Go
- logminer異機挖掘歸檔日誌
- 如何快速找到備份過最近、最大序號的歸檔日誌
- word自動儲存的檔案怎麼恢復,word檔案恢復