修改靜態參數scope=spfile錯誤,導致spfile文件被破壞,無法重啓的解決方法

情景:alter system set nls_date_format='yyyy-mm-dd hi24:mi:ss' scope=spfile;

   shutdown immediate;

   startup [nomount];   --error:日期格式無法識別


解決方法:

   進入到相應目錄下,使用strings可以看到文件中的相關內容。

   c:/>strings spfileorcl.ora  可看到修改的錯誤參數

   

(以pfile啓動後,再使用pfile創建spfile,再重啓)--oracle默認使用spfile連接數據庫

1、sqlplus / as sysdba

2、startup pfile=G:\Oracle\admin\test\pfile\init.ora.11202013161111;

3、create spfile from pfile='G:\Oracle\admin\test\pfile\init.ora.11202013161111';  --pfile的路徑寫全路徑

4、shutdown immediate  ---startup


重新修改:alter system set nls_date_format='yyyy-mm-dd hh24:mi:ss' scope=spfile;

重啓後正常。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章