4 25 USERS *** /u02/ezhou/users01.dbf
5 100 EXAMPLE *** /u02/ezhou/example01.dbf
6 10 EXAMPLE *** /u02/ezhou/example02.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 20 TEMP 32767 /u02/ezhou/temp01.dbf
[oracle@aoracle ezhou]$ ls -lrt
total 1371388
drwxr-xr-x 3 oracle oinstall 4096 Sep 28 16:34 patch
-rw-r----- 1 oracle oinstall 20979712 Oct 15 09:58 temp01.dbf
-rw-r----- 1 oracle oinstall 52429312 Oct 15 15:24 redo01.log
-rw-r----- 1 oracle oinstall 52429312 Oct 15 15:25 redo02.log
-rw-r----- 1 oracle oinstall 26222592 Oct 16 00:49 users01.dbf
-rw-r----- 1 oracle oinstall 298852352 Oct 16 00:49 undotbs01.dbf
-rw-r----- 1 oracle oinstall 503324672 Oct 16 00:49 system01.dbf
-rw-r----- 1 oracle oinstall 262152192 Oct 16 00:49 sysaux01.dbf
-rw-r----- 1 oracle oinstall 52429312 Oct 16 00:49 redo03.log
-rw-r----- 1 oracle oinstall 10493952 Oct 16 00:49 example02.dbf
-rw-r----- 1 oracle oinstall 104865792 Oct 16 00:49 example01.dbf
-rw-r----- 1 oracle oinstall 7061504 Oct 16 02:25 control03.ctl
-rw-r----- 1 oracle oinstall 7061504 Oct 16 02:25 control02.ctl
-rw-r----- 1 oracle oinstall 7061504 Oct 16 02:25 control01.ctl
[oracle@aoracle ezhou]$ rm -rf *.dbf
[oracle@aoracle ezhou]$ ls -lrt
total 174508
drwxr-xr-x 3 oracle oinstall 4096 Sep 28 16:34 patch
-rw-r----- 1 oracle oinstall 52429312 Oct 15 15:24 redo01.log
-rw-r----- 1 oracle oinstall 52429312 Oct 15 15:25 redo02.log
-rw-r----- 1 oracle oinstall 52429312 Oct 16 00:49 redo03.log
-rw-r----- 1 oracle oinstall 7061504 Oct 16 02:25 control03.ctl
-rw-r----- 1 oracle oinstall 7061504 Oct 16 02:25 control02.ctl
-rw-r----- 1 oracle oinstall 7061504 Oct 16 02:25 control01.ctl
好下面对数据库进行恢复:
看一下数据库的status :
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> select status from v$instance;
select status from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available
SQL> startup;
ORACLE instance started.
Total System Global Area 335544320 bytes
Fixed Size 1219280 bytes
Variable Size 83887408 bytes
Database Buffers 247463936 bytes
Redo Buffers 2973696 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u02/ezhou/system01.dbf'
数据库没有数据文件:
现在的状态是mounted:
RMAN> run {
2> restore database;
3> recover database;
4> }
Starting restore at 16-OCT-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u02/ezhou/system01.dbf
restoring datafile 00002 to /u02/ezhou/undotbs01.dbf
restoring datafile 00003 to /u02/ezhou/sysaux01.dbf
restoring datafile 00004 to /u02/ezhou/users01.dbf
restoring datafile 00005 to /u02/ezhou/example01.dbf
restoring datafile 00006 to /u02/ezhou/example02.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman/ezhou_09mp76h8_1_1.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/u02/rman/ezhou_09mp76h8_1_1.bak tag=TAG20111016T021256
channel ORA_DISK_