问题一:SEVERE: Listener is not up or database service is not registered with it
问题表现如下:
[oracle@xbfye7l01 db_home]$ emca -config dbcontrol db
………………
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Aug 15, 2012 9:45:48 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /apps/cfgtoollogs/emca/E7DEV/emca_2012_08_15_09_45_23.log.
Aug 15, 2012 9:45: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 /apps/cfgtoollogs/emca/E7DEV/emca_2012_08_15_09_45_23.log for more details.
Could not complete the configuration. Refer to the log file at /apps/cfgtoollogs/emca/E7DEV/emca_2012_08_15_09_45_23.log for more details.
[oracle@xbfye7l01 db_home]$
查看日志:
[oracle@xbfye7l01 db_home]$ tail -100 /apps/cfgtoollogs/emca/E7DEV/emca_2012_08_15_09_45_23.log
g 15, 2012 9:45:49 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: SQLEngine created successfully and connected
Aug 15, 2012 9:45:49 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
CONFIG: ORA-12541: TNS:no listener
oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-12541: TNS:no listener
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)
Aug 15, 2012 9:45: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 /apps/cfgtoollogs/emca/E7DEV/emca_2012_08_15_09_45_23.log for more details.
Aug 15, 2012 9:45:49 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)
Aug 15, 2012 9:45:49 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to /apps/product/11.2.0/db_home/oui
解决办法:
最后检查是因为修改Hostname,但hosts文件以及监听未及时修改所致,于是调整完各个参数,保持一至后,发现仍然报同样的错误,又检查发现数据库V$session中的机器名还是原来的hostname,所以重启数据库,机器后一样,但总的问题没有解决。于是重启了机器,该问题解决。但出现了第二个问题,在下面将进行解决。
问题二:SEVERE: Failed to unlock all EM-related accounts
和
SEVERE: Error creating the repository
问题表现1:
[oracle@xbfye7l01 ~]$ emca -config dbcontrol db
Do you wish to continue? [yes(Y)/no(N)]: Y
Aug 16, 2012 9:06:21 AM oracle.sysman.emcp.EMConfig perform
INFO: This operat