今天一项目要求对数据库进行巡检,在巡检的过程中发现EM不能使用,之前虽然在这个项目上也动过几次手,但没想过要去用EM,用户一直都是用9i下的OEM工具进行数据库管理的。用户在楼下的一家单位看人家用了WEB的EM后感觉不错,希望我顺便弄一下。

之前也在其它项目中弄过,于是大胆的开始做,但做了两次才成功,第一次是集群名录入错了,数据库是别人装的,用了默认的CRS当集群名,而我录成了数据库名,结果是很奇怪,用emctl status dbconsole检查老说EM没启动起来,但实际上又可以登录,但注意到实例那里一个都没显示,但管理页的的表空间管理、用户管理等这些好像又正常。后来怀疑到会不会是集群名录错了,于是又去查怎么查集群名,ocrconfig -showbackup就可以查到,最后的CRS就是集群名。但后面发现端口都被占用了,只好改了端口,改成1159了。

参考资料:http://space.itpub.net/17997/viewspace-616938

详细过程如下

$ ocrconfig -showbackup

acc02     2011/08/04 12:03:01     /oracle/product/10.2.0/crs_1/cdata/crs

acc02     2011/08/04 08:03:01     /oracle/product/10.2.0/crs_1/cdata/crs

acc02     2011/08/04 04:03:01     /oracle/product/10.2.0/crs_1/cdata/crs

acc02     2011/08/02 20:02:59     /oracle/product/10.2.0/crs_1/cdata/crs

acc02     2011/07/27 08:02:52     /oracle/product/10.2.0/crs_1/cdata/crs
$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Aug 4 13:26:27 2011

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

sys@ACC> drop user sysman cascade;

User dropped.

sys@ACC> drop user MGMT_VIEW cascade;

User dropped.

sys@ACC> drop role MGMT_USER;

Role dropped.

sys@ACC> drop public synonym MGMT_TARGET_BLACKOUTS;

Synonym dropped.

sys@ACC> drop public synonym SETEMVIEWUSERCONTEXT;

Synonym dropped.

sys@ACC> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
$ emca -config dbcontrol db -repos create -cluster

STARTED EMCA at Aug 4, 2011 1:28:55 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database unique name: acc
Database Control is already configured for the database acc
You have chosen to configure Database Control for managing the database acc
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
Cluster name: crs
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 ................ /oracle/product/10.2.0/db_1

Database instance hostname ................ acc01
Listener port number ................ 1521
Cluster name ................ crs
Database unique name ................ acc
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Aug 4, 2011 1:29:52 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/acc/emca_2011-08-04_01-28-55-PM.log.
Aug 4, 2011 1:29:53 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5540 is already in use.
Aug 4, 2011 1:29:53 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5520 is already in use.
Aug 4, 2011 1:29:53 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Aug 4, 2011 1:29:53 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Aug 4, 2011 1:30:04 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Aug 4, 2011 1:31:54 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Aug 4, 2011 1:31:58 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_acc01_acc1 to remote nodes ...
Aug 4, 2011 1:31:59 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_acc02_acc2 to remote nodes ...
Aug 4, 2011 1:32:03 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /oracle/product/10.2.0/db_1/acc01_acc1 to remote nodes ...
Aug 4, 2011 1:32:05 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /oracle/product/10.2.0/db_1/acc02_acc2 to remote nodes ...
Aug 4, 2011 1:32:06 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Cannot start Database Control. The following ports are already in use: [EM agent port:3938].
Refer to the log file at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/acc/emca_2011-08-04_01-28-55-PM.log for more details.
Could not complete the configuration. Refer to the log file at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/acc/emca_2011-08-04_01-28-55-PM.log for more details.
$ emctl stop dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0 
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
http://acc01:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...

Cannot determine Oracle Enterprise Manager 10g Database Control process. /oracle/product/10.2.0/db_1/acc01_acc1/emctl.pid does not exist.
$ ps -ef|grep dbconsole | awk ' { print $2} ' | xargs kill -9
kill: 193128: 0509-015 The specified process does not exist.

$ ps -ef|grep emagent (selectively remove the dbconsole's emagent process)
ksh: 0403-057 Syntax error: `(' is not expected.
$ emca -reconfig ports -cluster -DBCONTROL_HTTP_PORT 1159 -AGENT_PORT 3939 -RMI_PORT 5522 -JMS_PORT 5542

STARTED EMCA at Aug 4, 2011 1:35:21 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database unique name: acc

Do you wish to continue? [yes(Y)/no(N)]: y
Aug 4, 2011 1:35:29 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/acc/emca_2011-08-04_01-35-21-PM.log.
Aug 4, 2011 1:35:31 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Aug 4, 2011 1:36:17 PM oracle.sysman.emcp.EMDBCConfig performReconfiguration
INFO: Propagating /oracle/product/10.2.0/db_1/acc01_acc1/sysman/config/emoms.properties,/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_acc01_acc1/config/http-web-site.xml,/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_acc01_acc1/config/rmi.xml,/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_acc01_acc1/config/jms.xml to remote nodes ...
Aug 4, 2011 1:36:18 PM oracle.sysman.emcp.EMDBCConfig performReconfiguration
INFO: Propagating /oracle/product/10.2.0/db_1/acc02_acc2/sysman/config/emoms.properties,/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_acc02_acc2/config/http-web-site.xml,/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_acc02_acc2/config/rmi.xml,/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_acc02_acc2/config/jms.xml to remote nodes ...
Aug 4, 2011 1:36:20 PM oracle.sysman.emcp.EMAgentConfig performReconfiguration
INFO: Propagating /oracle/product/10.2.0/db_1/acc01_acc1/sysman/config/emd.properties to remote nodes ...
Aug 4, 2011 1:36:20 PM oracle.sysman.emcp.EMAgentConfig performReconfiguration
INFO: Propagating /oracle/product/10.2.0/db_1/acc02_acc2/sysman/config/emd.properties to remote nodes ...
Aug 4, 2011 1:36:21 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Aug 4, 2011 1:38:32 PM oracle.sysman.emcp.EMDBPostConfig performReconfiguration
INFO: Database Control started successfully
Aug 4, 2011 1:38:32 PM oracle.sysman.emcp.EMDBPostConfig performReconfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://acc01:1159/em <<<<<<<<<<<
Aug 4, 2011 1:38:32 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
****************  Current Configuration  ****************
INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

acc1              acc01             acc01
acc2              acc02             acc01

Enterprise Manager configuration completed successfully
FINISHED EMCA at Aug 4, 2011 1:38:32 PM
$ emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0 
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
http://acc01:1159/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /oracle/product/10.2.0/db_1/acc01_acc1/sysman/log

转载于:https://blog.51cto.com/rainzl/1139860

在RAC中重建EM(转)相关推荐

  1. oracle rac em cluster name,ORACLE 11G RAC重建EM问题

    前段时间出现了一个问题,就是重启一个RAC节点时突然报恢复区大小不足的问题,查了一下应该没有问题,已经修改为500G了,应该还有200多G的剩余空间的,怎么一下就没了,而且删除了里面不少文件,并且用R ...

  2. Oracle 10G重建EM DB Control.

    Oracle 10G R2重建EM DB Control.如果安装后没有修改过IP地址或机器名字,可以跳过下面1和2两步. 1.drop configuration files and reposit ...

  3. RAC 中GES/GCS原理

    一.RAC的GES/GCS原理(1) 为了保证群集中的实例的同步,两个虚拟服务将被实现:全局排队服务(GES),它负责控制对锁的访问.全局内存服务(GCS),控制对数据块的访问. GES 是 分布式锁 ...

  4. 【RAC】Oracle 11gR2 RAC 中的 Grid Plug and Play(GPnP) 是什么?

    [RAC]Oracle 11gR2 RAC 中的 Grid Plug and Play(GPnP) 是什么? 一. 什么是GPnP? Grid Plug and Play (GPnP):Foundat ...

  5. 为了自动驾驶,谷歌用NeRF在虚拟世界中重建了旧金山市

    来源:机器之心 本文约3100字,建议阅读10+分钟 真不用来做成元宇宙? 训练自动驾驶系统需要高精地图,海量的数据和虚拟环境,每家致力于此方向的科技公司都有自己的方法,Waymo 有自己的自动驾驶出 ...

  6. oracle rac vip什么用,oracle 10g,11g RAC中vip作用

    Why do we have a Virtual IP (VIP) in Oracle RAC 10g or 11g? The goal is application availability. RA ...

  7. Oracle 11G R2 RAC中的scan ip 的用途和基本原理【转】

    Oracle 11G R2 RAC增加了scan ip功能,在11.2之前,client链接数据库的时候要用vip,假如你的cluster有4个节点,那么客户端的tnsnames.ora中就对应有四个 ...

  8. css中单位em和rem

    一.介绍 1.em w3cschool中给出css中尺寸单位如下: 单位 描述 % 百分比 in 英寸 cm 厘米 mm 毫米 em 1em 等于当前的字体尺寸. 2em 等于当前字体尺寸的两倍. 例 ...

  9. rac中 kull session会话脚本

    方法:ALTER SYSTEM KILL SESSION '80, 6, @2';  --<= 80 sid,6 serial#,@2 inst_id kill session 脚本如下: se ...

最新文章

  1. html基础:定义 图片 表格
  2. const volatile同时限定一个类型int a = 10
  3. CentOS 6.4 搭建SVN服务器
  4. MeteoInfoLab脚本示例:Streamline流线图
  5. go 自定义error怎么判断是否相等_Go Web 小技巧(二)GORM 使用自定义类型
  6. mysqldump: Got error: 1016: Can't open file: './xxx.frm' (errno: 24) when using LOCK TABLES
  7. 资中筠 - 百度百科
  8. 01、静态工厂方法替代构造器
  9. 使用web.xml方式加载Spring时,获取Spring context的两种方式
  10. 31.卷1(套接字联网API)---流
  11. ibavformat.so.57: cannot open shared object file: No such file or directory
  12. mysql in和like_mysql-一起使用SQL LIKE和IN
  13. html弹窗复制,js复制弹窗美化
  14. 生动实践现代农业-国稻种芯-泸州江阳:谋定产村深度融合
  15. win7系统获得管理员取得所有权的方法【系统天地】
  16. 绕流运动与附面层基本概念
  17. 【计算机网络基础 七】输入URL到浏览器发生了什么
  18. 【渝粤教育】电大中专混凝土结构题库作业 题库
  19. 微型计算机主要应用于哪些领域,第一代计算机的主要应用领域是什么?
  20. matlab 风资源,自己开发的风资源分析工具包WindAnalysis

热门文章

  1. 【NLP】 NLP专栏栏主自述,说不出口的话就交给AI说吧
  2. 2021年跨境电商市场怎么样?新手商家入驻还有机会吗?
  3. 2022年全球及中国建筑隔震系统行业设施布局与十四五应用决策建议报告
  4. 全球及中国卸妆条行业发展规模与营销前景分析报告2022版
  5. 跨境出海,Tik Tok商业化营销推广分享
  6. C#获取SQLServer数据库表名和字段名
  7. HTTP协议和web工作原理
  8. JAVA-单例模式的几种实现方式
  9. JS实现2,8,10,16进制的相互转换
  10. 渐变色 + 屏幕缩小自动产生滚动条