EM配置

$ emctl status dbconsole 

$ emctl stop dbconsole        停止控制檯

$ emctl start dbconsole       啓動控制檯

 重建em資料庫:

$ emctl stop dbconsole

$ emca -repos recreate

...

Enter the following information:

Database SID: orcl10

Listener port number: 1528

PassWord for SYS user: Oracle10

Password for SYSMAN user: oracle10

Do you wish to continue? [yes(Y)/no(N)]: y

...

INFO: Repository sUCcessfully created

Enterprise Manager configuration completed successfully

FINISHED EMCA at Apr 19, 2007 6:20:22 PM

 

配置dbcontrol: $ emca -config dbcontrol db

Enter the following information:

Database SID: orcl10

Database Control is already

configured for the database orcl10

You have chosen to configure

Database Control for managing

the database orcl10

This will remove the existing configuration

and the default settings and perform a fresh

configuration

Do you wish to continue? [yes(Y)/no(N)]: y

Listener port number: 1528

Password for SYS user: oracle10

Password for DBSNMP user: oracle10 

Password for SYSMAN user: oracle10

Email address for notifications (optional):

Outgoing Mail (SMTP) server for

notifications (optional):

...

Do you wish to continue? [yes(Y)/no(N)]: y

...

Enterprise Manager configuration

completed successfully

FINISHED EMCA at Apr 19, 2007 6:27:44 PM 然後再進入 http://localhost:1158/em 查看正常了。 Oracle10G的EM採用了web方式,並且分成了2個產品,database control和grid control。Grid control需要下載單獨的光盤安裝。在用DBCA建庫的時候,可以選擇是否啓用dbcontrol,啓用的話需要在數據庫中建立一個sysman的schema,用於保存EM的一些數據,這個就是EM的資料庫(repository)。

使用命令行工具emca可以創建,修改,重建或者刪除dbcontrol的配置。由於要在數據庫中建EM資料庫,數據庫和監聽都必須已經啓動並正常工作。       

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的端口

emctl start console

啓動EM console服務,使用前需要先

設置ORACLE_SID環境變量

emctl stop console 停止EM console服務,

使用前需要先設置ORACLE_SID環境變量

注:通過查看$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可以啓動/停止console服務,察看服務狀態等

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章