浏览器输入地址http://192.168.15.17:1158/em打不开网页版的oem,登陆到服务器上emctl status dbconsole, 显示***is not running. 后emctl status dbconsole, 半天没有反应,不得已ctrl+c停止之。后又尝试多种办法,始终无效。最后只能选择recreate em 资料库。google到一些资料,模仿着做了一下:
重建em资料库:
[oracle@localhost whitney]$ emca -repos recreate
STARTED EMCA at Mar 19, 2008 12:03:14 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: whitney
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Mar 19, 2008 12:03:25 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle10g/product/10.2.0/cfgtoollogs/emca/whitney/emca_2008-03-19_12-03-1 4-PM.log.
Mar 19, 2008 12:03:26 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Mar 19, 2008 12:04:51 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Mar 19, 2008 12:04:51 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 19, 2008 12:08:06 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 19, 2008 12:08:06 PM
配置dbcontrol:
[oracle@localhost whitney]$ emca -config dbcontrol db
STARTED EMCA at Mar 19, 2008 12:09:47 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: whitney
Database Control is already configured for the database whitney
You have chosen to configure Database Control for managing the database whitney
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: 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/oracle10g/product/10.2.0
Database hostname ................ localhost
Listener port number ................ 1521
Database SID ................ whitney
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Mar 19, 2008 12:10:49 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle10g/product/10.2.0/cfgtoollogs/emca/whitney/emca_2008-03-19_12-09-4 7-PM.log.
Mar 19, 2008 12:10:50 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Mar 19, 2008 12:10:57 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 19, 2008 12:12:35 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Mar 19, 2008 12:12:35 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL ishttp://localhost:1158/em<<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 19, 2008 12:12:35 PM
[oracle@localhost whitney]$ emctl status dbconsole
TZ set to US/Eastern
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://localhost:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
之后再输入地址后就可以登陆了。
PS1:
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服务,察看服务状态等。
本文来自: 月落网(www.yueluo.net) 详细出处参考:http://www.yueluo.net/Oracle/20070813/856.html
PS2:
eygle的几篇关于oem的文章:
如何在Oracle10g中启动和关闭OEM--->http://www.eygle.com/archives/2005/10/howto_control_10goem.html
oracle 10g em乱码之快速解决--->http://www.eygle.com/archives/2006/03/oracle10g_em_font_change.html
PS3:
在linux 下
$ lsnrctl start; $ emctl start dbconsole ; $ isqlplusctl start ; startup 数据库Oracle10g OEM , isqlplus 管理默认端口等一些信息放在$ORACLE_HOME/install/portlist.ini
[oracle@localhost install]$ more portlist.ini
Enterprise Manager Console HTTP Port (whitney) = 1158
Enterprise Manager Agent Port (whitney) = 3938
Enterprise Manager Console HTTP Port (whitney) = 1158
Enterprise Manager Agent Port (whitney) = 3938
windows下找了一下没找到,下次找到了放到ps3中:)
自己的经历加上别人的资料在此纪录一下,备以后查用~~~