ORA-01157: cannot identify/lock data file 10 - see DBWR trace file

oralce千万不要再没删库前删表空间文件

正确的删库方法

drop user ECOE_YY_JSNTGZQ cascade;
drop tablespace DB_1101_TEST_HBHDCA including contents and datafiles cascade constraint;
drop tablespace DB_ECOE_YY_JSNTGZQ_O1_TMP including contents and datafiles cascade constraint;

否则下次启动数据会出现如下报错

ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
ORA-01110: data file 10: '/data/oracle/oradata/orcl/DB_1101_TEST_HBHDCA.DBF'

如下解决

SQL> shutdown immediate;
SQL> startup mount;
##手动将表空间文件下线
SQL> select file#,name,status from v$datafile;
SQL> alter database datafile '/data/oracle/oradata/orcl/DB_1101_TEST_HBHDCA.DBF' offline drop;
##删除表空间
SQL> select * from v$tablespace;
SQL> alter database open;
SQL> drop tablespace DB_1101_HBHDCA_O1_201912 including contents cascade constraints;
##重启
SQL> shutdown immediate;
SQL> startup;

你可能感兴趣的:(oracle)