Unable to Drop ASM DiskGroup Giving ORA-15027
SCENARIO:
When I tried to remove all the contents of a database using ASM I encountered an error from asmca. Even tried with sqlplus and ended up with the same below error.
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15027: active use of diskgroup “DATAGRP1” precludes its dismount
REASON:
ASM parameter file was residing in the Diskgroup DATAGRP1. This was the reason behind.
SQL> SELECT name, type, total_mb, free_mb, required_mirror_free_mb, usable_file_mb FROM V$ASM_DISKGROUP;
NAME TYPE TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB
——————— —————- ———-——— ————– ———————————————— —————————
DATAGRP1 EXTERN 7168000 7167858 0 7167858
FRAGRP1 EXTERN 512000 511222 0 511222
SQL> column HEADER_STATUS format a20
SQL> set pages 100
SQL> col PATH format a25
SQL> SELECT name, header_status, path FROM V$ASM_DISK where name like ‘%DATA%’;
NAME HEADER_STATUS PATH
—————— ——————————– ————————-
DATA_0001 MEMBER /dev/rdisk/disk01
DATA_0002 MEMBER /dev/rdisk/disk02
DATA_0003 MEMBER /dev/rdisk/disk03
DATA_0004 MEMBER /dev/rdisk/disk04
DATA_0005 MEMBER /dev/rdisk/disk05
5 rows selected.
I tried to drop the diskgroup DATAGRP1 but I couldn’t drop it.
SQL> DROP DISKGROUP datagrp1 INCLUDING CONTENTS;
DROP DISKGROUP datagrp INCLUDING CONTENTS
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15027: active use of diskgroup “DATAGRP1” precludes its dismount
SQL>
SQL> DROP DISKGROUP datagrp1 FORCE INCLUDING CONTENTS;
DROP DISKGROUP datagrp1 FORCE INCLUDING CONTENTS
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15230: diskgroup ‘DATAGRP1’ does not require the FORCE option
I created a pfile from spfile and restarted the ASM Instance using this created pfile “init_orcldb.ora”.
SQL> create pfile=’/usr2/grid/init_asm.ora’ from spfile;
File created.
SQL> shutdown immediate;
ASM diskgroups dismounted
ASM instance shutdown
When I started the ASM Instance the diskgroup did not get mounted.
SQL> startup pfile=’/usr2/grid/init_asm.ora’;
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2169104 bytes
Variable Size 256595696 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted
SQL> DROP DISKGROUP datagrp1 INCLUDING CONTENTS;
DROP DISKGROUP datagrp1 INCLUDING CONTENTS
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15001: diskgroup “DATAGRP1” does not exist or is not mounted
Finally used FORCE option to drop the diskgroup and it’s been dropped successfully.
SQL> DROP DISKGROUP datagrp1 FORCE INCLUDING CONTENTS;
Diskgroup dropped.
SQL>