windows oracle EM的安装配置

本文档记录了在Windows系统上安装Oracle 11.2.0.1.0数据库后,如何手动配置并安装Enterprise Manager (EM)。在配置过程中,遇到了无法确定本地主机的错误,通过设置ORACLE_HOSTNAME和ORACLE_UNQNAME环境变量解决了问题。通过`emca`命令进行了删除原有配置、创建新的EM资料档案库和启动相关服务的步骤。最后,通过`emctl status agent`确认Agent运行状态,并在必要时使用`emctl reload agent`重新加载Agent,确保EM正常运行。

windows系统安装 oracle 11.2.0.1.0,没有安装EM,现在需要手动安装EM

参考:Understand the ORACLE_UNIQUENAME

-----------------执行  emctl status agent时,报如下错误----------------

Unable to determine local host from URL REPOSITORY_URL=http://localhost:%EM_UPLOAD_PORT%/em/upload/

C:\Users\Administrator>set ORACLE_HOSTNAME=localhost

C:\Users\Administrator>set ORACLE_UNQNAME=orcl

-------------------以下为试错信息-----------------

C:\Users\Administrator>emctl status dbconsole
Unable to determine local host from URL REPOSITORY_URL=http://localhost:%EM_UPLOAD_PORT%/em/upload/
 

---------------删除系统中原有配置--------------------------------------

C:\Users\Administrator>emca -deconfig dbcontrol db -repos drop

EMCA 开始于 2023-5-22 22:58:42
EM Configuration Assistant, 11.2.0.0.2 正式版
版权所有 (c) 2003, 2005, Oracle。保留所有权利。

输入以下信息:
数据库 SID: ORCL
监听程序端口号: 1521
SYS 用户的口令:
SYSMAN 用户的口令:

是否继续? [是(Y)/否(N)]: Y
2023-5-22 22:59:02 oracle.sysman.emcp.EMConfig perform
信息: 正在将此操作记录到 D:\app\Administrator\cfgtoollogs\emca\orcl\emca_2023_05_22_22_58_42.log。
2023-5-22 22:59:02 oracle.sysman.emcp.util.DBControlUtil stopOMS
信息: 正在停止 Database Control (此操作可能需要一段时间)...
2023-5-22 22:59:33 oracle.sysman.emcp.EMReposConfig invoke
信息: 正在删除 EM 资料档案库 (此操作可能需要一段时间)...
2023-5-22 23:00:01 oracle.sysman.emcp.EMReposConfig invoke
信息: 已成功删除资料档案库
已成功完成 Enterprise Manager 的配置
EMCA 结束于 2023-5-22 23:00:03

-------------------重建EM-----------------------------------------------------

C:\Users\Administrator>emca -config dbcontrol db -repos create

EMCA 开始于 2023-5-22 23:00:24
EM Configuration Assistant, 11.2.0.0.2 正式版
版权所有 (c) 2003, 2005, Oracle。保留所有权利。

输入以下信息:
数据库 SID: ORCL
监听程序端口号: 1521
监听程序 ORACLE_HOME [ D:\app\Administrator\product\11.2.0\dbhome_1 ]:
SYS 用户的口令:
DBSNMP 用户的口令:
SYSMAN 用户的口令:
通知的电子邮件地址 (可选):
通知的发件 (SMTP) 服务器 (可选):
-----------------------------------------------------------------

已指定以下设置

数据库 ORACLE_HOME ................ D:\app\Administrator\product\11.2.0\dbhome_1

本地主机名 ................ localhost
监听程序 ORACLE_HOME ................ D:\app\Administrator\product\11.2.0\dbhome_1
监听程序端口号 ................ 1521
数据库 SID ................ ORCL
通知的电子邮件地址 ...............
通知的发件 (SMTP) 服务器 ...............

