滕小虫 发表于 2014-1-7 16:39:30

磁盘组里的表空间不能删除了,数据库重启后起不来了

本帖最后由 滕小虫 于 2014-1-7 17:38 编辑

今天做了一个删除磁盘组的实验,在A 节点上强制dismount test 磁盘组,然后再B节点上drop 掉了test,原来磁盘组里有一个ddd表空间,然后通过md_restore恢复了test磁盘组,原来的表空间还记录在控制文件里,怎么能把它删除掉呢
SQL>  select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DATA/db/datafile/system.256.835916617
+DATA/db/datafile/sysaux.257.835916617
+DATA/db/datafile/undotbs1.258.835916617
+DATA/db/datafile/users.259.835916617
+DATA/db/datafile/example.264.835916827
+DATA/db/datafile/undotbs2.265.835917157
+DATA/db/datafile/ttt.269.836180805
+DATA/db/datafile/ttt.270.836181105
+TEST/db/datafile/ddd.256.836194103
+TEST/db/datafile/abc.256.836198841

10 rows selected.

SQL> drop tablespace  ddd including contents and datafiles;
drop tablespace  ddd including contents and datafiles
*
ERROR at line 1:
ORA-01115: IO error reading block from file 9 (block # 1)
ORA-01110: data file 9: '+TEST/db/datafile/ddd.256.836194103'
ORA-15078: ASM diskgroup was forcibly dismounted


现在重启数据库后已经不能启动了

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 7 06:14:16 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  630501376 bytes
Fixed Size                  2230992 bytes
Variable Size             276825392 bytes
Database Buffers          348127232 bytes
Redo Buffers                3317760 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 8 - see DBWR trace file
ORA-01110: data file 8: '+TEST/db/datafile/abc.256.836200211'


SQL> alter tablespace abc offline;
alter tablespace abc offline
*
ERROR at line 1:
ORA-01109: database not open

xifenfei 发表于 2014-1-7 17:41:05

哥哥,你的数据库没有open
alter database datafile 8 offline;
alter database open;

滕小虫 发表于 2014-1-7 20:26:39

datafile和表空间都已经不能离线删除了

mql535 发表于 2014-1-8 09:06:51

后边再跟个drop呢?
页: [1]
查看完整版本: 磁盘组里的表空间不能删除了,数据库重启后起不来了