當安裝oracle的機器變了機器名,或者變了ip地址。那麼原來的dbconsole就起不來了。
或者當在dos下運行:emctl start dbconsole 的時候報錯。解決辦法:
1. 修改DBSNMP密碼:
重新設定DBCONSOLE,需要輸入DBSNMP密碼,但任何密碼都會顯示錯誤,需要預先修改。
sql>alter user dbsnmp identified by xxx;
2. 刪除早期DBCONSOLE建立的使用者:
sql>drop role MGMT_USER;
sql>drop user MGMT_VIEW cascade;
sql>drop user sysman cascade;
3. 刪除早期DBCONSOLE建立的對象:
sql>drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
sql>drop PUBLIC SYNONYM SETEMVIEWUSERCONTEXT;
4. 重新建立DBCONSOLE:
[Windows系統]命令提示字元下輸入:
c:/>emca -config dbcontrol db -repos create
Enter the following information:
Database SID: orcl
Listener port number: 1521
assword for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
----------------------------------------------------------------------
輸入以下有關要配置的資料庫的資訊資料庫
SID: 根據實際監聽程式連接埠號碼: 1521
dbsnmp 口令:剛才改的xxx(sql>alter user dbsnmp identified by xxx;)
sysman 口令:自己輸一個
sys 口令:據實
通知的電子郵件地址: 可不填
通知的電子郵件網關:可不填
如果重建成功,則可看到以下資訊:
INFO: >>>>>>>>>>> The Database Control URL is http://192.168.120.128:5501/em <<<<<<<<<<< Enterprise Manager configuration completed successfully FINISHED EMCA at Jan 7, 2011 6:05:35 PM 5.
PS:建立EM時,提示的連接埠號碼,應為執行個體的斷口號,比如1521,不是EM的連接埠號碼(比如1158)
EM的連接埠號碼在這個檔案中可以查到10.2.0db_1sysmanconfigemca.properties
6:建立成功後,檢查狀態命令 emctl status dbconsole
同樣可以看到你的重建資訊如下:
C:/>emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation.
All rights reserved. http://192.168.120.128:5501/em/console/aboutApplication Oracle Enterprise Manager 10g is running. ------------------------------------------------------------------ Logs are generated in directory C:/oracle/product/10.2.0/db_1/192.168.120.128_or cl/sysman/log :
7. 服務已經啟動了。如果想手動重起: emctl stop dbconsole emctl start dbconsole
PS:開啟瀏覽器輸入http://機器名:連接埠/em 或者用http://IP:PORT/em可以訪問
如果http://機器名:連接埠/em 不可用 ,則需要更改本機hosts檔案,增加IP映射.