Oracle ORA-15027错误的解决办法

场景:将ASM磁盘加入磁盘组时,选错了模式。之后进行删除操作,报ORA-15027错。DATA磁盘组是第一个磁盘组

[root@localhost install]# su - grid
[grid@localhost ~]$ sqlplus / as sysasm
​
SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 15 04:15:05 2014
​
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
​
​
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
​
SQL> drop diskgroup DATA including contents;
drop diskgroup DATA including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15027: active use of diskgroup "DATA" precludes its dismount

原因:默认情况下,Oracle使用asm的第一个磁盘组存放asm实例的参数文件,也就是说这个磁盘组处于使用状态,是无法删除的,这也就是上面报错的原因。

[grid@localhost ~]$ sqlplus / as sysasm      
​
SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 15 04:22:00 2014
​
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
​
​
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
​
SQL> create pfile='/u01/app/11.2.0/grid/dbs/init+ASM.ora' from spfile;
​
File created.
​
SQL> shutdown immediate;
ASM diskgroups volume disabled
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup pfile='/u01/app/11.2.0/grid/dbs/init+ASM.ora'      
ASM instance started
​
Total System Global Area  283930624 bytes
Fixed Size                  2227664 bytes
Variable Size             256537136 bytes
ASM Cache                  25165824 bytes
ORA-15110: no diskgroups mounted
​
​
SQL> alter diskgroup DATA mount;
​
Diskgroup altered.
​
SQL> drop diskgroup DATA including contents;
​
Diskgroup dropped.

使用命令create diskgroup或者是asmca工具重建磁盘组DATA

SQL> create spfile='+dg1' from pfile;
File created.
SQL> show parameter spfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string
SQL>
SQL> startup force
ASM instance started
Total System Global Area  283930624 bytes
Fixed Size                  2227664 bytes
Variable Size             256537136 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL> show parameter spfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DG1/asm/asmparameterfile/regi
                                                 stry.253.783987251

你可能感兴趣的:(Oracle ORA-15027错误的解决办法)