我们在使用Oracle时, 可以利用Oracle自带的EM(Enterprise Manager)来更方便的管理我们的数据库。但是有时候我们的em却有时候无法连接,造成这个问题的原因有好多,例如没有正确的配置hostname,或者操作系统的防火墙问题等等。如果出现了问题,我们能否快速的重建em呢?答案是肯定的。我们可以通过Oracle官方文档来参照。但是如果我们对于em里面如此多的配置命令和选项比较头大的时候,你就可以参照此文来重新创建EM。

首先需要设置好环境变量ORACLE_HOSTNAME

  1. export ORACLE_HOSTNAME=testbox.localdomain

然后再执行:

  1. emca -config dbcontrol db -repos recreate

如果这个方法不行的话,你可以手动先drop掉你当前的repo

  1. emca -deconfig dbcontrol db -repos drop

然后再重新创建

  1. emca -config dbcontrol db -repos create

此间过程比较长,大概需要十分钟左右来创建。然后你就可以看到如下提示:

  1. [oracle@testbox j2ee]$ emca -config dbcontrol db -repos create
  2.  
  3. STARTED EMCA at Jul , :: PM
  4. EM Configuration Assistant, Version 11.2.0.3. Production
  5. Copyright (c) , , Oracle. All rights reserved.
  6.  
  7. Enter the following information:
  8. Database SID: erin
  9. Listener ORACLE_HOME [ /u01/app/oracle/product/11.2./db_1 ]:
  10. Password for SYS user:
  11. Password for DBSNMP user:
  12. Password for SYSMAN user:
  13. Email address for notifications (optional):
  14. Outgoing Mail (SMTP) server for notifications (optional):
  15. -----------------------------------------------------------------
  16.  
  17. You have specified the following settings
  18.  
  19. Database ORACLE_HOME ................ /u01/app/oracle/product/11.2./db_1
  20.  
  21. Local hostname ................ testbox.localdomain
  22. Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2./db_1
  23. Listener port number ................
  24. Database SID ................ erin
  25. Email address for notifications ...............
  26. Outgoing Mail (SMTP) server for notifications ...............
  27.  
  28. -----------------------------------------------------------------
  29. Do you wish to continue? [yes(Y)/no(N)]: yes
  30. Jul , :: PM oracle.sysman.emcp.EMConfig perform
  31. INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/erin/emca_2014_07_01_22_50_24.log.
  32. Jul , :: PM oracle.sysman.emcp.EMReposConfig createRepository
  33. INFO: Creating the EM repository (this may take a while) ...
  34.  
  35. Jul , :: PM oracle.sysman.emcp.EMReposConfig invoke
  36. INFO: Repository successfully created
  37. Jul , :: PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
  38. INFO: Uploading configuration data to EM repository (this may take a while) ...
  39.  
  40. Jul , :: PM oracle.sysman.emcp.EMReposConfig invoke
  41. INFO: Uploaded configuration data successfully
  42. Jul , :: PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
  43. INFO: Securing Database Control (this may take a while) ...
  44. Jul , :: PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
  45. INFO: Database Control secured successfully.
  46. Jul , :: PM oracle.sysman.emcp.util.DBControlUtil startOMS
  47. INFO: Starting Database Control (this may take a while) ...
  48. Jul , :: PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
  49. INFO: Database Control started successfully
  50. Jul , :: PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
  51. INFO: >>>>>>>>>>> The Database Control URL is https://testbox.localdomain:5500/em <<<<<<<<<<<
  52. Jul , :: PM oracle.sysman.emcp.EMDBPostConfig invoke
  53. WARNING:
  54. ************************ WARNING ************************
  55.  
  56. Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /u01/app/oracle/product/11.2./db_1/testbox.localdomain_erin/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.
  57.  
  58. ***********************************************************
  59. Enterprise Manager configuration completed successfully
  60. FINISHED EMCA at Jul , :: PM

标注的红色部分就是我们的em的访问地址。

