Monday, October 14, 2013

ORA-15032: not all alterations performed ORA-15028: ASM file '+OCR_VOTE/spfileasm.ora' not dropped; currently being accessed


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

ORA-15028: ASM file '+OCR_VOTE/spfileasm.ora' not dropped; currently being accessed

### Full Error

SQL> alter diskgroup OCR_VOTE drop file '+OCR_VOTE/spfileasm.ora';
alter diskgroup OCR_VOTE drop file '+OCR_VOTE/spfileasm.ora'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15028: ASM file '+OCR_VOTE/spfileasm.ora' not dropped; currently being accessed

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

Error occured while trying to drop SPFILE from one diskgroup, which is supposed to be dropped in 11.2.0.3.0 version

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

In Sqlplus

alter diskgroup OCR_VOTE drop file '+OCR_VOTE/spfileasm.ora';

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

### 11.2.0.3.0

#########################################
# 1) Why i'm dropping SPFILE
#########################################

We want to move all the files from +OCR_VOTE diskgroup to new diskgroup. All the files are moved except ASM Spfile.

As the ASM instance is currently using the Parameter file, it cant be dropped. So followed below steps to drop it.

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

1) Create a pfile to a temporary location from Spfile.

SQL> create pfile='$ORACLE_HOME/dbs/init+ASM.ora' from spfile;

2) Shutdown ASM instance.

SQL> shutdown immediate

3) Startup with Pfile

SQL> startup pfile=$ORACLE_HOME/dbs/init+ASM.ora

4) Now Drop the Spfile from +OCR_VOTE diskgroup.

alter diskgroup OCR_VOTE drop file '+OCR_VOTE/spfileasm.ora';

No comments: