1,SYSTEMTablespace data file loss recovery
Note: All the following experiments are based on the full-Database Backup above.
3.1DeleteSystemAll data files in the tablespace.
[Oracle @ wwldb WWL] $ rm-rf RJE *
[Oracle @ wwldb WWL] $ exit
3.2An error is reported when the database is started again.
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.3Check the trace file and analyze the error.
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...
From the preceding log file, we can see that/DBData/WWL/system01.dbfThe file is lost, and the file isSystemTable space data files, becauseSystemThe tablespace stores the data dictionary information, so the data file cannot be restored online in an offline manner.
3.4RestoreSystemTablespace data files
There are five steps to start recovery.
1,Force start the databaseMountStatus
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>
2,RestoreCome outSystemTablespace data files
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
3,RunSystemTablespace data recovery.
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
4,OpenDatabase
SQL> alter database open;
Database altered.
SQL> select instance_name, status from v $ instance;
INSTANCE_NAME STATUS
----------------------------
WWL OPEN
SQL>
Related reading:
Exploring the RMAN_01 concept of Oracle
Explore the basic use of RMAN_02 in Oracle
Explore Oracle-based RMAN_03 non-consistent backup
Explore Oracle-based RMAN_04 non-consistent backup
Explore RMAN_05 Incremental Backup in Oracle
Exploring Oracle's RMAN_06 backup policy
Explore Oracle RMAN_07 restoration of single data file loss
Explore Oracle RMAN_07 recovery of whole business tablespace loss
Explore Oracle RMAN_07 disk corruption data loss recovery
Explore Oracle RMAN_07 recovery of all database files lost
Explore Oracle RMAN_07 redo log redu file loss recovery
Explore Oracle RMAN_07 parameter file loss recovery
Explore Oracle RMAN_07 control file loss recovery
Explore Oracle RMAN_07 system tablespace loss recovery