Thursday, April 26, 2012

Accidentally deleted a datafile

I have accidentally delete a datafile:

This is how to get the database running again:

Here is a dirty workaround to open the database. Connect to sqlplus as sysdba.
1. STARTUP NOMOUNT;
2. ALTER DATABASE MOUNT;
3. ALTER DATABASE DATAFILE '/filesystem01/datafile11.dbf' OFFLINE DROP;
4. ALTER DATABASE OPEN;
5. DROP TABLESPACE TEST INCLUDING CONTENTS; 
 
 
Instructions were found on: http://www.runningoracle.com/product_info.php?products_id=203