Database won’t start because of missing datafile

I had a situation today where my database would not start because “someone” had deleted a datafile.  While deleting the datafile at the OS level was probably not a particularly good decision, things like this do happen occasionally, so how to get the database back up?

Here is the error message when the database refused to start:

ORA-01157: cannot identify/lock data file 14 - see DBWR trace file
ORA-01110: data file 14: 'C:\DATABASE\ORADATA\ORCL\CDBWKLW.DBF'

This command is the quickest and easiest way to get rid of the problem:

alter database datafile 'c:\database\oradata\orcl\cdbwklw.dbf' offline drop ;

After this the database will start happily.  You may need to drop the tablespace too.

About Mark Nelson

Mark Nelson is a Developer Evangelist at Oracle, focusing on microservices and AI. Mark has served as a Section Leader in Stanford's Code in Place program that has introduced tens of thousands of people to the joy of programming, he is a published author, a reviewer and contributor, a content creator and a lifelong learner. He enjoys traveling, meeting people and learning about foods and cultures of the world. Mark has worked at Oracle since 2006 and before that at IBM since 1994.
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

1 Response to Database won’t start because of missing datafile

  1. Pingback: RedStack

Leave a comment