Oracle Enterprise Manager快速重建的更多相关文章

  1. Oracle Enterprise Manager打不开的解决方法

    之前OEM一直可以打开,但今天上班发现打不开了,输入http://localhost:1158/em 提示该网页无法打开. 那么检查一下: cmd进命令行 C:\Documents and Setti ...

  2. Oracle DB 通过 Oracle Enterprise Manager注册要使用的恢复目录

    通过 Oracle Enterprise Manager  注册要使用的恢复目录.  a)  在 EM 中,导航到“Availability > Recovery Catalog Setting ...

  3. Oracle Enterprise Manager Cloud Control 12c R4 安装配置

    准备软件 em12.1.0.4_linux64_V45344-01.zip em12.1.0.4_linux64_V45345-01.zip em12.1.0.4_linux64_V45346-01. ...

  4. 无法远程访问虚拟机中的EM (Oracle Enterprise Manager)

    今天安装EM,因为文件系统采用ASM来控制,后面需要输入一些ASM相关的信息.这个ASMSNMP用户是新建,所以设个密码自己记下就行. Enter the following information: ...

  5. Oracle Enterprise Manager Cloud Control 12c的安装

    这里,我介绍的是Cloud Control 12c的安装.之前的版本叫Grid Control,这也是11g里面的叫法.在我写这篇博客时,Cloud Control 13c已经出来了,这个版本后续我再 ...

  6. 如何利用OEM工具(ORACLE ENTERPRISE MANAGER),增加表空间

  7. Create Oracle Enterprise Manager repository data after restore a database from another server

    1. Set password for SYS in password file: orapwd file=$ORACLE_HOME/dbs/orapw<ORACLE_SID> 2. Dr ...

  8. Oracle Enterprise Manager 11g 输入用户名和口令 点击“登录”按键后没反应,也不报错,是什么原因?

    在tnsnames.ora文件中检查设置好像没什么问题,用sqlplus也可以正常操作orcl 问题找到了,其实可简单,https://localhost:1158/em/console/logon/ ...

  9. 安装Oracle 11G Enterprise Manager工具

    1.登录ORACLE数据库 sqlplus / as sysdba; 2.查询实例名 SQL> select instance_name from v$instance; INSTANCE_NA ...

随机推荐

  1. idea intellij 快捷键(ubuntu版本)

    S + C + T 创建测试类 A + F12 开启终端 C + F12 查看类中的方法属性 ----随时更新,记录快捷方式

  2. php生成table表格

    function getTable($arrTh, $arrTr){ $s = '<table class="tbData">'; $s .= '<tr>' ...

  3. CSS强制图片大小

    相信大家做网页时经常会碰到大分辨率的图片会把表格涨破以致漂亮的网页面目全非,但只要使用以下的CSS语句即可解决. 该CSS的功能是:大于600的图片自动调整为600显示. <style type ...

  4. TFT LCD控制显示总结(硬件概念、初始化相关配置)(转)

    源地址:http://nervfzb.blog.163.com/blog/static/314813992011215105432369/ TFT LCD是嵌入式中比较常用的显示器,S3C2440/S ...

  5. asp.net mvc+EF 递归生成树结构返回json

    0.数据表结构,主要属性有:Id.parentId(父节Id).Text.Url……等等. 1.新建一个树结构MenuModels public class MenuModels { private ...

  6. salt-grains

    自定义grains 的方法 1: 在minion 的配置文件夹 /etc/salt/minion.d  下面包含的配置文件  grains.conf 2: 在salt的安装目录中建立grains 文件 ...

  7. v8 源码获取与build

    最近准备在工作之余研究下v8,下班时间鼓捣了2天,现在终于能下载,能gclient sync了. 刚开始的目的就是跑一个hello world,按照wiki上的例子来: https://github. ...

  8. poj 1819 Disks

    http://poj.org/problem?id=1819 #include <cstdio> #include <cstring> #include <cmath&g ...

  9. kill,killall,top,free,vmstat,iostat,watch命令

    kill命令 Linux 中的kill命令用来终止指定的进程(terminate a process)的运行,是Linux下进程管理的常用命令.通常,终止一个前台进程可以 使用Ctrl+C键,但是,对 ...

  10. 设计模式(七):Adapter 适配器模式 -- 结构型模式

    1. 概述: 接口的改变,是一个需要程序员们必须(虽然很不情愿)接受和处理的普遍问题.程序提供者们修改他们的代码;系统库被修正;各种程序语言以及相关库的发展和进化.  例子1:iphone4,你即可以 ...