EMCA创建em资料库时报错
说明:监听程序配置及启动正常。实例运行正常,远程或是本地sqlplus连接实例也正常。主机名显示正常,与主机名相关三个配置文件也没问题。
emca报错:
[oracle@rusky-oracle11g admin]$ emca -config dbcontrol db STARTED EMCA at Apr 2, 2015 9:27:10 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
log4j:ERROR No appenders could be found for category (emSDK.config). (报错1)
log4j:ERROR Please initialize the log4j system properly.
Listener port number: ……
Do you wish to continue? [yes(Y)/no(N)]: yes
Apr 2, 2015 9:42:48 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_34_33.log.
Apr 2, 2015 9:42:49 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_34_33.log for more details.
Could not complete the configuration. Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_34_33.log for more details. (报错2)
[oracle@rusky-oracle11g admin]$
详细错误日志如下:
/u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_22_12.log
CONFIG: ORA-12545: Connect failed because target host or object does not exist
oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-12545: Connect failed because target host or object does not exist
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1650)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeSql(SQLEngine.java:1898)
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3230)
at oracle.sysman.emcp.EMReposConfig.unlockMGMTAccount(EMReposConfig.java:1000)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:345)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Apr 2, 2015 9:22:30 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_22_12.log for more details.
Apr 2, 2015 9:22:30 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3245)
at oracle.sysman.emcp.EMReposConfig.unlockMGMTAccount(EMReposConfig.java:1000)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:345)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Apr 2, 2015 9:22:30 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0.1/db_1/oui
从错误日志可看出,应该是跟target host和listener相关。
解决办法:
[root@rusky-oracle11g ~]# cat /etc/hosts 该文件配置错误
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost --此处写错,原来为localhost.domain
192.168.1.203 rusky-oracle11g.com rusky-oracle11g
手动注册监听: SQL> conn sys/sys as sysdba Connected. SQL> alter system register; System altered
重新创建EMCA资料库:(未出现错误1)
[oracle@rusky-oracle11g admin]$ emca -config dbcontrol db STARTED EMCA at Apr 2, 2015 9:34:33 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:
……
出现错误2:
oracle.sysman.emcp.exception.EMConfigException: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3245)
at oracle.sysman.emcp.EMReposConfig.unlockMGMTAccount(EMReposConfig.java:1000)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:345)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Apr 2, 2015 9:22:30 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0.1/db_1/oui
==================
各种折腾,还是报同样的错, 后来也出现上面的错误1,因此可推断错误1跟/etc/hosts没关系。
在dbca下重新配置emca也报错:
使用命令再次创建时也报错:
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_22_12.log for more details.根据上多次出现的该提示,找到文件中的如下错误:

No value was set for the parameter ORACLE_HOME.
ORA-12545:connect failed because target host or object does not exist.
每次都提示错误目标主机ORACLE_HOSTNAEM, rusky-oel.com不正确或不存在。我配置的正确的主机名为rusky-oracle11g.com。
/home/oracle/.bash_profile 最后发现该文件内ORACLE_HOSTNAME配置有错,修改为正确的rusky-oracle11g.com后,重新配置emca正常。
ORACLE_HOSTNAME=rusky-oel.com; export ORACLE_HOSTNAME
好坑爹的错误,折腾了两天。
EMCA创建em资料库时报错的更多相关文章
- 创建Maven Module时报错:The parent project must have a packaging type of POM
创建Maven Module时报错:The parent project must have a packaging type of POM 解决的办法,是把父项目的Packaging改成pom:
- 终端创建scrapy项目时报错(转)
在终端创建scrapy项目时报错 PS D:\scrapy_project> scrapy startproject fangFatal error in launcher: Unable to ...
- 使用Eclipse自带的Maven插件创建Web项目时报错:
问题描述: 使用Eclipse自带的Maven插件创建Web项目时报错: Could not resolve archetype org.apache.maven.archetypes:maven-a ...
- 如何解决git创建密匙时报错Too many arguments
如题:git创建密匙时报错Too many arguments. 前几天我遇见了一个问题,git需要重新创建密匙,运行命令ssh-keygen -t rsa -b 4096 -C " you ...
- CoreData手动创建托管对象子类时报错
1.具体问题 手动创建CoreData,在进行创建托管对象子类时出现报错如图: 2.解决方法 当使用CoreData时,Xcode自动管理实体类,文件都放在Derived Data文件夹中: 所以不需 ...
- 创建jsp文件时报错,"javax.servlet.http.HttpServlet" was not found on the Java)
原因: 创建jsp文件的步骤如下: 出现"javax.servlet.http.HttpServlet" was not found on the Java) 报错信息就是因为没有 ...
- 创建DB2数据库时报错--SQL1052N 数据库路径不存在(Windows)(转载)
用DB2 v9.7新建数据库的时候,默认路径为:D:\ 把缺省路径“写的是D:\XXX(此目录存在),新建时提示如下:SQL1052N 数据库路径 "D:\XXX" 不存在.如下: ...
- 一个模型中有两个外键指向同一张表时,创建迁移模型时报错:“ HINT: Add or change a related_name argument to the definition for 'AnswersModel.author' or 'AnswersModel.relay_to'.”解决方案
class AnswersModel(models.Model): author = models.ForeignKey(FrontUserModel,null=True,related_name=' ...
- myeclipse10安装了activiti插件后创建BPMN 文件时报错,
以上错误需要,下载一个补丁. 补丁地址:http://www.shareyx.com/blog/2 补丁的安装可以参考: http://jingyan.baidu.com/article/dca1fa ...
随机推荐
- Nginx PHP MySql 编译安装
以CentOS5.6为平台编译安装.确保系统已经安装gcc/gcc-c++编译器! 1.Nginx-1.0.14 2.PHP-5.3.10 3.MySql-5.1.61 安装相关依赖开发库: auto ...
- java一个简单的管理系统
用java实现的简单管理系统 运行出来的状态 实现了新增.删除.借出.归还.排行榜简单的功能! 下面是简单的代码 首先定义一个书籍类,自己打开哦! public class Book implemen ...
- Handshakes(思维) 2016(暴力)
Handshakes Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Submit Sta ...
- linux中curl命令
linux curl是一个利用URL规则在命令行下工作的文件传输工具.它支持文件的上传和下载,所以是综合传输工具,但按传统,习惯称url为下载工具. 一,curl命令参数,有好多我没有用过,也不知道翻 ...
- javascript模式——Flyweight
Flyweight是一种共享数据内存的模式. Flyweight模式是将一些公有属性从个人中剔除,放在共享的对象当中. 下面以一个项目实例,通过不断的改进,以显示Flyweight模式的优点. 现在我 ...
- android一些常用的代码2(收藏)
1.收集设备信息,用于信息统计分析 public static Properties collectDeviceInfo(Context context) { Properties mDeviceCr ...
- dojo.byId、dojo.query、dojo.attr
概述: dojo.byId(/*string*/id或/*DomNode*/node) 1.传入DOMNode返回传入的domNode; 2.传入id返回id为当前值的domNode dojo.que ...
- Spring整合Hibernate 二 - 声明式的事务管理
Spring大战Hibernate之声明式的事务管理 Spring配置文件: 添加事务管理类的bean: <bean id="txManager" class="o ...
- linux的find指令详解。
引用:http://os.51cto.com/art/200908/141411.htm http://www.oschina.net/translate/15-practical-linux-fin ...
- Java API设计CheckList
API设计原则:正确.好名.易用.易学.够快.够小.但我们从来不缺原则,〜〜〜 Interface 1.The Importance of Being Use Case Oriented,一个接口应当 ...

