ITPub博客

首页 > 数据库 > Oracle > 重建ORACLE EM

重建ORACLE EM

Oracle 作者:caiyaolq 时间:2013-07-03 14:20:35 0 删除 编辑

背景:准备重新安装EM,在执行 emca -repos drop 时报错如下:

Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=mServer1.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_

NAME=orcl))): ORA-01017: invalid username/password; logon denied (DBD ERROR: OCI

SessionBegin)

解决办法:本机环境rh5.8

1、跳转至如下目录

重建ORACLE <wbr>EM



2、上图标红文件为实例的password文件,若已存在请先删除

3、orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=你的系统密码 entries=5

   密码个人理解就是SYS密码,执行成功后会在当前目录重新生成orapworcl文件

4、重新执行emca -repos drop 命令,卸载EM库,执行结果如下图。

   重建ORACLE <wbr>EM

5、执行 emca -deconfig dbcontrol db ,删除EM配置,执行结果如下图。

   重建ORACLE <wbr>EM
6、执行 emca -repos create 创建EM库,执行结果如下图。

   重建ORACLE <wbr>EM
7、 执行 emca -config dbcontrol db 配置EM,执行结果如下:

   [oracle@mServer1 ~]$ emca -config dbcontrol db

STARTED EMCA at Jul 2, 2013 1:59:19 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: orcl
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: yes
Listener port number: 1521
Listener ORACLE_HOME [ /opt/app/oracle/product/11.2.0/dbhome_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 ................ /opt/app/oracle/product/11.2.0/dbhome_1

Local hostname ................ mServer1.localdomain
Listener ORACLE_HOME ................ /opt/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: yes
Jul 2, 2013 2:00:09 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/app/oracle/cfgtoollogs/emca/orcl/emca_2013_07_02_13_59_18.log.
Jul 2, 2013 2:00:10 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jul 2, 2013 2:00:54 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jul 2, 2013 2:03:33 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jul 2, 2013 2:03:34 PM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for mServer1.localdomain
Jul 2, 2013 2:03:39 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library is already configured.
Jul 2, 2013 2:03:39 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO:  EM_SWLIB_STAGE_LOC (value) will be ignored.
Jul 2, 2013 2:03:39 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Jul 2, 2013 2:08:21 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Jul 2, 2013 2:08:21 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jul 2, 2013 2:09:15 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jul 2, 2013 2:09:15 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 2, 2013 2:14:07 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 2, 2013 2:14:08 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://mServer1.localdomain:1158/em <<<<<<<<<<<
Jul 2, 2013 2:23:11 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: /opt/app/oracle/product/11.2.0/dbhome_1/mServer1.localdomain_orcl/sysman/config/emkey.ora.   Please 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 2, 2013 2:23:11 PM

8、配置EM完成,尝试使用浏览器登陆EM。

PS:Windows环境创建password文件使用如下命令

C:orapwd file=%ORACLE_HOME%databasepwd%ORACLE_SID% password= entries=5



 

<!-- 正文结束 -->

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24143420/viewspace-1115414/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2010-06-24