Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleted Database File (.dbf) 3

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello,

I mistakenly deleted an Oracle 8.17 database file from a live database. The DB is not in Archive Log mode. I had our UNIX System Admin restore the file (dev.dbf) but my database still will not open.

I was getting ORA-01113 "file needs recovery" errors prior to the restore and am now getting a message that says you must start with RESETLOGS or NORESET LOGS.

I have scoured all the docs I can find but still do not have a clear set of steps to get the database up (yes I am new to this).

Please, what steps\commands do I need to do to get my database back up?

Thanks,

Michael42
 
Did you restore all the necessary files from your backup? As far as I know (or at least have experience of and I stand to be corrected) you need to restore all dbf files, control files etc to achieve consistency throughout the db.
 
Sorry, just did a keyword search for datafile and found this advice from Dave (aka SantaMufasa)

1) STARTUP MOUNT
2) RECOVER DATABASE (if you are lucky, the recover will be successful; if you are unlucky, it will tell you that the recovery was unsuccessful since it needs data from archive logs that do not exist.)
3) If recovery was successful, then "ALTER DATABASE OPEN;"

You could try that first, but if it doesn't work maybe a full recovery is your only option - but do try a keyword search for other ideas. Good luck.
 
Is the tablespace which the datafile belongs to of any value?

If not you can offline the tablespace and then you should be able to open the rest of the database.

However if this is not the case you must go back to your last backup and restore it (as Ken says - a full recovery)

If you value your data then switch on archiving

Alex
 
Gents,

If the file "dev.dbf" is no older than the oldest on-line redo log file, then even if the database is not in ARCHIVELOG mode, you can still issue a "RECOVER DATABASE" command to roll "dev.dbf" forward.

Try it and let us know, Michael.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 19:00 (22Dec04) UTC (aka "GMT" and "Zulu"),
@ 12:00 (22Dec04) Mountain Time
 
Well Guys,

I learned a great deal on this one. :) Your suggestions rocked as usual.

Though I got the database back up...this DB is no where near OFA compliant which was part of the reason for the file being deleted. I am taking steps to address this of course.

Thanks again very much for your posts,

Michael
 
Hi,
Regardless of OFA, if the Oracle-related files are owned by a 'special' user ( like Oracle) with read-only rights to all others then only that user ( or a very careless root user who should then be replaced) can delete them ..


[profile]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top