場(chǎng)景:將ASM磁盤加入磁盤組時(shí),選錯(cuò)了模式。之后進(jìn)行刪除操作,報(bào)ORA-15027錯(cuò)。DATA磁盤組是第一個(gè)磁盤組
[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
原因:默認(rèn)情況下,Oracle使用asm的第一個(gè)磁盤組存放asm實(shí)例的參數(shù)文件,也就是說這個(gè)磁盤組處于使用狀態(tài),是無法刪除的,這也就是上面報(bào)錯(cuò)的原因。
[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