How to move spfile from file system to ASM diskgroup
I have single ASM instance and want to move spfile from file system to ASM.
Database name – BEE
1. Check current pfile location:
SQL> show parameter pfile
NAME TYPE VALUE
------------------------------------ -----------
spfile string /tmp/tempinit.ora
2. Create directory in ASM diskgroup
export ORACLE_HOME=/crsapp/app/oracle/product/12.1.2.0/grid12c
export ORACLE_SID=+ASM1
export PATH=$ORACLE_HOME/bin:$PATH
asmcmd
ASMCMD>mkdir +DATA/PARAM
3. Create the spfile from pfile:
create spfile='+DATA/PARAM/spfileBEE.ora' from pfile='/tmp/tempinit.ora';
4. Update INIT FILE pointing to actual spfile path
cd $ORACLE_HOME/dbs
cat initBEE.ora
SPFILE='+DATA/PARAM/spfileBEE.ora'
5. update database config
srvctl modify database -d BEE -p +DATA/PARAM/spfileBEE.ora
6. Restart the database
srvctl stop database -d BEE -o immediate
srvctl start database -d BEE
SQL> show parameter pfile
NAME TYPE VALUE
------------------------------------ -----------
spfile string +DATA/PARAM/spfileBEE.ora
Post a Comment
Post a Comment