oracle emctl 报错

本文详细介绍了Oracle10G EM采用web方式的配置过程,包括如何创建单数据的dbcontrol,配置步骤及常见命令使用。同时,提供了删除dbcontrol配置的方法和常用命令语法,帮助用户轻松管理数据库。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

emctl[@more@]

Oracle10GEM采用了web方式,并且分成了2个产品,database controlgrid control。这里主要介绍如何创建单数据的dbcontrolGrid control需要下载单独的光盘安装

在用DBCA建库的时候,可以选择是否启用dbcontrol,启用的话需要在数据库中建立一个sysmanschema,用于保存EM的一些数据,这个就是EM的资料库(repository)

使用命令行工具emca可以创建,修改,重建或者删除dbcontrol的配置。

SQL> select * from v$version;

BANNER

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

PL/SQL Release 10.2.0.1.0 - Production

CORE 10.2.0.1.0 Production

TNS for Linux: Version 10.2.0.1.0 - Production

NLSRTL Version 10.2.0.1.0 - Production

SQL>

由于要在数据库中建EM资料库,数据库和监听都必须已经启动并正常工作。

配置dbcontrol

[oracle@oracle10 ~]$ emca -config dbcontrol db

STARTED EMCA at Oct 27, 2007 9:33:48 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

Database Control is already configured for the database orcl

You have chosen to configure Database Control for managing the database orcl

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/oracle/product/10.2.0/Database

Database hostname ................ oracle10

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

Oct 27, 2007 9:35:12 AM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /opt/oracle/product/10.2.0/Database/cfgtoollogs/emca/orcl/emca_2007-10-27_09-33-46-AM.log.

Oct 27, 2007 9:35:33 AM oracle.sysman.emcp.util.DBControlUtil stopOMS

INFO: Stopping Database Control (this may take a while) ...

Oct 27, 2007 9:36:39 AM oracle.sysman.emcp.ParamsManager getLocalListener

WARNING: Error retrieving listener for oracle10

Oct 27, 2007 9:36:54 AM oracle.sysman.emcp.util.DBControlUtil startOMS

INFO: Starting Database Control (this may take a while) ...

Oct 27, 2007 9:39:51 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: Database Control started successfully

Oct 27, 2007 9:39:53 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: >>>>>>>>>>> The Database Control URL ishttp://oracle10:5500/em<<<<<<<<<<<

Enterprise Manager configuration completed successfully

FINISHED EMCA at Oct 27, 2007 9:39:53 AM

[oracle@oracle10 ~]$

删除数据库的Database Control配置

[oracle@oracle10 ~]$ emca -deconfig dbcontrol db

STARTED EMCA at Oct 27, 2007 10:44:24 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

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

Oct 27, 2007 10:44:47 AM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /opt/oracle/product/10.2.0/Database/cfgtoollogs/emca/orcl/emca_2007-10-27_10-44-22-AM.log.

Oct 27, 2007 10:44:52 AM oracle.sysman.emcp.util.DBControlUtil stopOMS

INFO: Stopping Database Control (this may take a while) ...

Oct 27, 2007 10:48:13 AM oracle.sysman.emcp.EMReposConfig stopDBMSJobs

WARNING: Error initializing SQL connection. SQL operations cannot be performed

Oct 27, 2007 10:48:13 AM oracle.sysman.emcp.EMReposConfig invoke

WARNING: Unable to remove DBMS jobs.

Enterprise Manager configuration completed successfully

FINISHED EMCA at Oct 27, 2007 10:51:01 AM

[oracle@oracle10 ~]$

此时运行emctl命令的显示是:

[oracle@oracle10 ~]$ emctl status dbconsole

TZ set to PRC

OC4J Configuration issue. /opt/oracle/product/10.2.0/Database/oc4j/j2ee/OC4J_DBConsole_oracle10_orcl not found.

常用的命令语法:

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

emctl start console启动EM console服务,使用前需要先设置ORACLE_SID环境变量

emctl stop console停止EM console服务,使用前需要先设置ORACLE_SID环境变量

注:通过查看$ORACLE_HOME/install/portlist.ini文件可以知道当前dbcontrol正在使用的端口,默认dbcontrol http端口1158agent端口3938。如果要重新配置端口,可以使用如下命令:

emca -reconfig ports -dbcontrol_http_port 1159

emca -reconfig ports -agent_port 3939

使用命令行工具emctl可以启动/停止console服务,察看服务状态等。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/309902/viewspace-1055183/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/309902/viewspace-1055183/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值