Saturday, 12 September 2015

ORA-32000: write to SPFILE requested but SPFILE is not modifiable

ORA-32000: write to SPFILE requested but SPFILE is not modifiable
Solution:  
If you see the spfile parameter in the database it shows as below.
Suppose have you shutdown DB and not able to startup, your spfile is on ASM disk but when you going to start DB then oracle lock the spfile in $ORACLE_HOME/dbs by default.
ex:
SQL> show parameter spfile
NAME                                       TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                                       string       /u01/app/oracle/product/11.2.0
                                                             /dbhome_1/dbs/spfiledb11gr2.or
                                                             a

Content of the spfile looks like below.
cat /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfiledb11gr2.ora
SPFILE='+DATA/db11gr2/spfiledb11gr2.ora' 
1. Move the spfile which is there in $ORACLE_HOME/dbs
ex:
mv spfiledb11gr2.ora spfiledb11gr2.ora.bkp

2. Create the file in $ORACLE_HOME/dbs location with init<SID>.ora name with below content.

SPFILE='<spfile location which is there in ASM>'
ex:
FileName: initdb11gr2.ora
SPFILE='+DATA/db11gr2/spfiledb11gr2.ora'

3. Then restart the database, it will use the spfile which is there in ASM.

4. Now you will be able to modify the spfile with below command.

ALTER SYSTEM set db_recovery_file_dest_size=10G scope=both sid='*' ;

1 comment: