关于一次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库已经可以正常启动了。。 |