- ANKUSH THAVALI
- 10 Sep, 2023
- 0 Comments
- 1 Min Read
Move Spfile to ASM
Move Spfile to ASM :
For ASM configured systems ( whether it is single database or RACÂ ), it is a good idea to move the spfile to ASM. The PFILE under $ORACLE_HOME/dbs location actually points to the SPFILE on ASM disk.
Follow the below steps to move spfile to ASM :
1. Create PFILE from SPFILE:
Check if your database is running with SPFILE, if yes then create pfile from spfileshow parameter spfile NAMEÂ Â Â Â TYPE VALUE -------- ----------- ------------------------------ spfile string /oracle/app/oracle/product/dbs/spfilePRIM.oraCreate PFILE from the existing SPFILE
Create pfile from spfile; File created.
2. Create Directory in ASM Diskgroup :
Connect to ASMCMD prompt (grid) and create directory to hold the SPFILEASMCMD> mkdir +DATA/PRIM/PARAM
3. Create SPFILE in ASM from PFILE :
Now that we have the PFILE, we can create SPFILE from PFILE directly inside ASMSQL> create spfile='+DATA/PRIM/PARAM/spfilePRIM.ora' from pfile; Rename the SPFILE under $ORACLE_HOME/dbs location cd $ORACLE_HOME/dbs mv spfilePRIM.ora spfilePRIM_old.ora
4. Point PFILE to SPFILE on ASM :
Edit the PFILE and just add one single line below to point SPFILE on ASMvi initPRIM.ora spfile='+DATA/PRIM/PARAM/spfilePRIM.ora'Now Restart the database!