Friday, July 27, 2012

active use of diskgroup "DATA" precludes its dismount

Problem

Environment details:

Restore test environment.


HP-UX myhost1 B.11.31 U ia64


Oracle Database 11g Enterprise Edition Release 11.2.0.2.0


I want to drop database by drop database command.

Because, my SYSTEM tablespace needs recovery and I am lack of archive logs, I haven't chance to issue "drop database".

Further I tried to delete files by RMAN, but it does not work either. Because my controlfile also could not be found. Last resort, I tried flushing ASM disk headers by dd, it does not work either, it still shows DATA diskgroup and ASM disks. And finally I tried to drop disk group...

From asmca and asm command line I get below error message while dropping DATA disk group.

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

Cause

I do not know the real cause, but, as I stated above, it may be because of following reasons:

- lack of controlfile


-SYSTEM tablespace needs media recovery


Solution

I managed to drop disk group by:
alter diskgroup data dismount force;
drop diskgroup data force including contents;

Note that, below trials does not work, I got same error message, despite the fact that the database remains closed state.
srvctl stop diskgroup -g DATA
srvctl disable diskgroup -g DATA
srvctl stop asm

1 comment:

mimidatabase said...

Hello,
You can also use the asmcmd 'lsof' command to see which file is accessed by which instance.

Windows (powershell) counterparts of Linux commands

You may find Windows mostly powershell equivalent of frequently used Linux commands here. I will update this post, with newer ones by the ti...