ORA-01157: cannot identify/lock data file
June 21, 2011 Leave a comment
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.