ORA-32000: write to SPFILE requested but SPFILE is not modifiable
遇到这种问题,肯定是spfile与pfile 出了问题
1.startup pfile='/home/oracle/pfile_xxx.ora';
在成功后,
2.su- grid
asmcmd
删除spfile_xxx.ora
3.sqlplus / as sysdba
create spfile='+DGDATA01/XXX/spfile_xxx.ora' from pfile='/home/oracle/pfile_xxx.ora';
查看+DGDATA01/XXX/spfile_xxx.ora 是否生成。
4.$ORACLE_HOME/dbs下的spfile_xxx.ora 先改为bak, mv spfile_xxx.ora spfile_xxx.ora_bak
因为启动顺序
spfile${ORACLE_SID}.ora > spfile.ora > init${ORACLESID}.ora
6. 重新启动
SQL> startup force;
ORACLE instance started.
Total System Global Area 1.5099E+10 bytes
Fixed Size 2243072 bytes
Variable Size 2013267456 bytes
Database Buffers 1.3053E+10 bytes
Redo Buffers 30699520 bytes
Database mounted.
Database opened.
SQL> exit
7.重启动检查
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DGDATA01/xxx/spfile_xxx.
ora
SQL> startup force
ORACLE instance started.
Total System Global Area 1.5099E+10 bytes
Fixed Size 2243072 bytes
Variable Size 2013267456 bytes
Database Buffers 1.3053E+10 bytes
Redo Buffers 30699520 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DGDATA01/xxx/spfile_xxx.
ora
SQL> ALTER system SET sga_max_size=20G sid='*' scope=spfile;