Oracle Enterprise Manager快速重建

本文提供了一种在Oracle中重建EM(Enterprise Manager)的方法。通过设置环境变量ORACLE_HOSTNAME并执行特定命令,您可以轻松地删除旧的EM并创建新的EM。文章详细介绍了整个过程,包括可能出现的提示信息。
摘要由CSDN通过智能技术生成

      我们在使用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 1, 2014 10:50:24 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: erin
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/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.0/db_1

Local hostname ................ testbox.localdomain
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1
Listener port number ................ 1521
Database SID ................ erin
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: yes
Jul 1, 2014 10:50:43 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 1, 2014 10:50:44 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...

Jul 1, 2014 10:55:39 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul 1, 2014 10:55:42 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...

Jul 1, 2014 10:57:43 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jul 1, 2014 10:57:45 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jul 1, 2014 10:58:17 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jul 1, 2014 10:58:17 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 1, 2014 10:58:44 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 1, 2014 10:58:44 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://testbox.localdomain:5500/em <<<<<<<<<<<
Jul 1, 2014 10:58:48 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.0/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 1, 2014 10:58:48 PM

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

转载于:https://www.cnblogs.com/rosegun/p/3819275.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值