If you mistakenly delete the data file test.dbf of test in a tablespace, and then the next time you restart the database, the database cannot be opened (open) .
always error: sql> ALTER DATABASE open;
ALTER DATABASE open*
ERROR at line 1:
Ora-01157:cannot identify/lock data File 6-see dbwrtrace file
Ora-01110:data file 6: '/U01/APP/ORACLE/ORADATA/ORCL/TEST.DBF '
Solution:
1, Create a new test.dbf file in the path /u01/app/oracle/oradata/orcl/;
2, to sqlplus/as sysdba Login Database startup force; But at this point will also error, it's OK;
3. Execution:
sql> ALTER DATABASE datafile '/U01/APP/ORACLE/ORADATA/ORCL/TEST.DBF ' offline drop;
Database altered.
4. Follow up:
Sql> Startupforce
ORACLE instance started.
Total System Global area 1570009088 bytes
Fixed Size 2253584 bytes
Variable Size 973081840 bytes
Database buffers 587202560 bytes
Redo buffers 7471104 bytes
Database mounted.
Database opened.
5.after the above steps, the database is open .
Oracle Table Space Recovery