在执行该命令时出现下列错误
SQL> alter system set processes = 1000 scope=spfile;
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE is in use
解决:
1.查看是否有spfile,spfile的路径值为空,需要通过pfile创建
SYS@PROD>show parameter spfile;
NAME TYPE VALUE
------------------------------------ ---------------------
spfile string
疑问:为什么spfile路径为空(使用spfile启动数据库时,这个value 就有值。使用pfile 启动数据库,这个value 就是空),为什么需要从pfile创建
2.从pfile创建spfile
SYS@PROD>create spfile from pfile;
File created.
3.关闭数据库
SYS@PROD>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
4.启动数据库
SYS@PROD>startup
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 541068368 bytes
Database Buffers 289406976 bytes
Redo Buffers 2371584 bytes
Database mounted.
Database opened.
5.查看是否有spfile文件
SYS@PROD>show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------------------
spfile string /u01/app/oracle/product/12.2.0/dbhome_1/dbs/spfileshycorcl.ora
6.再次执行该命令,问题解决
SYS@PROD>alter system set processes = 1000 scope=spfile;
System altered.
7.查看目录,会发现新的spfile文件
文章评论