在书上看到:"在删除了构成脱机表空间的数据文件或将它们还原和恢复到与闪回相同的时间点之前,不能打开数据库"
尝试恢复到闪回相同的时间点,但是失败了.
1,
select name,flashback_on from v$tablespace where name='MYTS';
NAME FLA
------------------------------ ---
MYTS NO
2,
alter tablespace MYTS offline;
3,
flashback database to scn 21248000;
flashback database to scn 21248000
*
ERROR at line 1:
ORA-38795: warning: FLASHBACK succeeded but OPEN RESETLOGS would get error below
ORA-01245: offline file 6 will be lost if RESETLOGS is done
ORA-01110: data file 6: '/u01/oradata/noasm/myts01.dbf'
4,
run {
2> set until scn=21248000;
3> restore datafile 6;
4> recover datafile 6;
5> }
executing command: SET until clause
Starting restore at 2011-09-15 10:30:47
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00006 to /u01/oradata/noasm/myts01.dbf
channel ORA_DISK_1: reading from backup piece /u01/fra/NOASM/backupset/2011_09_14/o1_mf_nnndf_TAG20110914T212055_771bkqyv_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/fra/NOASM/backupset/2011_09_14/o1_mf_nnndf_TAG20110914T212055_771bkqyv_.bkp tag=TAG20110914T212055
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 2011-09-15 10:30:55
Starting recover at 2011-09-15 10:30:55
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/15/2011 10:30:56
RMAN-06067: RECOVER DATABASE required with a backup or created control file