有一个数据库硬盘空间满了,查看发现一个dbf超大,并且不在规定的路径下,知道是一个非重要数据文件,于是删除。
后来重启数据库时,
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 96470608 bytes
Database Buffers 184549376 bytes
Redo Buffers 2973696 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 – see DBWR trace file
ORA-01110: data file 2: ‘/opt/oracle/oradata/myora/undotbs01.dbf’;
处理办法:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 96470608 bytes
Database Buffers 184549376 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> alter database datafile ‘/opt/oracle/oradata/myora/undotbs01.dbf’ offline drop;
Database altered.
SQL> alter database open;
语句已处理。
最后将表空间drop,再重建就好了。