oracle 11g配置EM时遇到的问题及解决
时间:2014-02-21 12:02:45 作者:beebol 标签: 分类: Oracle
1、首先是在执行emctl start dbconsole时报错,提示ORACLE_UNQNAME没有配置。
#在~/.bash_profile中填入如下语句,然后重新登录oracle用户export ORACLE_UNQNAME=orcl export ORACLE_UNQNAME=orcl
2、配置好ORACLE_UNQNAME,再次启动还是不行
[oracle@oracle ~]$emctl start dbconsoleEM Configuration issue. /u01/app/oracle/product/11.1.0/db_1/eg7116_RDBD1 not found. EM Configuration issue. /u01/app/oracle/product/11.1.0/db_1/eg7116_RDBD1 not found.
3、看到Configuration issue,忘记是不是配置过em了
[oracle@oracle ~]$ emca -config dbcontrol db -repos create ... SEVERE: Error creating the repository .... [oracle@oracle ~]$cat /home/u01/app/cfgtoollogs/emca/orcl/emca_2014_02_21_09_56_03.log CONFIG: ORA-20001: SYSMAN already exists.. ORA-06512: at line 17 oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-20001: SYSMAN already exists..ORA-06512: at line 17 ORA-06512: at line 17
4、看到错误提示,然后查看日志显示,sysman用户已经存在,难道已经配置了。我在网上找了资料把sysman 用户删除掉就可以了。
SYS@hzh> drop user sysman cascade; User dropped. SYS@hzh> drop role MGMT_USER; Role dropped. SYS@hzh> drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;Synonym dropped. Synonym dropped.
我就不那么做了,重新创建也不久,很快的。。。
[oracle@oracle ~]$ emca -config dbcontrol db -repos recreate STARTED EMCA at Feb 21, 2014 9:56:03 AM 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 Listener port number: 1521 Listener ORACLE_HOME [ /home/u01/app/oracle/product/11.2.0/dbhome_1 ]: Password for SYS user: Password for DBSNMP user: Password for SYSMAN user: ....... Enterprise Manager configuration completed successfullyFINISHED EMCA at Feb 21, 2014 10:18:05 AM FINISHED EMCA at Feb 21, 2014 10:18:05 AM
recreate就可以了,现在可以访问了,看监听已经起来了
[oracle@oracle ~]$ netstat -tanlp | grep 1158tcp 0 0 0.0.0.0:1158 0.0.0.0:* LISTEN 20684/java tcp 0 0 0.0.0.0:1158 0.0.0.0:* LISTEN 20684/java