在oracle10g中,oracle預設将使用spfile啟動資料庫,如果spfile不存在,則就會出現上述錯誤。
解決方法:
将$oracle_base/admin/你的資料庫名稱/pfile/init.ora.628201264542(這串數字未必一樣) copy到$oracle_home/dbs目錄下,并改名為你的資料庫執行個體名即可。例如:上面提示找不到init10g.ora這個檔案,就改成 init10g.ora
參考指令:
export $oracle_home --輸出使用中的環境變量home
cat /home/oracle/.bash_profile --或.bashrc檔案,務必确定$oracle_home的值與目前使用的一緻(我就遇到過不一緻的)
mv $oracle_base/admin/orcl/pfile/init.ora.628201264542 /oracle/10g/dbs/init10g.ora
--複制檔案到指定目錄
sqlplus "/as sysdba"
startup