非法關機 Oracle startup報錯解決辦法

來源:互聯網
上載者:User

今天Oracle程式開發伺服器突然串連不上,sqlplus /nolog、conn /as sysdba、startup命令後顯示

SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/opt/oracle10g/product/10.2/db_1/dbs/initORA10G.ora'

尋找檔案,果然不存在。估計是非法關機造成的。

這是因為在oracle9i和oracle10g中,oracle預設將使用spfile啟動資料庫,如果spfile不存在,則就會出現上述錯誤。

解決方案1(已經驗證):
將$ORACLE_BASE/admin /資料庫名稱/pfile目錄下的init.ora.012009233838形式的檔案copy到$ORACLE_HOME/dbs目錄下 initoracle.ora即可。(註:initoracle.ora中的oracle為你的執行個體名 ORACLE_SID)


解決方案2:

用oraenv命令來改變當前環境的SID,然後用pfile重新產生spfile,就可以啟動資料庫了.
改變SID:
[oracle@ www.bkjia.com root]$ source oraenv
ORACLE_SID = [oracle] ? test1
bash: /root/.bashrc: Permission denied
重新產生spfile:
SQL> create spfile from pfile;
File created.

SQL> startup
ORACLE instance started.

附:Linux下oracle操作命令

重啟oracle

lsnrctl stop
sqlplus /nolog
conn /as sysdba
shutdown (startup)
exit
lsnrctl start

啟動oracle
sqlplus /nolog
conn /as sysdba
startup
exit

lsnrctl start


關閉oracle
lsnrctl stop
sqlplus /nolog
conn /as sysdba
shutdown
exit

查看Oracle是否啟動

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.