接下来配置EM:
Emca –config dbcontrol db
看日志缺少oracle_hostname sys_pwd 添加也还是出错:
运行emca -config dbcontrol db -host lxy-pc -sys_pwd oracle出现:
2012-4-24 11:25:27 oracle.sysman.emcp.util.FileUtil setAttr
严重: 写入文件 c:\oracle\product\10.2.0\db_2\oc4j\j2ee\OC4J
ver.xml 时出错
2012-4-24 11:25:27 oracle.sysman.emcp.EMConfig perform
严重: 实例化 OC4J 配置文件时出错
进一步查看日志发现下列信息:
警告: 执行 CMD /C c:\oracle\product\10.2.0\db_2\bin\emctl.bat deploy dbconsole c
:\oracle\product\10.2.0\db_2\lxy-pc_ora10g lxy-pc:3938 lxy-pc ora10g 时出错
2012-4-24 11:26:41 oracle.sysman.emcp.EMConfig perform
严重: 实例化 EM 配置文件时出错
把该句话拿出来单独执行,看其错误信息:
emctl.bat deploy dbconsole c:\oracle\product\10.2.0\db_2\lxy-pc_ora10g lxy-pc:3938 lxy-pc ora10g
查询LOG文件中:
2012-4-25 8:52:31 oracle.sysman.emcp.EMAgentConfig instantiateEMConfigFiles
配置: Failed to deploy state dirs
2012-4-25 8:52:31 oracle.sysman.emcp.EMConfig perform
严重: 实例化 EM 配置文件时出错
警告: 执行 CMD /C c:\oracle\product\10.2.0\db_2\bin\
emctl.bat deploy dbconsole c:\oracle\product\10.2.0\db_2\lxy-pc_ora10g lxy-pc:3938 lxy-pc ora10g 时出错
Creating directories...
Unable to create c:\oracle\product\10.2.0\db_2\lxy-pc_ora10g: Permission denied
或者:
Setting log and trace files locations for Console ...
Setting log and trace files locations for Agent ...
OpenSCManager FAILED: 拒绝访问。
Service creation failed. Aborting...
不能创建目录,联想到windows 7下面目录的保护,猜想还是目录的权限问题,于是更改oracle下cfgtoollogs sysman 等相应目录权限,不知道这个权限需要什么,我已经可以在此建立子目录了,但还是执行出错。最后只好以管理员身份运行cmd:
C:\Windows\system32>emctl.bat deploy dbconsole c:\oracle\product\10.2.0\db_2\lxy
-pc_ora10g lxy-pc:3938 lxy-pc ora10g
Creating shared install...
Source location: c:\oracle\product\10.2.0\db_2
Destination (shared install) : c:\oracle\product\10.2.0\db_2\lxy-pc_ora10g
DeployMode : dbconsole
Creating directories...
Setting console properties ...
Setting log and trace files locations for Console ...
Setting log and trace files locations for Agent ...
Service "OracleDBConsoleora10g" create SUCCESS
Depoly命令终于成功!
未完待续.......
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7177735/viewspace-722448/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7177735/viewspace-722448/
本文详细记录了一次在配置Oracle Enterprise Manager (EM) 过程中遇到的权限问题及其解决方法,包括日志分析、权限调整以及最终使用管理员身份运行命令的成功经验。

被折叠的 条评论
为什么被折叠?



