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

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

export ORACLE_HOSTNAME=testbox.localdomain

然后再执行:

emca -config dbcontrol db -repos recreate

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

emca -deconfig dbcontrol db -repos drop

然后再重新创建

emca -config dbcontrol db -repos create

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

[oracle@testbox j2ee]$ emca -config dbcontrol db -repos create

STARTED EMCA at Jul ,  :: PM
EM Configuration Assistant, Version 11.2.0.3. Production
Copyright (c) , , Oracle. All rights reserved. Enter the following information:
Database SID: erin
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2./db_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./db_1 Local hostname ................ testbox.localdomain
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2./db_1
Listener port number ................
Database SID ................ erin
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ............... -----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: yes
Jul , :: PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/erin/emca_2014_07_01_22_50_24.log.
Jul , :: PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ... Jul , :: PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul , :: PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ... Jul , :: PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jul , :: PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jul , :: PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jul , :: PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul , :: PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul , :: PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://testbox.localdomain:5500/em <<<<<<<<<<<
Jul , :: PM 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: /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. ***********************************************************
Enterprise Manager configuration completed successfully
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. display:inline,display:inline-block,display:block 区别

    之前一直迷惑于display:inline/inline-block/block的异同,在度娘谷哥的帮助下,突然有了一点思路. 按照网上的介绍,inline将对象转化为内联元素,block将对象转化为 ...

  2. ie6,7下js动态加载图片不显示错误

    ie6,7下js动态加载图片不显示错误 先描述一下出现这种匪夷所思bug的背景: 我在页面加载的时候加载一堆小缩略图,<a href="javascript:void(0);" ...

  3. 网易JS面试题与Javascript词法作用域说明

    调用对象位于作用域链的前端,局部变量(在函数内部用var声明的变量).函数参数及Arguments对象都在函数内的作用域中--这意味着它们隐藏了作用域链更上层的任何同名的属性. 2010年9月14日, ...

  4. Win7下Solr4.10.1和IK Analyzer中文分词

    1.下载IK中文分词压缩包IK Analyzer 2012FF_hf1,并解压到D:\IK Analyzer 2012FF_hf1: 2.将D:\IK Analyzer 2012FF_hf1\IKAn ...

  5. 用GOACCESS分析NGINX日志

    参考URL: http://4b3r.com/goaccess-analyze-nginx-access-log/64/ http://jesuspan.sinaapp.com/crontab%E6% ...

  6. C++代码覆盖率工具Coverage Validator

    市面上的C++代码覆盖率工具大都收费,Coverage Validator也不例外.Coverage Validator应该少有人听过,我也是在stackoverflow里听别人介绍的.所以下载了试用 ...

  7. TCP 协议

    == 已经了解了以太网和IP了,下面我们进入传输层,开始讲解TCP协议. == 仍然先把TCP报文段的格式放在这里,然后我们看图说话: TCP报文段也分为首部和数据两部分,首部默认情况下一般是20字节 ...

  8. rsyslog 一重启就会开始同步之前所有通配的日志文件

    <pre name="code" class="html">[root@dr-mysql01 zjzc_log]# grep '24/Sep/201 ...

  9. 通过JS触发TextBox的ontextchanged事件,并获取TextBox所在GridView的那一行

    protected void txtInsNum_TextChanged(object sender, EventArgs e) { TextBox t = (TextBox)sender; Grid ...

  10. 使用 PIVOT 和 UNPIVOT 行转列 列转行 报表统计 函数

    官方文档:http://technet.microsoft.com/zh-cn/library/ms177410(v=SQL.105).aspx 可以使用 PIVOT 和 UNPIVOT 关系运算符将 ...