oracle10g EM 問題

在裝oracle10g後,想試着打開EM,emctl start dbconsole,啓動em,瀏覽器中輸入http://IP:1158/em後,發麪問題:
 
初步懷疑是監聽的問題,lsnrctl status 正常,sqlplus sys/123456 as sysdba 正常,emctl start dbconsole也能正常啓動,tnsping ora10g檢測,sqlplus system/123456@ora10g也沒問題,怪了,是哪出了問題。在網上查了下,還是listener.ora有問題,裏面的host我寫的是ip,先lsnrctl stop,將裏面host改成localhost.localdomin,em就可正常訪問。
網上很多解決方案是重裝em
我也做了下試驗,不過和原來一樣,還得把host改爲localhost.localdomain,才能使用
下面寫下重裝em的過程:
1.先將listener.ora裏面的host改成localhost.localdomain,啓動監聽,要不em是刪不掉的
2.emca -repos drop (刪掉em)
      Enter the following information:
      Database SID: ora10g
      Listener port number: 1521
      Password for SYS user: 
      Password for SYSMAN user:
      Do you wish to continue? [yes(Y)/no(N)]: Y
3.重建em  emca -config dbcontrol db -repos create
   Do you wish to continue? [yes(Y)/no(N)]: Y
   Listener port number: 1521
   Password for SYS user: 
   Password for DBSNMP user: 
   Password for SYSMAN user: 
   Email address for notifications (optional):
   Outgoing Mail (SMTP) server for notifications (optional):
   -----------------------------------------------------------------
   You have specified the following settings
   Database ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1
   Database hostname ................ localhost.localdomain
   Listener port number ................ 1521
   Database SID ................ ora10g
   Email address for notifications ...............
   Outgoing Mail (SMTP) server for notifications ...............
4.完成,訪問 http://ip:1158/em
  
 附:  emca常用命令語法
        emca -repos create               創建一個EM資料庫 
        emca -repos recreate            重建一個EM資料庫 
        emca -repos drop                  刪除一個EM資料庫 
        emca -config dbcontrol db  配置數據庫的 Database Control 
        emca -deconfig dbcontrol db刪除數據庫的 Database Control配置 
        emca -reconfig ports            重新配置db control和agent的端口        
注:通過查看$ORACLE_HOME/install/portlist.ini 文件可以知道當前dbcontrol正在使用的端口,默認dbcontrol http端口1158,agent端口3938。如果要重新配置端口,可以使用如下命令: 
        emca -reconfig ports -dbcontrol_http_port 1159 
        emca -reconfig ports -agent_port 3939 
        emctl常用命令語法: 
        emctl start dbconsole啓動EM console服務,使用前需要先設置ORACLE_SID環境變量 
        emctl stop dbconsole停止EM console服務,使用前需要先設置ORACLE_SID環境變量
  
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章