在執行該指令時出現下列錯誤
SYS@PROD>alter system set UTL_FILE_DIR='/home/oracle','/home/oracle/temp','/home/oracle/scripts' scope=spfile;
alter system set UTL_FILE_DIR='/home/oracle','/home/oracle/temp','/home/oracle/scripts' scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE is in use
解決:
1.檢視是否有spfile
SYS@PROD>show parameter spfile;
NAME TYPE VALUE
------------------------------------ ---------------------
spfile string
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檔案
NAME TYPE VALUE
------------------------------------ ----------------------
spfile string 01/app/oracle/product/11.2.0/db_1/dbs/spfilePROD.ora
6.再次執行該指令,問題解決
System altered.