环境: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. 解决java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.robolectric.annotation.Config.application()

    Deleting the .gradle folder worked for me too. Odd. Guessing some high level caching going on somewh ...

  2. replay的意义

    数据库重放: () 在测试环境中重新创建实际的生产数据库工作量. () 在生产中实施更改之前,确定和分析潜在的不稳定性. () 捕获生产中的工作量:

  3. Win7 vs2017 WDK 1803 1809 驱动开发 出错 KMDF

    一.编译出错, 1. 包含头文件出错 解决方案: 需要下载1803 的wdk  最新的1809会出一堆错误 安装程序显示是10.0.17134.1安装完成后是10.0.17134.0 2. Inf2C ...

  4. Android实现夜间模式

    如今非常多App都有夜间模式,特别是阅读类的App.夜间模式如今已经是阅读类App的标配了,其实,日间模式与夜间模式就是给App定义并应用两套不同颜色的主题,用户能够自己主动或者手动的开启,今天用An ...

  5. node-log4js3.0.6配置

    const log4js = require('log4js'); const conf = { "appenders": { "access": { &quo ...

  6. UNION ALL的用法

    " ?> -mapper.dtd" > <mapper namespace="com.j1.soa.resource.order.oracle.dao. ...

  7. Python的安装以及编译器的安装

    首先要想写python语言,要安装并配置python的环境,点击python下载即可,当然需要看下自己电脑适合下载的版本,64位还是32位的即可. 安装一般情况安装在C盘即可,选择添加变量的配置,完成 ...

  8. 大整数加减运算的C语言实现

    目录 大整数加减运算的C语言实现 一. 问题提出 二. 代码实现 三. 效果验证 大整数加减运算的C语言实现 标签: 大整数加减 C 一. 问题提出 培训老师给出一个题目:用C语言实现一个大整数计算器 ...

  9. [Benchmark] Codeflaws: A Programming Competition Benchmark for Evaluating Automated Program Repair Tools

    Basic Information Publication: ICSE'17 Authors: Shin Hwei Tan, Jooyong Yi, Yulis, Sergey Mechtaev, A ...

  10. HTTP 请求头 WIKI 地址

    https://en.wikipedia.org/wiki/List_of_HTTP_header_fields