Oracle 11g RMAN恢復-場景1:所有的資料檔案損壞,資料庫CLOSE
--檢視當前日誌組 sys@TESTDB11>select sequence#, group#, status from v$log;
SEQUENCE# GROUP# STATUS ---------- ---------- ---------------- 22 1 INACTIVE 23 2 INACTIVE 24 3 CURRENT --日誌切換5組 sys@TESTDB11>alter system switch logfile;
System altered.
sys@TESTDB11>select sequence#, group#, status from v$log;
SEQUENCE# GROUP# STATUS ---------- ---------- ---------------- 28 1 INACTIVE 29 2 CURRENT 27 3 INACTIVE --關庫後,所有資料丟失 sys@TESTDB11>shutdown abort; ORACLE instance shut down.
sys@TESTDB11>! rm /oradata/ *.dbf
--用RMAN恢復 --先啟動例項到mount狀態 RMAN> startup mount;
Oracle instance started database mounted
Total System Global Area 855982080 bytes
Fixed Size 2230792 bytes Variable Size 641730040 bytes Database Buffers 209715200 bytes Redo Buffers 2306048 bytes --檢視備份集 RMAN> list backup;
List of Backup Sets ===================
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 62 Full 1.25G DISK 00:02:39 14-AUG-13 BP Key: 62 Status: AVAILABLE Compressed: NO Tag: TAG20130814T070001 Piece Name: /pooldisk02/backup03/22oh8mbh_1_1 List of Datafiles in backup set 62 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 2647806 14-AUG-13 /oradata/system01.dbf 2 Full 2647806 14-AUG-13 /oradata/sysaux01.dbf 3 Full 2647806 14-AUG-13 /oradata/undotbs01.dbf 4 Full 2647806 14-AUG-13 /oradata/users01.dbf 5 Full 2647806 14-AUG-13 /oradata/example01.dbf 6 Full 2647806 14-AUG-13 /oradata/newts01.dbf 7 Full 2647806 14-AUG-13 /oradata/fbtbs01.dbf 8 Full 2647806 14-AUG-13 /oradata/users02.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 63 Full 9.67M DISK 00:00:02 14-AUG-13 BP Key: 63 Status: AVAILABLE Compressed: NO Tag: TAG20130814T070246 Piece Name: /u01/app/oracle/fast_recovery_area/TESTDB11/autobackup/2013_08_14/o1_mf_s_823417366_90pwh7q8_.bkp SPFILE Included: Modification time: 14-AUG-13 SPFILE db_unique_name: TESTDB11 Control File Included: Ckp SCN: 2648076 Ckp time: 14-AUG-13
--還原 RMAN> restore database;
Starting restore at 14-AUG-13 configuration for DISK channel 2 is ignored allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00001 to /oradata/system01.dbf channel ORA_DISK_1: restoring datafile 00002 to /oradata/sysaux01.dbf channel ORA_DISK_1: restoring datafile 00003 to /oradata/undotbs01.dbf channel ORA_DISK_1: restoring datafile 00004 to /oradata/users01.dbf channel ORA_DISK_1: restoring datafile 00005 to /oradata/example01.dbf channel ORA_DISK_1: restoring datafile 00006 to /oradata/newts01.dbf channel ORA_DISK_1: restoring datafile 00007 to /oradata/fbtbs01.dbf channel ORA_DISK_1: restoring datafile 00008 to /oradata/users02.dbf channel ORA_DISK_1: reading from backup piece /pooldisk02/backup03/22oh8mbh_1_1 channel ORA_DISK_1: piece handle=/pooldisk02/backup03/22oh8mbh_1_1 tag=TAG20130814T070001 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:02:06 Finished restore at 14-AUG-13 --實地檢查 [oracle@S1011:/oradata]$ ls example01.dbf fbtbs01.dbf newts01.dbf sysaux01.dbf system01.dbf undotbs01.dbf users01.dbf users02.dbf --恢復 RMAN> recover database;
Starting recover at 14-AUG-13 using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 24 is already on disk as file /archive1/1_24_823328120.dbf archived log for thread 1 with sequence 25 is already on disk as file /archive1/1_25_823328120.dbf archived log for thread 1 with sequence 26 is already on disk as file /archive1/1_26_823328120.dbf archived log for thread 1 with sequence 27 is already on disk as file /archive1/1_27_823328120.dbf archived log for thread 1 with sequence 28 is already on disk as file /archive1/1_28_823328120.dbf archived log file name=/archive1/1_24_823328120.dbf thread=1 sequence=24 archived log file name=/archive1/1_25_823328120.dbf thread=1 sequence=25 archived log file name=/archive1/1_26_823328120.dbf thread=1 sequence=26 media recovery complete, elapsed time: 00:00:05 Finished recover at 14-AUG-13
--開庫 RMAN> open database;
database opened --確認資料 sys@TESTDB11>select * from scott.dept;
DEPTNO DNAME LOC ---------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30633755/viewspace-2127657/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g 資料庫恢復-場景1:所有的資料檔案損壞,OPEN狀態Oracle資料庫
- Oracle 11g RMAN恢復-場景2:所有的資料檔案損壞,OPEN狀態Oracle
- Oracle 11g 資料庫恢復-場景7:部分檔案損壞Oracle資料庫
- Oracle 11g 資料庫恢復-場景8:系統預設undo表空間資料檔案損壞,CLOSE狀態Oracle資料庫
- Oracle 11g 資料庫恢復-場景2:所有據檔案損壞,關庫狀態Oracle資料庫
- Oracle 11g 資料庫恢復-場景5:部分檔案損壞恢復,開庫狀態,低可用恢復方式Oracle資料庫
- Oracle 11g 資料庫恢復-場景4:部分檔案損壞恢復,開庫狀態, 高可用恢復方式Oracle資料庫
- Oracle 11g RMAN恢復-場景3:非系統表空間資料檔案損壞,資料庫OPEN狀態,高可用Oracle資料庫
- Oracle 11g資料庫恢復:場景11:資料檔案損壞,不能恢復到原來的位置, 恢復到新的路徑Oracle資料庫
- rman 恢復---歸檔丟失and資料檔案損壞
- Oracle 11g 資料庫恢復:場景9-系統預設undo表空間資料檔案損壞Oracle資料庫
- Oralce 11g資料庫恢復-場景3:部分檔案損壞恢復,關庫狀態,高可用恢復方式資料庫
- 【資料庫資料恢復】MongoDB資料庫檔案損壞的資料恢復案例資料庫資料恢復MongoDB
- [ORACLE] 系統故障資料庫恢復--資料檔案無損壞Oracle資料庫
- 使用RMAN恢復完全損壞的資料庫資料庫
- 非系統資料檔案損壞,rman備份恢復
- Oracle資料檔案損壞恢復例項二則Oracle
- RMAN_部分資料檔案丟失或者損壞的恢復
- 資料檔案或者tablespace損壞基於rman恢復測試
- Oracle資料庫UNDO損壞後的恢復Oracle資料庫
- u盤檔案損壞怎麼恢復資料 u盤恢復損壞資料的有效方法
- 資料檔案丟失損壞的恢復--
- RMAN_資料庫的絕大部分資料檔案丟失或者損壞的恢復資料庫
- 【資料庫資料恢復】Oracle資料庫檔案出現壞塊報錯的資料恢復案例資料庫資料恢復Oracle
- 資料庫資料恢復—NTFS分割槽損壞如何恢復SqlServer資料庫資料資料庫資料恢復SQLServer
- Oracle 11g 資料庫恢復:場景12續:將資料檔案恢復回原來正確的位置Oracle資料庫
- RMAN學習-資料檔案損壞
- 某個資料檔案損壞完全恢復(三)
- Oracle資料庫恢復:歸檔日誌損壞案例一則Oracle資料庫
- u盤檔案損壞怎麼恢復資料 u盤損壞無法讀取怎麼恢復資料
- oracle RMAN 非歸檔資料庫恢復Oracle資料庫
- 資料庫資料恢復-SQL SERVER資料庫MDF (NDF)或LDF損壞如何恢復資料?資料庫資料恢復SQLServer
- 探索ORACLE之RMAN_07 磁碟損壞資料丟失恢復Oracle
- 備份與恢復--重建控制檔案後資料檔案損壞的恢復
- InterBase資料庫檔案損壞的修復方法資料庫
- 織夢資料庫配置檔案資料庫損壞:嘗試修復資料庫資料庫
- System File1 File Header(資料庫System檔案1檔案頭)損壞情況的恢復Header資料庫
- 資料庫檔案壞塊損壞導致開啟時報錯的恢復方法資料庫