ORACLE 11G EM問題萬能解決辦法

yezhibin發表於2014-03-06
        對於一些政府,企業客戶,通常都要求安裝EM資料庫控制檯,對資料庫進行管理,對於DBA來說,偶爾會遇到各種EM問題,以下的方法基本能解決客戶90%以上的問題。

EM結構簡單分析 :

       EMCA可以想象為一個小的WEB應用,資料庫使用了sysman的表單,在手冊上對應的是emca命令中的repository,Web層存放在$ORACLE_HOME目錄下的相應目錄,修改配置對應emca中的config命令。基本上所有問題都在這兩個部分之中。

EM故障定位和解決:

   1、Web層錯誤,如sysman密碼和資料庫sysman密碼不一致等等問題
       解決辦法:刪除Web層配置重新建立:
      

$ emca -deconfig dbcontrol db –cluster  <刪除本地檔案目錄的配置檔案>

$ emca -config dbcontrol db –cluster   <建立本地檔案目錄的配置檔案>

Enter the following information:

Database unique name: xxxx

Service name: xxxxx

Listener port number: 1521

Listener ORACLE_HOME [ /oracle/grid/11.2.0/grid ]:

Password for SYS user:    資料庫密碼sysdba>

Password for DBSNMP user: DBSNMP

Password for SYSMAN user: SYSMAN

Cluster name: xxxxx-cluster

Email address for notifications (optional):

Outgoing Mail (SMTP) server for notifications (optional):

ASM ORACLE_HOME [ /oracle/grid/11.2.0/grid ]:

ASM port [ 1521 ]:

ASM username [ ASMSNMP ]: sys

<備註:可通過grid使用者查詢gv$pwfile_users,是否包含該使用者,我們系統中只有sys使用者,該使用者的密碼管理是通過本地檔案$ORACLE_HOME/dbs/orapw+ASM檔案來管理的>

ASM user password: 



2、資料庫層錯誤解決方法:
emca -config dbcontrol db -repos recreate –cluster
   重新建立資料庫中的表

3、如果無法確定是哪個層面上出現錯誤,最簡單的方法是資料庫drop user sysman cascade,刪除該使用者的所有表單,然後重新建立

SQL>drop user sysman cascade
SQL>create user sysman identitited by sysman
    default tablespace SYSAUX
    temporary tablespace temp;
然後賦予sysman許可權,通過指令碼建立相應的EM
$ORACLE_HOME/sysman/admin/emdrep/sql/emreposcre  $ORACLE_HOME SYSMAN sysdba TEMP on

 



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/354732/viewspace-1102104/,如需轉載,請註明出處,否則將追究法律責任。

相關文章