The post example shows how to delete the SPFILE in the +ASM DISKGROUP and relocate it to the $ORACLE_HOME/dbs directory. This process needs an instance restart and thus an outage.
1. Create pfile from the spfile
First, we will create pfile in filesystem from the existing spfile in ASM.
$ . oraenv a ORACLE_SID = [testdb] ? testdb
SQL> create pfile=’$ORACLE_HOME/dbs/initINFPRD.ora’ from spfile='+DG_ARCH/TESTDB/spfileINFPRD.ora';
2. Remove the spfile from ASM
We can now connect the the ASM instance and remove the spfile residing in ASM disk group.
$ . oraenv a ORACLE_SID = [+ASM] ? +ASM
ASMCMD> rm +DG_ARCH/testdb/spfiletestdb.ora
3. Recreate the spfile
Next step is to shutdown the database and recreate the spfile.
$ . oraenv a ORACLE_SID = [testdb] ? tesdb
SQL> shutdown immediate
SQL> create spfile=’$ORACLE_HOME/dbs/spfileINFPRD.ora' from pfile='$ORACLE_HOME/dbs/initINFPRD.ora’;
4. Start the database using new spfile
When you start the database, it will use the new spfile in filesystem that you have just created in the step 3.
Note: You can also use the pfile created in step 1 located at $ORACLE_HOME/dbs. Do not perform rest of the steps if you want to use pfile.