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 ...
随机推荐
- Unity 使用实体类
故事的由来: 正在开发打飞机的游戏,遇到这样的数据结构,游戏有很多关卡-> 每个关卡有几波怪物->每一波里面有怪物和数量 [] 关卡 { []波{ {怪物,数量},{怪物,数量},{怪物, ...
- 一些常用运行命令和CMD命令
运行命令 1. 进入服务页面的命令: services.msc 2. 远程连接命令:mstsc.exe 3. 配置电脑启动项 msconfig 4. 计算器 calc.exe 5. 设定关机时间(se ...
- Innobackupex 全备数据库
对于MySQL数据库的热备.xtrabackup是除了MySQL enterprise backup之外的不二之选. 该工具提供了基于innodb存储引擎的热备.支持全量,增量备份,部分备份,时点恢复 ...
- JNI_最简单的Java调用C/C++代码
JNI_最简单的Java调用C/C++代码 JNI.是Java Native Interface的简称,中文是"Java本地调用".通过这种技术能够做到下面两点: Java程序中的 ...
- WinForm常用代码
//ToolStripSplitButton是标准按钮和下拉按钮的组合,各自工作,但有联系,感觉上后者是没有向下箭头ToolStripDropDownButton:ToolStripDropDownB ...
- section 模块页面切换代码
<div class="blockcode"><blockquote><!DOCTYPE html><html><head&g ...
- SimpleDateFormat的使用
SimpleDateFormat 是一个以国别敏感的方式格式化和分析数据的具体类. 它允许格式化 (date -> text).语法分析 (text -> date)和标准化. 下面是个小 ...
- PHP截取汉字乱码问题解决方法mb_substr函数的应用
首先 1.确保你的Windows/system32下有php_mbstring.dll这个文件,没有就从你Php安装目录extensions里拷入Windows/system32里面. 2.在wind ...
- Gallery过时替代方案HorizontalScrollView
布局: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:androi ...
- 学php之翻译wordpress(1)
单看文件结构,wordpress分了3个文件夹 wp-admin,wp-content,wp-includes 和零散的一堆php,暂时不清楚各自的分工 入口文件是index.php <?php ...