Hello
1-)Why does restore fail in below scenerio?
2-)'C:\TEST.DBF' datafile is not in my backupset,Why oracle attempts to restore it?
rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Sun Jul 26 12:29:42 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: XE (DBID=2563855341)
RMAN> backup database;
Starting backup at 26-JUL-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=38 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00003 name=C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF
input datafile fno=00001 name=C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
input datafile fno=00002 name=C:\ORACLEXE\ORADATA\XE\UNDO.DBF
input datafile fno=00004 name=C:\ORACLEXE\ORADATA\XE\TEST1.DBF
input datafile fno=00005 name=C:\ORACLEXE\ORADATA\XE\TEST2.DBF
input datafile fno=00006 name=C:\ORACLEXE\ORADATA\XE\TUNTEMP.DBF
channel ORA_DISK_1: starting piece 1 at 26-JUL-09
channel ORA_DISK_1: finished piece 1 at 26-JUL-09
piece handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2009_07_26\O1_MF_NNNDF_TAG20090
726T122957_56R8JRNJ_.BKP tag=TAG20090726T122957 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:18
Finished backup at 26-JUL-09
Starting Control File and SPFILE Autobackup at 26-JUL-09
piece handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\AUTOBACKUP\2009_07_26\O1_MF_S_693232337_5
6R8O2N0_.BKP comment=NONE
Finished Control File and SPFILE Autobackup at 26-JUL-09
C:\Documents and Settings> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 26 12:32:44 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
sys@XE> create tablespace test datafile 'C:/test.dbf' size 3m;
Tablespace created.
sys@XE> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
RMAN> restore database;
Starting restore at 26-JUL-09
using channel ORA_DISK_1
creating datafile fno=7 name=C:\TEST.DBF
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/26/2009 12:41:17
ORA-01119: error in creating database file 'C:\TEST.DBF'
ORA-27038: created file already exists
OSD-04010: <create> option specified, file already exists
If I restore old controlfile, it again gives the same error,old controlfile doesnt aware of the new tablespace, and this new datafile is not in my backupset. so why it gives this error?
RMAN> restore controlfile from autobackup;
Starting restore at 26-JUL-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=35 devtype=DISK
recovery area destination: C:\oraclexe\app\oracle\flash_recovery_area
database name (or database unique name) used for search: XE
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\AUTOBACKUP\2009_
07_26\O1_MF_S_693234306_56RBLMM1_.BKP
channel ORA_DISK_1: control file restore from autobackup complete
output filename=C:\ORACLEXE\ORADATA\XE\CONTROL.DBF
Finished restore at 26-JUL-09
RMAN> restore database;
RMAN-03002: failure of restore command at 07/26/2009 12:41:17
ORA-01119: error in creating database file 'C:\TEST.DBF'
ORA-27038: created file already exists
OSD-04010: <create> option specified, file already exists