探索Oracle之RMAN_07 system表空間丟失恢復(fù)
1、 SYSTEM表空間數(shù)據(jù)文件丟失恢復(fù)
注意:以下的所有實驗,都是基于上面的全庫備份來做的恢復(fù)。
3.1 刪除system表空間的所有數(shù)據(jù)文件。
[Oracle@wwldb WWL]$ rm -rf syste*
[oracle@wwldb WWL]$ exit
3.2 再次啟動數(shù)據(jù)庫報錯。
SQL> startup force
ORACLE instance started.
Total System GlobalArea 285212672 bytes
Fixed Size 1218968 bytes
Variable Size 104859240 bytes
Database Buffers 171966464 bytes
Redo Buffers 7168000 bytes
Database mounted.
ORA-01157: cannotidentify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1:'/DBData/WWL/system01.dbf'
3.3 檢查跟蹤文件,,分析錯誤。
Errors in file /DBSoft/admin/WWL/bdump/wwl_dbw0_4600.trc:
ORA-01157: Message 1157 not found; No message file for product=RDBMS,facility=ORA; arguments: [1]
ORA-01110: Message 1110 not found; No message file for product=RDBMS,facility=ORA; arguments: [1] [/DBData/WWL/system01.dbf]
ORA-27037: Message 27037 not found; No message file for product=RDBMS,facility=ORA
Linux Error: 2: No such file or directory
Additional information: 3
ORA-1157 signalled during: ALTER DATABASE OPEN...
由如上日志文件我們得出是由于/DBData/WWL/system01.dbf文件丟失,而且這個文件同時又是system表空間的的數(shù)據(jù)文件,因為system表空間存放了數(shù)據(jù)字典信息,所以該數(shù)據(jù)文件是不可以采用脫機的方式實現(xiàn)在線的的恢復(fù)。
3.4恢復(fù)system表空間數(shù)據(jù)文件
開始執(zhí)行恢復(fù)分為五個步驟
狀態(tài)
SQL> startup force mount;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218968 bytes
Variable Size 104859240 bytes
Database Buffers 171966464 bytes
Redo Buffers 7168000 bytes
Database mounted.
SQL>
表空間的數(shù)據(jù)文件
RMAN> restore datafile 1;
Starting restore at 22-JUN-12
using target database control file instead of recoverycatalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupsetrestore
channel ORA_DISK_1: specifying datafile(s) to restorefrom backup set
restoring datafile 00001 to /DBData/WWL/system01.dbf
channel ORA_DISK_1: reading from backup piece/DBBak/bak_WWL_06_22_0vne4ph6_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/DBBak/bak_WWL_06_22_0vne4ph6_1_1tag=TAG20120622T010021
channel ORA_DISK_1: restore complete, elapsed time:00:01:06
Finished restore at 22-JUN-12
表空間數(shù)據(jù)恢復(fù)。
RMAN> recover datafile 1;
Starting recover at 22-JUN-12
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 20 is already on diskas file/DBData/flash_recovery_area/WWL/archivelog/2012_06_22/o1_mf_1_20_7y804kwr_.arc
archive log thread 1 sequence 21 is already on diskas file/DBData/flash_recovery_area/WWL/archivelog/2012_06_22/o1_mf_1_21_7y80zjqx_.arc
archive log thread 1 sequence 22 is already on diskas file /DBData/flash_recovery_area/WWL/archivelog/2012_06_22/o1_mf_1_22_7y8y7l70_.arc
archive log thread 1 sequence 23 is already on diskas file/DBData/flash_recovery_area/WWL/archivelog/2012_06_22/o1_mf_1_23_7y903v17_.arc
archive logfilename=/DBData/flash_recovery_area/WWL/archivelog/2012_06_22/o1_mf_1_20_7y804kwr_.arcthread=1 sequence=20
archive logfilename=/DBData/flash_recovery_area/WWL/archivelog/2012_06_22/o1_mf_1_21_7y80zjqx_.arcthread=1 sequence=21
media recovery complete, elapsed time: 00:00:02
Finished recover at 22-JUN-12
SQL> alter database open;
Database altered.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
WWL OPEN
SQL>
相關(guān)閱讀:
探索Oracle之RMAN_01概念
探索Oracle之RMAN_02基本使用
探索Oracle之RMAN_03非一致性備份
探索Oracle之RMAN_04非一致性備份
探索Oracle之RMAN_05增量備份
探索Oracle之RMAN_06備份策略
探索Oracle之RMAN_07單個數(shù)據(jù)文件丟失恢復(fù)
探索Oracle之RMAN_07整個業(yè)務(wù)表空間丟失恢復(fù)
探索Oracle之RMAN_07 磁盤損壞數(shù)據(jù)丟失恢復(fù)
探索Oracle之RMAN_07 數(shù)據(jù)庫所有文件全部丟失恢復(fù)
探索Oracle之RMAN_07 重做日志redu文件丟失恢復(fù)
探索Oracle之RMAN_07 參數(shù)文件丟失恢復(fù)
探索Oracle之RMAN_07控制文件丟失恢復(fù)
探索Oracle之RMAN_07 system表空間丟失恢復(fù)
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com