ORA-01157: cannot identify/lock data file

I recently removed datafile by O.S command but did not updated database about it…

Let’s try to startup database:

SQL> startup;
ORACLE instance started.

Total System Global Area  612368384 bytes
Fixed Size                  1298160 bytes
Variable Size             167772432 bytes
Database Buffers          436207616 bytes
Redo Buffers                7090176 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\TESTTBS.DBF'

Database is going just in mount mode and giving an error, which is indicating that datafile 5 cannot be identified.

This is the datafile, which I have removed by O.S command.

Let’s solve this problem:

SQL> alter database datafile 5 offline drop;

Database altered.

SQL> alter database open;

Database altered.

That’s it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: