oracle 10g EM登入後提示“資料庫狀態當前不可用可能是因為資料庫的狀態為裝載或不裝載”

來源:互聯網
上載者:User


建立資料庫過程中更改了sys,system等密碼後,EM可以正常登入,但是登入後提示“資料庫狀態當前不可用。可能是因為資料庫的狀態為裝載或不裝載。單擊 '啟動' 可以獲得目前狀態並開啟資料庫。如果無法開啟資料庫, 單擊 '執行恢複' 可執行相應的恢複操作。”


  
解決方案如下:
 
1、停止dbconsole
    [oracle@star~]$ emctl stop dbconsole
    查看狀態,確認dbconsole已經停止

    [oracle@star~]$ emctl status dbconsole


**如果執行emctl stop dbconsole

報錯:Environment variable ORACLE_SID not defined. Please define it.

則執行:set ORACLE_SID=資料庫名

 
2、修改sysman使用者的密碼,我把密碼改成oracle123
    [oracle@star~]$ sqlplus / as sysdba
    SQL> alter user sysman identified by oracle123;
 
    解鎖使用者:
    SQL> alter user sysman account unlock;
 
    確認密碼已修改:
    SQL> conn sysman/oracle123@csc
    Connected. 
 
3、轉到$ORACLE_HOME/host_sid/sysman/config目錄下
    a. 把emoms.properties另存新檔emoms.properties.old
    b. 修改emoms.properties檔案
    找到oracle.sysman.eml.mntr.emdRepPwd=把等於後的加密字串替換成剛才更改的密碼oracle123;
    找到oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE 把TRUE換成FALSE。
 
4、重啟dbconsole,訪問EM恢複正常
    [oracle@star~]$ emctl start dbconsole
 
在此登入http://loclahost:5500/em,提示讓輸入使用者名稱密碼。
至此,恢複正常。

聯繫我們

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