right (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information: Database SID: ora10g Listener port number: 1521 Password for SYS user: Password for SYSMAN user: Password for SYSMAN user: Do you wish to continue? [yes(Y)/no(N)]: y Oct 20, 2014 11:49:59 AM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/ora10g/emca_2014-10-20_11-49-36-AM.log. Oct 20, 2014 11:50:01 AM oracle.sysman.emcp.EMReposConfig dropRepository --删除 INFO: Dropping the EM repository (this may take a while) ... Oct 20, 2014 11:54:25 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully dropped Oct 20, 2014 11:54:25 AM oracle.sysman.emcp.EMReposConfig createRepository --创建 INFO: Creating the EM repository (this may take a while) ... Oct 20, 2014 11:59:58 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created Enterprise Manager configuration completed successfully FINISHED EMCA at Oct 20, 2014 11:59:58 AM
可以看到3个successfully,重建后并把em配置也重新刷了一遍
[oracle@bak log]$ emctl status dbconsole TZ set to PRC Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://bak:1158/em/console/aboutApplication --重建EM资料库后,现在的主机名已经更正为“bak”了 Oracle Enterprise Manager 10g is not running.
再次重新启动EM
[oracle@bak log]$ emctl start dbconsole TZ set to PRC Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://bak:1158/em/console/aboutApplication Agent Version : 10.1.0.4.1 OMS Version : Unknown Protocol Version : 10.1.0.2.0 Agent Home : /u01/app/oracle/product/10.2.0/db_1/bak_ora10g Agent binaries : /u01/app/oracle/product/10.2.0/db_1 Agent Process ID : 29136 Parent Process ID : 28566 Agent URL : http://zlm:3938/emd/main --agent还是有原主机残留信息,没有更新,不过不影响登陆EM Started at : 2014-10-20 11:05:11 Started by user : oracle Last Reload : 2014-10-20 11:05:11 Last successful upload : (none) Last attempted upload : (none) Total Megabytes of XML files uploaded so far : 0.00 Number of XML files pending upload : 40 Size of XML files pending upload(MB) : 5.84 Available disk space on upload filesystem : 5.14% Agent is already started. Will restart the agent Stopping agent ... stopped. Starting Oracle Enterprise Manager 10g Database Control ........ started. ------------------------------------------------------------------ Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/bak_ora10g/sysman/log [oracle@bak log]$ emctl status dbconsole TZ set to PRC Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://bak:1158/em/console/aboutApplication Oracle Enterprise Manager 10g is running. ------------------------------------------------------------------ Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/bak_ora10g/sysman/log [oracle@bak log]$
通过重建EM后,就可以用web
浏览器登陆EM管理界面了,新的url为:http://bak:1158/em
总结:
遇到各种原因造成的EM无法登陆的问题,通常是因为旧的EM资料库配置有问题,或者是因为改变了主机或IP地址所造成,可以使用emca -repos recreate重建,就能直接解决问题,仅仅通过emca -config dbconsole db来重新配置是不够彻底的,因为还会有之前错误信息的残留,除了这几个命令外,emca还有很多其他参数,可以通过emca --help查看,这里就不列举了。
|