问题症状:
进入EM控制台(http://10.1.16.149:1158/em)后,没有输入用户名和密码就直接登陆并显示数据库状态信息;
显示的数据库和监听都是没有起来,把数据库和监听起来后,显示依旧是没有起来,用EM里的startup起数据库,数据库可以起来(但显示未起来),用EM起监听,监听无法起来。
OS:AIX 5304
DB:ORACLE 10G +ASM 单机
问题原因和解决办法:
重启console服务后也没效果:
$ emctl status dbconsole
$ emctl stop dbconsole
$ emctl start dbconsole
可能时原先监听未成功启动过,或者由于我修改过监听端口(1521改成12101)造成的。
重建em资料库:
$ emctl stop dbconsole
将数据库和监听都打开
$misdev11@oratest:/home/oratest >emca -repos recreate
STARTED EMCA at Mar 3, 2009 4:49: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: TEST
Listener port number: 12101
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 3, 2009 4:49:29 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /datavg46/test/testdb/10.2.0/cfgtoollogs/emca/TEST/emca_2009-03-03_04-49-14-PM.log.
Mar 3, 2009 4:49:30 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Mar 3, 2009 4:50:37 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Mar 3, 2009 4:50:37 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 3, 2009 4:52:40 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 3, 2009 4:52:40 PM
配置dbcontrol:
$misdev11@oratest:/home/oratest >emca -config dbcontrol db
STARTED EMCA at Mar 3, 2009 4:54:49 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: TEST
Database Control is already configured for the database TEST
You have chosen to configure Database Control for managing the database TEST
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: 12101
Password for SYS user:
Password for DBSNMP user:
Invalid username/password.
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
ASM ORACLE_HOME [ /datavg46/test/testdb/10.2.0 ]:
ASM SID [ +ASM ]:
ASM port [ 12101 ]:
ASM user role [ SYSDBA ]:
ASM username [ SYS ]:
ASM user password:
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /datavg46/test/testdb/10.2.0
Database hostname ................ misdev11.dev.chinamobile.com
Listener port number ................ 12101
Database SID ................ TEST
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
ASM ORACLE_HOME ................ /datavg46/test/testdb/10.2.0
ASM SID ................ +ASM
ASM port ................ 12101
ASM user role ................ SYSDBA
ASM username ................ SYS
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 3, 2009 4:57:39 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /datavg46/test/testdb/10.2.0/cfgtoollogs/emca/TEST/emca_2009-03-03_04-54-49-PM.log.
Mar 3, 2009 4:57:41 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Mar 3, 2009 4:57:48 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 3, 2009 4:59:38 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Mar 3, 2009 4:59:39 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://misdev11.dev.chinamobile.com:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 3, 2009 4:59:39 PM
之后再把console起来
$misdev11@oratest:/home/oratest >emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://misdev11.dev.chinamobile.com:1158/em/console/aboutApplication
Agent Version : 10.1.0.4.1
OMS Version : 10.1.0.4.0
Protocol Version : 10.1.0.2.0
Agent Home : /datavg46/test/testdb/10.2.0/misdev11.dev.chinamobile.com_TEST
Agent binaries : /datavg46/test/testdb/10.2.0
Agent Process ID : 2408580
Parent Process ID : 4202832
Agent URL : http://misdev11.dev.chinamobile.com:3938/emd/main
Started at : 2009-03-03 16:59:33
Started by user : oratest
Last Reload : 2009-03-03 16:59:33
Last successful upload : 2009-03-03 17:00:08
Last attempted upload : 2009-03-03 17:00:58
Total Megabytes of XML files uploaded so far : 2.62
Number of XML files pending upload : 1
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 98.83%
Agent is already started. Will restart the agent
Stopping agent ... stopped.
Starting Oracle Enterprise Manager 10g Database Control ................... started.
------------------------------------------------------------------
Logs are generated in directory /datavg46/test/testdb/10.2.0/misdev11.dev.chinamobile.com_TEST/sysman/log
然后再进入 http://10.1.16.149: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服务,察看服务状态等。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13561774/viewspace-559824/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13561774/viewspace-559824/