1、啟動(dòng)dbconsole
[Oracle@www.linuxidc.com ~]$ emctl start dbconsole
如果提示:OC4J Configuration issue. /opt/Oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsol,則說(shuō)明沒(méi)有配置或沒(méi)有創(chuàng)建
2、配置dbconsole-
[Oracle@www.linuxidc.com ~]$ emca -config dbcontrol db
STARTED EMCA at Apr 21, 2009 2:21:41 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
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 ................ /opt/oracle/product/10.2.0
Database hostname ................ www.linuxidc.com
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Apr 21, 2009 2:23:52 AM Oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/Oracle/product/10.2.0/cfgtoollogs/emca/orcl/emca_2009-04-21_02-21-41-AM.log.
Apr 21, 2009 2:24:14 AM Oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Apr 21, 2009 2:24:35 AM Oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Apr 21, 2009 2:24:35 AM Oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Apr 21, 2009 2:26:15 AM Oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Apr 21, 2009 2:26:15 AM Oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://www.linuxidc.com:5502/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 21, 2009 2:26:15 AM
3、查看dbconsole的狀態(tài)和訪問(wèn)地址
[Oracle@www.linuxidc.com ~]$ emctl status dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://www.linuxidc.com:5502/em/console/aboutApplication #訪問(wèn)地址
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /opt/Oracle/product/10.2.0/www.linuxidc.com_orcl/sysman/log
4、刪除數(shù)據(jù)庫(kù)的 Database Control配置
Oracle@www.linuxidc.com ~]$ emca -deconfig dbcontrol db
5、常用的命令語(yǔ)法:
emca -repos create創(chuàng)建一個(gè)EM資料庫(kù)
emca -repos recreate重建一個(gè)EM資料庫(kù)
emca -repos drop刪除一個(gè)EM資料庫(kù)
emca -config dbcontrol db配置數(shù)據(jù)庫(kù)的 Database Control
emca -deconfig dbcontrol db刪除數(shù)據(jù)庫(kù)的 Database Control配置
emca -reconfig ports 重新配置db control和agent的端口
emctl start console啟動(dòng)EM console服務(wù),使用前需要先設(shè)置Oracle_SID環(huán)境變量
emctl stop console停止EM console服務(wù),使用前需要先設(shè)置Oracle_SID環(huán)境變量
注:通過(guò)查看$Oracle_HOME/install/portlist.ini 文件可以知道當(dāng)前dbcontrol正在使用的端口,默認(rèn)dbcontrol http端口1158,agent端口3938。如果要重新配置端口,可以使用如下命令:
emca -reconfig ports -dbcontrol_http_port 1159
emca -reconfig ports -agent_port 3939
使用命令行工具emctl可以啟動(dòng)/停止console服務(wù),察看服務(wù)狀態(tài)等。 本文出自:億恩科技【mszdt.com】
服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|