误删除表空间(有备份),利用备份的控制文件恢复
一、模拟环境
07:59:14 SQL> select count(*) from scott.dept2;
COUNT(*)
----------
12
07:59:50 SQL> drop tablespace lxtbs1 including contents and datafiles;
Tablespace dropped.
07:59:56 SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
08:00:58 SQL> !
Fri Mar 23 18:50:06 2012
drop tablespace cuug including contents and datafiles
Fri Mar 23 18:50:08 2012
Deleted file /u01/app/oracle/oradata/anny/cuug01.dbf
Completed: drop tablespace cuug including contents and datafiles
二、转储所有数据文件
[oracle@cuug14 ~]$ cp /orabak/orcl/cold_bak/*.dbf /disk1/oradata/orcl
08:03:26 SQL> recover database until time '2012-02-12 07:59:53' using backup controlfile;
ORA-01034: ORACLE not available
08:04:12 SQL> startup mount
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 75499764 bytes
Database Buffers 88080384 bytes
Redo Buffers 2973696 bytes
Database mounted.
三、recover database
08:04:36 SQL> recover database until time '2012-02-12 07:59:53' using backup controlfile;
ORA-00279: change 831098 generated at 02/12/2012 06:32:28 needed for thread 1
ORA-00289: suggestion : /arch/orcl/arch_1_6_775023202.log
ORA-00280: change 831098 for thread 1 is in sequence #6
08:04:45 Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 832010 generated at 02/12/2012 07:55:37 needed for thread 1
ORA-00289: suggestion : /arch/orcl/arch_1_1_775036537.log
ORA-00280: change 832010 for thread 1 is in sequence #1
ORA-00279: change 832995 generated at 02/12/2012 07:58:39 needed for thread 1
ORA-00289: suggestion : /arch/orcl/arch_1_2_775036537.log
ORA-00280: change 832995 for thread 1 is in sequence #2
ORA-00278: log file '/arch/orcl/arch_1_1_775036537.log' no longer needed for this recovery
ORA-00279: change 832997 generated at 02/12/2012 07:58:40 needed for thread 1
ORA-00289: suggestion : /arch/orcl/arch_1_3_775036537.log
ORA-00280: change 832997 for thread 1 is in sequence #3
ORA-00278: log file '/arch/orcl/arch_1_2_775036537.log' no longer needed for this recovery
ORA-00279: change 833000 generated at 02/12/2012 07:58:43 needed for thread 1
ORA-00289: suggestion : /arch/orcl/arch_1_4_775036537.log
ORA-00280: change 833000 for thread 1 is in sequence #4
ORA-00278: log file '/arch/orcl/arch_1_3_775036537.log' no longer needed for this recovery
ORA-00279: change 833017 generated at 02/12/2012 07:59:13 needed for thread 1
ORA-00289: suggestion : /arch/orcl/arch_1_5_775036537.log
ORA-00280: change 833017 for thread 1 is in sequence #5
ORA-00278: log file '/arch/orcl/arch_1_4_775036537.log' no longer needed for this recovery
ORA-00279: change 833019 generated at 02/12/2012 07:59:14 needed for thread 1
查看本栏目更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/