数据文件丢失的表空间无法drop解决方法
SQL> drop tablespace test including contents cascade constraints;
drop tablespace test including contents cascade constraints
*
ERROR at line 1:
ORA-01116: error in opening database file 9
ORA-01110: data file 9: '/opt/oracle/test.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
SQL> drop tablespace test including contents cascade constraints;
drop tablespace test including contents cascade constraints
*
ERROR at line 1:
ORA-01116: error in opening database file 9
ORA-01110: data file 9: '/opt/oracle/test.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
SQL> alter tablespace test offline;
alter tablespace test offline
*
ERROR at line 1:
ORA-01116: error in opening database file 9
ORA-01110: data file 9: '/opt/oracle/test.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
SQL> alter database datafile 9 offline;
Database altered.
SQL> drop tablespace test including contents;
Tablespace dropped.
SQL>
这个问题已经解决,做法如下
1) MOUNT数据库:
STARTUP MOUNT
2) OFFLINE DROP数据文件:
ALTER DATABASE DATAFILE '' OFFLINE DROP;
3) 打开数据库:
ALTER DATABASE OPEN;
4) 删除表空间:
DROP TABLESPACE INCLUDING CONTENTS;
1) MOUNT数据库:
STARTUP MOUNT
2) OFFLINE DROP数据文件:
ALTER DATABASE DATAFILE '' OFFLINE DROP;
3) 打开数据库:
ALTER DATABASE OPEN;
4) 删除表空间:
DROP TABLESPACE INCLUDING CONTENTS;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22779291/viewspace-688020/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22779291/viewspace-688020/