Oracle
RMAN 列出恢復指定備份所需的歸檔日誌
我在 2013 年 12 月 31 日備份了數據文件。它成功完成了數據文件備份,但歸檔日誌備份失敗。
現在,我想確定應該備份哪些歸檔日誌,以確保在恢復 31.12.2013 數據文件備份後可以恢復我的數據庫。
您可以嘗試(至少需要 Oracle 10g):
RESTORE DATABASE PREVIEW;
您至少需要在整個備份操作期間生成的存檔日誌。
快速展示:
C:\Users>rman target / Recovery Manager: Release 12.1.0.1.0 - Production on Wed Jan 8 14:34:28 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database: CDB12C (DBID=4034496039) RMAN> list backup of database summary completed after 'sysdate - 1'; using target database control file instead of recovery catalog List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- ------------------ ------- ------- ---------- --- 1 B F A DISK 08-jan-14:14:23:45 1 1 NO TAG20140108T141855 2 B F A DISK 08-jan-14:14:24:48 1 1 NO TAG20140108T141855 3 B F A DISK 08-jan-14:14:25:46 1 1 NO TAG20140108T141855 RMAN> restore database preview summary from tag = TAG20140108T141855; Starting restore at 08-jan-14:14:34:47 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=30 device type=DISK List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- ------------------ ------- ------- ---------- --- 1 B F A DISK 08-jan-14:14:23:44 1 1 NO TAG20140108T141855 3 B F A DISK 08-jan-14:14:25:30 1 1 NO TAG20140108T141855 2 B F A DISK 08-jan-14:14:24:31 1 1 NO TAG20140108T141855 using channel ORA_DISK_1 List of Archived Log Copies for database with db_unique_name CDB12C ===================================================================== Key Thrd Seq S Low Time ------- ---- ------- - ------------------ 1 1 13 A 03-jan-14:15:01:14 Name: C:\APP\ORACLE\FAST_RECOVERY_AREA\CDB12C\ARCHIVELOG\2014_01_08\O1_MF_1_13_9DTNSSGR_.ARC Media recovery start SCN is 2475111 Recovery must be done beyond SCN 2475373 to clear datafile fuzziness Finished restore at 08-jan-14:14:34:49 RMAN> list archivelog from scn 2475111 until scn 2475374; List of Archived Log Copies for database with db_unique_name CDB12C ===================================================================== Key Thrd Seq S Low Time ------- ---- ------- - ------------------ 1 1 13 A 03-jan-14:15:01:14 Name: C:\APP\ORACLE\FAST_RECOVERY_AREA\CDB12C\ARCHIVELOG\2014_01_08\O1_MF_1_13_9DTNSSGR_.ARC
請注意restore … preview輸出中的 scn min-max 指示:
媒體恢復開始 SCN 為 2475111 必須在 SCN 2475373 之後進行恢復以清除數據文件的模糊性
因此,為了超出指定的 scn,我們搜尋包含 scn 2475373 + 1 的歸檔日誌。
如果要手動驗證,請檢查以下 MOS 注意:
如何確定 RMAN 備份恢復的最小端點(文件 ID 1329415.1)