ORA-01034: 、ORA-01078: 和 LRM-00109: 的解決方案,ora-01034ora-01078

來源:互聯網
上載者:User

ORA-01034: 、ORA-01078: 和 LRM-00109: 的解決方案,ora-01034ora-01078

環境:Linux 5.4 Oracle 11.2.0.3

在Linux上串連Oracle時遇到報錯:

SQL> show parameter sga
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/initorcal.ora'

上面的'../initorcal.ora'報錯說明當前Oracle資料庫識別的資料庫執行個體名(即SID)為:orcal;
可能是安裝Oracle時的SID的設定和環境變數裡設定的SID不一致造成的。

解決方案:

1.查詢當前的資料執行個體名(SID)
[oracle@oradb ~]$ echo $ORACLE_SID
orcal

2.查看環境變數的SID配置
[oracle@oradb ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
export ORACLE_SID=orcl

發現系統識別的執行個體名orcal和環境變數設定的為orcl不一致,這時我們需要修改執行個體名SID

3.修改oracle使用者的ORACLE_SID環境變數,如將orcal修改為orcl
[oracle@oradb ~]$ vi /home/oracle/.bash_profile
export ORACLE_SID=orcl

4.修改/etc/oratab檔案,將sid名由orcal修改為orcl
[oracle@oradb ~]$ vi /etc/oratab
orcl:/u01/app/oracle/product/11.2.0/db_1:N

5、進入到$ORACLE_HOME/dbs目錄,如我的 /u01/app/oracle/product/11.2.0/db_1/dbs
將所有檔案名稱中包含原來的sid的修改為對應的新sid的
[oracle@oradb ~]$ cd /u01/app/oracle/product/11.2.0/db_1/dbs
[oracle@oradb dbs]$ ls
hc_orcal.dat  init.ora  lkORCAL  orapworcal  spfileorcal.ora

[oracle@oradb dbs]$ mv hc_orcal.dat hc_orcl.dat
[oracle@oradb dbs]$ mv lkORCAL lkORCL
[oracle@oradb dbs]$ mv orapworcal orapworcl
[oracle@oradb dbs]$ mv spfileorcal.ora spfileorcl.ora

6.啟動資料庫
[oracle@oradb dbs]$ sqlplus / as sysdba

SQL> startup
ORACLE instance started.

資料庫成功啟動!!

【參考】 http://www.linuxidc.com/Linux/2015-02/114255.htm

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.