-----------------------------------------------------------------
是否继续? [是(Y)/否(N)]: Y
2023-5-22 23:00:53 oracle.sysman.emcp.EMConfig perform
信息: 正在将此操作记录到 D:\app\Administrator\cfgtoollogs\emca\orcl\emca_2023_05_22_23_00_23.log。
2023-5-22 23:00:54 oracle.sysman.emcp.EMReposConfig createRepository
信息: 正在创建 EM 资料档案库 (此操作可能需要一段时间)...
2023-5-22 23:02:15 oracle.sysman.emcp.EMReposConfig invoke
信息: 已成功创建资料档案库
2023-5-22 23:02:18 oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
信息: 正在将配置数据上载到 EM 资料档案库 (此操作可能需要一段时间)...
2023-5-22 23:02:31 oracle.sysman.emcp.EMReposConfig invoke
信息: 已成功上载配置数据
2023-5-22 23:02:52 oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
信息: 软件库已配置成功。
2023-5-22 23:02:52 oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
信息: 正在部署预配档案...
2023-5-22 23:03:06 oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
信息: 预配档案部署成功。
2023-5-22 23:03:06 oracle.sysman.emcp.util.DBControlUtil secureDBConsole
信息: 正在保护 Database Control (此操作可能需要一段时间)...
2023-5-22 23:03:11 oracle.sysman.emcp.util.DBControlUtil secureDBConsole
信息: 已成功保护 Database Control。
2023-5-22 23:03:11 oracle.sysman.emcp.util.DBControlUtil startOMS
信息: 正在启动 Database Control (此操作可能需要一段时间)...
2023-5-22 23:03:57 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: 已成功启动 Database Control
2023-5-22 23:03:57 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: >>>>>>>>>>> Database Control URL 为 https://localhost:1158/em <<<<<<<<<<<
2023-5-22 23:03:59 oracle.sysman.emcp.EMDBPostConfig invoke
警告:
************************  WARNING  ************************

管理资料档案库已置于安全模式下, 在此模式下将对 Enterprise Manager 数据进行加密。加密密钥已放置在文件 D:/app/Administrator/product/11.2.0/dbhome_1/localhost_orcl/sysman/config/emkey.ora 中。请务必备份此文件, 因为如果此文件丢失, 则加密数据将 不可用。

***********************************************************
已成功完成 Enterprise Manager 的配置
EMCA 结束于 2023-5-22 23:03:59

-----------------------此时仍有问题,不能使用EM,先关闭再重新开启服务。------------------------------

-----------------------停止服务--------------------------

C:\Users\Administrator>emctl stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://localhost:1158/em/console/aboutApplication
OracleDBConsoleorcl 服务正在停止.........
OracleDBConsoleorcl 服务已成功停止。

-----------------------启动服务--------------------------

C:\Users\Administrator>emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://localhost:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ...OracleDBConsoleorcl 服务正在启动 ...............
OracleDBConsoleorcl 服务已经启动成功。

-------------------------------启动EM--------------------------------------------


C:\Users\Administrator>emctl status agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.4.2
OMS Version       : 10.2.0.4.2
Protocol Version  : 10.2.0.4.2
Agent Home        : D:\app\Administrator\product\11.2.0\dbhome_1\localhost_orcl
Agent binaries    : D:\app\Administrator\product\11.2.0\dbhome_1
Agent Process ID  : 18764
Agent URL         : https://localhost:3938/emd/main
Repository URL    : https://localhost:1158/em/upload/
Started at        : 2023-05-22 23:08:10
Started by user   : SYSTEM
Last Reload       : 2023-05-22 23:08:10
Last successful upload                       : 2023-05-22 23:08:53
Total Megabytes of XML files uploaded so far :     0.26
Number of XML files pending upload           :        3
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    23.85%
Data channel upload directory                : D:/app/Administrator/product/11.2.0/dbhome_1/localhost_orcl/sysman/recv
Last successful heartbeat to OMS             : 2023-05-22 23:08:22
---------------------------------------------------------------
Agent is Running and Ready

-----------------------------------倘若仍不能登录,reload agent----------------------------------------

C:\Users\Administrator>emctl reload agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD reload completed successfully

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值