文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

emctl start dbconsole遇到错误:OC4J_DBConsole_XXX _XXX not found.

2024-04-02 19:55

关注


       想启动Oracle的OEM服务,运行emctl start dbconsole,结果出现如下报错信息:
       /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_wjq.comsys.com_OraDB11g not found。要想打开OEM的web管理程序,必须先启动Database listener,再启动Datebase Control端口监控程序,但是碰到下面的问题:


[oracle@wjq ~]$ emctl start dbconsole

OC4J Configuration issue. /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_wjq.comsys.com_OraDB11g not found.


其实产生的这样的情况,可能是em资料库配置不正确或者是dbcotrol没有配置好。


解决方法:   

①重建em资料

[oracle@wjq ~]$ emca -repos recreate 


STARTED EMCA at Nov 3, 2017 4:35:17 PM

EM Configuration Assistant, Version 11.2.0.3.0 Production

Copyright (c) 2003, 2011, Oracle.  All rights reserved.


Enter the following information:

Database SID: seiang11g

Listener port number: 1521

Password for SYS user: 

Password for SYSMAN user: 


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

WARNING : While repository is dropped the database will be put in quiesce mode.

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

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

Nov 3, 2017 4:35:34 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/OraDB11g/emca_2017_11_03_16_35_16.log.

Nov 3, 2017 4:35:34 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Dropping the EM repository (this may take a while) ...

Nov 3, 2017 4:36:47 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Nov 3, 2017 4:36:47 PM oracle.sysman.emcp.EMReposConfig createRepository

INFO: Creating the EM repository (this may take a while) ...

Nov 3, 2017 4:40:32 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully created

Enterprise Manager configuration completed successfully

FINISHED EMCA at Nov 3, 2017 4:40:32 PM


②配置dbcontrol

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


STARTED EMCA at Nov 3, 2017 2:29:41 PM

EM Configuration Assistant, Version 11.2.0.3.0 Production

Copyright (c) 2003, 2011, Oracle.  All rights reserved.


Enter the following information:

Database SID: seiang11g

Listener port number: 1521

Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]:

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 ................ /u01/app/oracle/product/11.2.0/dbhome_1


Local hostname ................ wjq.comsys.com

Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1

Listener port number ................ 1521

Database SID ................ seiang11g

Email address for notifications ...............

Outgoing Mail (SMTP) server for notifications ...............


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

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

Nov 3, 2017 2:30:36 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/OraDB11g/emca_2017_11_03_14_29_40.log.

Nov 3, 2017 2:30:39 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository

INFO: Uploading configuration data to EM repository (this may take a while) ...

Nov 3, 2017 2:32:36 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Uploaded configuration data successfully

Nov 3, 2017 2:32:38 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

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

Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.util.PlatformInterface executeCommand

WARNING: Error executing /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -host wjq.comsys.com -sid OraDB11g

Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

WARNING: Error securing Database control.

Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.EMDBPostConfig setWarnMsg

INFO: Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s):


 1) Set the environment variable ORACLE_UNQNAME to Database unique name

 2) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole

 3) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user > 

 4) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user > 

 5) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole


 To secure Em Key, run /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >

Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.util.DBControlUtil startOMS

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

Nov 3, 2017 2:32:58 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: Database Control started successfully

Nov 3, 2017 2:32:58 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: >>>>>>>>>>> The Database Control URL is http://wjq.comsys.com:5500/em <<<<<<<<<<<


Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s):


 1) Set the environment variable ORACLE_UNQNAME to Database unique name

 2) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole

 3) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user > 

 4) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user > 

 5) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole


 To secure Em Key, run /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >


然后直接进入http://wjq.comsys.com:5500/em/,输入账户sys和密码******,选择sysdba权限,就能正常看到基于WEB的EM了。
   
   Oracle11G的EM采用了web方式,并且分成了2个产品,database control和grid control。Grid control需要下载单独的光盘安装。在用DBCA建库的时候,可以选择是否启用dbcontrol,启用的话需要在数据库中建立一个sysman的 schema,用于保存EM的一些数据,这个就是EM的资料库(repository)。使用命令行工具emca可以创建,修改,重建或者删除 dbcontrol的配置。


emca -repos create: 创建新的 Database Control 资料档案库
emca -repos drop: 删除当前的 Database Control 资料档案库
emca -repos recreate: 删除当前的 Database Control 资料档案库并重新创建一个
emca -config dbcontrol db:配置数据库的 Database Control

emca -deconfig dbcontrol db:取消数据库的 Database Control


特别注意:

(1)如果服务器上存在多个数据库,必须在启动Database control之前设置ORACLE_SID环境变量
(2)最好使用静态IP地址来配置服务器



常用的命令语法:

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服务,察看服务状态等。



作者:SEian.G(苦练七十二变,笑对八十一难) 


阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-数据库
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