emctl emca等命令无法使用

[复制链接]
查看11 | 回复3 | 2012-3-8 11:54:00 | 显示全部楼层 |阅读模式
今天客户反映不能使用OEM工具,我想用EMCTL STATUS DBCONSOLE 查看状态结果报如下的错误:
/u01/app/oracle/product/10.2.0/db_1/perl/bin/perl:not found.
咨询客户,他们说曾经变更过ORACLE_HOME,所以导致现在执行emctl ,emca等命令都无法找到现有的环境变量
请问各位大牛,我应该如何设定,才能让emctl找到现有的环境变量啊。。

回复

使用道具 举报

千问 | 2012-3-8 11:54:00 | 显示全部楼层
自己先顶一下,oracle是10.2.0.4.0系统的环境是AIX easdb-szzb 1 6 00F699614C00

回复

使用道具 举报

千问 | 2012-3-8 11:54:00 | 显示全部楼层
在老师的帮助下,我查看了/u02下面是否有关联 /u01里面的目录或文件
于是在“root”用户使用 grep -R '/u01/app' /u02/app/oracle/product/10.2.0/db_1/bin/emctl
返回结果 "/u02/app/oracle/product/10.2.0/db_1/bin/emctl: ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
/u02/app/oracle/product/10.2.0/db_1/bin/emctl:LOCAL_EMDROOT=/u01/app/oracle/product/10.2.0/db_1
/u02/app/oracle/product/10.2.0/db_1/bin/emctl:EM_OC4J_HOME=/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole"
于是在/u02/app/oracle/product/10.2.0/db_1/bin/下修改emctl文件里面的三个参数对应的值,问题得到解决!
但是emctl还是不能用 报“EM Configuration issue. /u02/app/oracle/product/10.2.0/db_1/easdb-szzb.vanke.net.cn_vanke not found.”
请大侠们继续关注!。。


回复

使用道具 举报

千问 | 2012-3-8 11:54:00 | 显示全部楼层
关于一次em库无法使用的处理过程
接到用户报错,说em库无法使用,网页已经无法访问了!
本人登录到oracle用户界面,查看一下em库的状态。
异常1. emctl status dbconsole 居然报错:“/u01/app/oracle/product/10.2.0/db_1/perl/bin/perl:not found.”
查看当前的ORACLE_HOME是在u02下,u01已经没有任何文件了。于是查看/u02目录下有哪些文件关联到/u01下面了。
PS:查看目标的相关权限,如果觉得麻烦就直接用进入到root账户,使用GREP -R
================================================================
****经咨询客户,出现这个错误的原因是因为变更过oracle的安装路径*****
================================================================
[easdb-szzb:root:/] grep -R '/u01/app' /u02/app/oracle/product/10.2.0/db_1/bin/emctl
***************************
/u02/app/oracle/product/10.2.0/db_1/bin/emctl:ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
/u02/app/oracle/product/10.2.0/db_1/bin/emctl:LOCAL_EMDROOT=/u01/app/oracle/product/10.2.0/db_1
/u02/app/oracle/product/10.2.0/db_1/bin/emctl:EM_OC4J_HOME=/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole
****************************************

step 1.=========修改相应的文件的路径后问题得到第一步的解决
******************************************************************
将emctl文件里面的ORACLE_HOME,LOCAL_EMDROOT,EM_OC4J_HOME变量路径修改成/u02路径
******************************************************************

异常2.再次使用 emctl命令 出现以下报错 :
“EM Configuration issue. /u02/app/oracle/product/10.2.0/db_1/easdb-szzb.vanke.net.cn_vanke not found.”
可见emctl命令已经开始寻找真实的oracle_Home了,于是查看db_1下的“easdb-szzb.vanke.net.cn_vanke”是否存在
发现只存在“easdb-szzb.vanke.net.cn_canke” 估计不下心写错了 于是重新命名文件夹
step 2.======cp /u02/app/oracle/product/10.2.0/db_1/easdb-szzb.vanke.net.cn_canke easdb-szzb.vanke.net.cn_vanke
*********emctl status dbconsole出现错误
异常3. “OC4J Configuration issue. /u02/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_easdb-szzb.vanke.net.cn_vanke not found.”
PS:但是此时 emca命令已经可以正常使用了,注意 为了保证所有emca的参数都能使用,再次确认以下文件
$ORACLE_HOME/BIN/EMCA , $ORACLE_HOME/sysman/config的emd.properties和emd.properties.emca的变量设定是否正确
step 3.=========重新配置dbconsole
emca -repos create
STARTED EMCA at Mar 12, 2012 5:43:06 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.All rights reserved.
Enter the following information:
Database SID: [easdb-szzb

racle:/u02/app/oracle/product/10.2.0/db_1/sysman/config] emca -config dbcontrol db
STARTED EMCA at Mar 12, 2012 6:02:18 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.All rights reserved.
Enter the following information:
Database SID: vanke
Listener port number: 1158
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 ................ /u02/app/oracle/product/10.2.0/db_1
Database hostname ................ easdb-szzb.vanke.net.cn
Listener port number ................ 1158
Database SID ................ vanke
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Mar 12, 2012 6:08:05 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u02/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/vanke/emca_2012-03-12_06-02-18-PM.log.
Mar 12, 2012 6:08:14 PM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for easdb-szzb.vanke.net.cn
Mar 12, 2012 6:08:15 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /u02/app/oracle/product/10.2.0/db_1/perl/bin/perl /u02/app/oracle/product/10.2.0/db_1/bin/targetdeploy.pl /u02/app/oracle/product/10.2.0/db_1/easdb-szzb.vanke.net.cn_vanke easdb-szzb.vanke.net.cn vanke
Mar 12, 2012 6:08:15 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error instantiating EM configuration files
Refer to the log file at /u02/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/vanke/emca_2012-03-12_06-02-18-PM.log for more details.
Could not complete the configuration. Refer to the log file at /u02/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/vanke/emca_2012-03-12_06-02-18-PM.log for more details.
step 4: emctl start dbconsole
.......em库已经可以正常启动了。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行