--查看sid
SQL> show parameter instance_name ;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string tos
--建立pfile
SQL> create pfile='/tmp/tospfile' from spfile;
File created.
--建立spfile in asm
SQL> create spfile='+data' from pfile='/tmp/tospfile';
File created.
--查看spfile name in asm
ASMCMD> pwd
+data/tos/parameterfile
ASMCMD> ls
spfile.282.754913039
--編輯pfile內容(如果有該檔案,先刪除/重新命名)
[oracle@localhost ~]$ vi $ORACLE_HOME/dbs/inittos.ora
#內容為
spfile='+data/tos/parameterfile/spfile.282.754913039'
--重新命名spfile檔案
[oracle@localhost dbs]$ mv spfiletos.ora spfiletos.ora_bak
--重啟資料庫
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
更多精彩內容:http://www.bianceng.cn/database/Oracle/
Fixed Size 1260672 bytes
Variable Size 75498368 bytes
Database Buffers 83886080 bytes
Redo Buffers 7127040 bytes
Database mounted.
Database opened.
--查看spfile
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/tos/parameterfile/spfile
.282.754913039