这篇文章主要为大家展示了“oracle中em启动失败怎么办”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“oracle中em启动失败怎么办”这篇文章吧。
客户的服务器启动不了em
报错Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
需要做的比对
1,oracle 目录下的TNS 、LSN配置文件hostname
2,linux /etc/hosts 里的hostname
3,oracle 用户下 .bash_profile 或者是 .bashrc
能配置hostname的地方是否都一致
我出现的问题是,用户改动过hostname , oracle 下的.bash_profile 申明的hostanme 和oracle 数据库的不一致所以报错,修改一致
source .bash_profile 可以使用
如果你确认hostname 和 sid 实例名都没有错
那么建议你进行emc重建操作
$ sqlplus / as sysdba
SQL> alter user dbsnmp identified by py123456;
User altered.
SQL> drop role MGMT_USER;
Role dropped.
SQL> drop user MGMT_VIEW cascade;
User dropped.
SQL> drop user sysman cascade;
User dropped.
SQL> drop user sysman cascade;
SQL> drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
Synonym dropped.
SQL> drop public synonym SETEMVIEWUSERCONTEXT;
Synonym dropped.
SQL>quit
$ emca -config dbcontrol db -repos create
进行创建操作
STARTED EMCA at May 26, 2017 10:37:01 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: oracle11
log4j:WARN No appenders could be found for logger (emSDK.config).
log4j:WARN Please initialize the log4j system properly.
Listener port number:
Listener ORACLE_HOME [ ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
WARNING: ORA-00955: name is already used by an existing object--- 告警这个的话是配置没清除干净
使用
$ emca -config dbcontrol db -repos recreate
执行
按步骤操作
最后可以使用em
以上是“oracle中em启动失败怎么办”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!