HELP! with re-creating lost datafile without Backup.
465251Dec 9 2005 — edited Dec 14 2005Hello Oracle Gurus,
I am currently studying Oracle 9i and was experimenting with data backup and recovery. I have 9i running on my Windows box. I was going thru the ILTs of DBA2, which says how to re-create lost datafile without backup.
So for experimentation I shut down the database (SHUT), deleted EXAMPLE01.DBF datafile from its original directory, restarted the database using STARTUP, it gave me error as expected.
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: 'D:\ORACLE\ORADATA\ORCL\EXAMPLE01.DBF'
So I made the datafile offline by: ALTER DATABASE DATAFILE 5 OFFLINE;
ALTER DATABASE OPEN;
It opened successfully, since EXAMPLE01.DBF is now offline.
I tried to re-create the datafile using the command given in the ILT.
Alter database create datafile 'D:\ORACLE\ORADATA\ORCL\EXAMPLE01.DBF';
Which gave me error:
Alter database create datafile 'D:\ORACLE\ORADATA\ORCL\EXAMPLE01.DBF'
*
ERROR at line 1:
ORA-01178: file 5 created before last CREATE CONTROLFILE, cannot recreate
ORA-01110: data file 5: 'D:\ORACLE\ORADATA\ORCL\EXAMPLE01.DBF'
Now how should I proceed, I know I can bring back the deleted file from recycle bin and do datafile recovery but thats not what I want to do.
Archivelog is enabled and Archiver is set to true. I have all the Archive Log files.