做试验的时候删除表空间前把数据文件给删掉了...数据库没法关闭
---
SQL> shutdown immediate;
ORA-01116: error in opening database file 7
ORA-01110: data file 7: '/ora/app/oracle/oradata/orcl/test01.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
---
SQL> shutdown abort
SQL> startup mount
SQL> alter database datafile '/ora/app/oracle/oradata/orcl/test01.dbf' offline drop;
Database altered.
---
表空间还存在
SQL> select * from v$tablespace;
TS# NAME INC BIG FLA ENC
---------- ------------------------------ --- --- --- ---
0 SYSTEM YES NO YES
1 UNDOTBS1 YES NO YES
2 SYSAUX YES NO YES
4 USERS YES NO YES
3 TEMP NO NO YES
6 EXAMPLE YES NO YES
7 BRUCETBS YES NO YES
10 TEST YES NO YES
SQL> drop tablespace test;
Tablespace dropped.
SQL> select * from v$tablespace;
TS# NAME INC BIG FLA ENC
---------- ------------------------------ --- --- --- ---
0 SYSTEM YES NO YES
1 UNDOTBS1 YES NO YES
2 SYSAUX YES NO YES
4 USERS YES NO YES
3 TEMP NO NO YES
6 EXAMPLE YES NO YES
7 BRUCETBS YES NO YES
16 MYTEMP NO NO YES
表空间删掉了
先drop表空间,再删文件,容易删错!
drop tablespace xx INCLUDING CONTENTS AND DATAFILES
阅读(3795) | 评论(0) | 转发(0) |