简单说下原因:当时图方便没进数据库,直接在datafile目录下删除了表空间对应的数据文件
错误如下;
ORA-01116:error in opening database ****
ORA-01110:data file 54:'/home3/datafile/arrange/NewArrange.dbf'
ORA-27041:unable to open file
Linux Error:2: No Such file or directory
Additional information: 3
alter database datafile '/hot/oradata/SMSDBMT_INDX01.dbf' offline drop;
alter database datafile '/hot/oradata/SMSDBMT_INDX01.dbf' offline drop
*
ERROR at line 1:
ORA-01516: nonexistent log file,data file,or temporary file
"/hot/oradata/SMSDBMT_INDX01.dbf"
解决办法:
sql> shutdown immediate -----报错
2,启动数据库到挂载模式
sql>startup mount
sql>alter database datafile '/hot/oradata/SMSDBMT_INDX01.dbf' offline drop; -----删除表空间文件 成功
3, 打开数据库
sql>alter database open;
4,删除表空间
sql>drop tablespace SMSDBMT_INDX including contents and datafiles;---删除表空间