Tuesday, October 15, 2013

ORA-15053: diskgroup "OCR_VOTE" contains existing files


##########################
## Error
##########################

ORA-15053: diskgroup "OCR_VOTE" contains existing files

### Full Error

SQL> Drop diskgroup OCR_VOTE;
Drop diskgroup OCR_VOTE
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15053: diskgroup "OCR_VOTE" contains existing files

##########################
#  Error Occurred
##########################

Error occured while trying to drop one of the diskgroup in 11.2.0.3.0 ASM version

##########################
## Command Executed
##########################

In ASM Instance Sqlplus,

Drop diskgroup OCR_VOTE;

##########################
## Issue Description.
##########################

### 11.2.0.3.0

#########################################
# 1) Check the Files Stored in ASM Diskgroup
#########################################

Disk group is not getting dropped because it has some files stored. Use the below query to find the files stored in Diskgroup.

set lines 200
col full_path for a110
SELECT full_path, dir, sys FROM (SELECT CONCAT('+'||gname,SYS_CONNECT_BY_PATH(aname,'/')) full_path,dir, sys FROM (SELECT g.name gname,a.parent_index pindex, a.name

aname,a.reference_index rindex, a.ALIAS_DIRECTORY dir,a.SYSTEM_CREATED sys FROM v$asm_alias a, v$asm_diskgroup g WHERE a.group_number = g.group_number) START WITH

(MOD(pindex, POWER(2, 24))) = 0 CONNECT BY PRIOR rindex = pindex ORDER BY dir desc, full_path asc)
WHERE UPPER(full_path) LIKE '%OCR_VOTE%';

FULL_PATH                                                                                                      D S
-------------------------------------------------------------------------------------------------------------- - -
+OCR_VOTE/dev-cluster                                                                                         Y Y
+OCR_VOTE/dev-cluster/OCRFILE                                                                                 Y Y
+OCR_VOTE/dev-cluster/OCRFILE/REGISTRY.255.828701551                                                          N Y

##########################
## Solution
##########################

Move/Drop the Files stored in the diskgroup before dropping, else use the below option to drop the diskgroup.

Drop diskgroup OCR_VOTE including contents;

SQL> Drop diskgroup OCR_VOTE including contents;

Diskgroup dropped.

No comments: