环境:Oracle 11.2.0.4 RAC 重建EM

背景:客户之前的EM已经被损坏,需要重建EM

重建EM的方案有很多,其中最简单的方法是:直接使用emca重建,oracle用户下,只需一条命令搞定:

emca -config dbcontrol db -repos recreate -cluster

注意:之前需要先确认是否有正在运行的job:

SQL> select * from DBA_JOBS_RUNNING;

在测试中通过观察数据库的alert日志:

Tue Jan 15 12:10:55 2019
ALTER SYSTEM SET job_queue_processes=0 SCOPE=BOTH SID='*';
...
Tue Jan 15 12:16:50 2019
ALTER SYSTEM SET job_queue_processes=1000 SCOPE=BOTH SID='*';

以及对应emca操作显示的日志:

Jan 15, 2019 12:10:47 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jan 15, 2019 12:16:59 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped

可以看到在删除em资料库的时候,会将job_queue_processes参数修改为0,测试该阶段大概需要6分钟,期间job无法运行(如果期间没有job需要运行,就对业务无影响)。整个过程中,数据库均可以正常连接,特别注意下面这个提示:

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

看到这个警告很唬人,但实际确认,在11.2版本中可以忽略这个警告,因为测试发现,整个过程中数据库都不会置为静默状态,具体参见MOS文档说明:

  • How To Drop, Create And Recreate Database Control (dbconsole) Web Site in Releases 10g and 11g (文档 ID 278100.1)

IMPORTANT: When dropping the repository with EMCA or RepManager on an 11.2 database, this warning will be displayed:

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

This warning can be safely ignored (only on 11.2 databases).

可以看到MOS也说在11.2版本可以忽略这个警告。

重建完成,可以查看EM的状态:

[oracle@db50 ~]$ export ORACLE_UNQNAME=jyzhao
[oracle@db50 ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://db50:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /opt/app/oracle/product/11.2.0/dbhome_1/db50_jyzhao/sysman/log

附:记录一次测试环境中重建EM的完整日志:

[oracle@db50 ~]$ emca -config dbcontrol db -repos recreate -cluster

STARTED EMCA at Jan 15, 2019 10:52:04 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved. Enter the following information:
Database unique name: jyzhao
Service name: jyzhao
Listener port number: 1521
Listener ORACLE_HOME [ /opt/app/11.2.0/grid ]:
Password for SYS user: ra
Password for DBSNMP user:
Password for SYSMAN user:
Cluster name: db-cluster
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
ASM ORACLE_HOME [ /opt/app/11.2.0/grid ]:
ASM port [ 1521 ]:
ASM username [ ASMSNMP ]:
ASM user password:
----------------------------------------------------------------- You have specified the following settings Database ORACLE_HOME ................ /opt/app/oracle/product/11.2.0/dbhome_1 Database instance hostname ................ Listener ORACLE_HOME ................ /opt/app/11.2.0/grid
Listener port number ................ 1521
Cluster name ................ db-cluster
Database unique name ................ jyzhao
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
ASM ORACLE_HOME ................ /opt/app/11.2.0/grid
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP -----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Jan 15, 2019 10:54:03 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/app/oracle/cfgtoollogs/emca/jyzhao/emca_2019_01_15_10_52_04.log.
Jan 15, 2019 10:54:07 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jan 15, 2019 11:00:30 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jan 15, 2019 11:00:31 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jan 15, 2019 11:13:58 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jan 15, 2019 11:14:13 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jan 15, 2019 11:15:45 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jan 15, 2019 11:15:46 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /opt/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_db50_jyzhao to remote nodes ...
Jan 15, 2019 11:15:49 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /opt/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_db52_jyzhao to remote nodes ...
Jan 15, 2019 11:15:55 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /opt/app/oracle/product/11.2.0/dbhome_1/db50_jyzhao to remote nodes ...
Jan 15, 2019 11:15:57 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /opt/app/oracle/product/11.2.0/dbhome_1/db52_jyzhao to remote nodes ...
Jan 15, 2019 11:16:00 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jan 15, 2019 11:16:31 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jan 15, 2019 11:18:30 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jan 15, 2019 11:18:30 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://db50:1158/em <<<<<<<<<<<
Jan 15, 2019 11:18:49 AM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- --------------------- jyzhao db50 db50
jyzhao db52 db50 Jan 15, 2019 11:18:49 AM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING ************************ Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /opt/app/oracle/product/11.2.0/dbhome_1/db50_jyzhao/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost. ***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jan 15, 2019 11:18:49 AM
[oracle@db50 ~]$

Oracle 11.2.0.4 RAC重建EM案例的更多相关文章

  1. Oracle 11.2.0.4 RAC安装最新PSU补丁

    环境:两节点RAC(RHEL 6.4 + GI 11.2.0.4 + Oracle 11.2.0.4) 需求:安装最新PSU补丁11.2.0.4.7 1.下载补丁和最新OPatch 2.检查数据库当前 ...

  2. ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档

    ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档 2015-10-21 12:51 525人阅读 评论(0) 收藏 举报  分类: Oracle RA ...

  3. oracle 11.2.0.4 rac 打补丁

    本次安装pus环境是11.2.0.4 rac,打的patch为11.2.0.4.180717 (Includes Database PSU),gi补丁和数据库补丁一起打 安装最新opatch版本 un ...

  4. oracle 11.2.0.4 rac 修改 ip vip scan ip

    修改前host文件 198.27.73.21 ht-d01 198.27.73.22 ht-d02 198.27.73.25 ht-d01-vip 198.27.73.26 ht-d02-vip 19 ...

  5. ORACLE 11.2.0.4 RAC安装在rhel6上

    . 关闭ipv4防火墙(两个节点): [root@RAC01 ~]# service iptables stop [root@RAC01 ~]# service iptables status ipt ...

  6. Oracle 11g R2(11.2.0.4) RAC 数据文件路径错误解决--ORA-01157 ORA-01110: 数据文件

    Oracle 11g R2(11.2.0.1) RAC  数据文件路径错误解决--ORA-01157 ORA-01110: 数据文件 oracle 11g R2(11.2.0.4) rac--scan ...

  7. 【Oracle】11G 11.2.0.4 RAC环境打补丁

    一.准备工作 1,数据库环境 操作系统版本  : RedHat 7.2 x64   数据库版本    : Oracle 11.2.0.4 x64 RAC    Grid          : 11.2 ...

  8. 【原】Oracle 11.2.0.1 64bit for RHEL6.0 Server x86_64 静默安装

    作者:david_zhang@sh [转载时请以超链接形式标明文章] 链接:http://www.cnblogs.com/david-zhang-index/p/4182469.html 本文适用Or ...

  9. HPDL380G8平台11.2.0.3 RAC实施手册

    HPDL380G8平台11.2.0.3 RAC实施手册   1 前言 此文档详细描述了Oracle 11gR2 数据库在HPDL380G上的安装RAC的检查及安装步骤.文档中#表示root用户执行,$ ...

随机推荐

  1. YAML文件格式_k8s/docker-compose配置文件

    YAML(Yet Another Markup Language),是一个JSON的超集,意味着任何有效JSON文件也都是一个YAML文件.它规则如下: )大小写敏感 )使用缩进表示层级关系,但不支持 ...

  2. win10 Faster-RCNN训练自己数据集遇到的问题集锦 (转)

    题注: 在win10下训练实在是有太多坑了,在此感谢网上的前辈和大神,虽然有的还会把你引向另一个坑~~. 最近,用faster rcnn跑一些自己的数据,数据集为某遥感图像数据集——RSOD,标注格式 ...

  3. 项目中 2个或者多个EF模型 表名称相同会导致生成的实体类 覆盖的解决方法

    场景:  2个数据库, 一个新,一个旧,  把旧的 数据库中的数据,导入到新的数据库中,  使用到了2个 EF实体模型, 新数据库 和 旧数据库中的表,有的名称是相同的 (但是结构是不同的) 旧的数据 ...

  4. Laravel 深入理解路由和URL生成

    原文地址: Laravel 深入理解路由和URL生成 在模板中我们一般不会直接写死url,而是用url助手生成url,本文介绍一下url助手的使用以及遇到的一些比较头疼的问题. 首先,我们创建了一个路 ...

  5. puppet(3) 变量、数据类型、表达式、条件判断语句-if、case、selector、unless

    puppet(4) 变量.数据类型.表达式.条件判断语句-if.case.selector语句 puppet变量: 1.名称必须以$开头:赋值使用=,支持追加赋值+=: 2.每个变量都有两种引用格式: ...

  6. WebStorm 11的安装与激活

    之所以选择WebStorm 11的这个版本主要是因为他的激活比较方便. WebStorm官网上目前已经不是11版本了,这意味着你得通过其他途径下载WebStorm 11(如:度娘). 下载安装完之后, ...

  7. 134、直接拿来用,Android界最火的开源项目

    Android酷炫开源动框架2015-2016双年榜(转载) http://blog.csdn.net/u011200604/article/details/54428128 GitHub上受欢迎的A ...

  8. Bash script set help function

    set -o nounset help() { cat <<- EOF Desc: execute f1x for each case in Codeflaws Usage: ./exec ...

  9. Qt编写自定义控件3-速度仪表盘

    前言 速度仪表盘,写作之初的本意是用来展示当前测试的网速用的,三色圆环+数码管显示当前速度,Qt自带了数码管控件QLCDNumber,直接集成即可,同时还带有动画功能,其实也可以用在汽车+工业领域等, ...

  10. Python学习之解决python下载第三方依赖速度慢的问题

    原因:通过pip命令直接下载,一般下载的资源存放在国外的服务器上,导致下载速度慢.下载过程中报错: 解决方法:通过pip的命令参数,从国内的下载源,国外的替换为国内的镜像,进行目标包的下载: 具体参数 ...