Oracle ORA-15027错误的解决办法
DG1是asm实例的第一个磁盘组,由于维护的原因,想要删掉这个磁盘组,然后重建,删除时报错
SQL>drop diskgroup dg1 including contents;
drop diskgroup dg1 including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15027: active use of diskgroup "DG1" precludes its dismount
默认情况下,Oracle使用asm的第一个磁盘组存放asm实例的参数文件,也就是说这个磁盘组处于使用状态,是无法删除的,这也就是上面报错的原因,知道了原因
,那解决起来就是很简单的事情了。
[grid@asm11g dbs]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Tue May 22 22:04:49
2012
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/grid/product/11.2.0/grid/dbs/init+ASM.ora' from
spfile;
File created.
SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
pfile='/u01/app/grid/product/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 dg1 mount;
Diskgroup altered.
SQL> drop diskgroup dg1 including contents;
Diskgroup dropped.
SQL>
使用命令create diskgroup或者是asmca工具重建磁盘组dg1
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