ITPub博客

首页 > 数据库 > Oracle > 更改主机名称或ip 导致 Oracle10G Web OEM不能正常启动的解决过程(zt)

更改主机名称或ip 导致 Oracle10G Web OEM不能正常启动的解决过程(zt)

原创 Oracle 作者:jolly10 时间:2008-04-25 17:38:28 0 删除 编辑
引用:http://tolywang.itpub.net/post/48/422170[@more@]

今天由于修改了Oracle10g 主机的名称,导致了OEM不能正常启动。 报错,找不到文件。

PDM8_NewDB$emctl start dbconsole
TZ set to ROC
OC4J Configuration issue. /u01/product/oracle/oc4j/j2ee/OC4J_DBConsole_PDM8_NewDB_wind not found.
PDM8_NewDB$

然后直接想通过拷贝目录来达到目的,但是由于配置文件中太多地方设计到主机名称,没有办法一一都该。所以只有想办法看看 emca 命令能否重新配置。 测试了一下,果然可以。 详见下面处理过程:



第一步: $ emca -repos recreate -host PDM8_NewDB

這裡要注意 SYSMAN 的默認密碼是 oem_temp .


第二步: $ emca -config dbcontrol db

發現報錯,提示信息 EM Agent port 1830 被占用 .


PDM8_NewDB$emca -config dbcontrol db

STARTED EMCA at Nov 29, 2007 5:24:42 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database SID: wind
Database Control is already configured for the database wind
You have chosen to configure Database Control for managing the database wind
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: y
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/product/oracle

Database hostname ................ PDM8_NewDB
Listener port number ................ 1521
Database SID ................ wind
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Nov 29, 2007 5:25:13 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/product/oracle/cfgtoollogs/emca/wind/emca_2007-11-29_05-24-42-PM.log.
Nov 29, 2007 5:25:14 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5540 is already in use.
Nov 29, 2007 5:25:14 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5520 is already in use.
Nov 29, 2007 5:25:14 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Nov 29, 2007 5:25:14 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Nov 29, 2007 5:25:17 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Cannot start Database Control. The following ports are already in use: [EM agent port:1830].
Refer to the log file at /u01/product/oracle/cfgtoollogs/emca/wind/emca_2007-11-29_05-24-42-PM.log for more details.
Could not complete the configuration. Refer to the log file at /u01/product/oracle/cfgtoollogs/emca/wind/emca_2007-11-29_05-24-42-PM.log for more details.


第三步: 然後重新給它一個port. (具體可以查看 emca 的幫助文件)


PDM8_NewDB$ emca -config dbcontrol db -AGENT_PORT 3940

STARTED EMCA at Nov 29, 2007 5:33:36 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database SID: wind
Database Control is already configured for the database wind
You have chosen to configure Database Control for managing the database wind
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: u
Invalid input.
Do you wish to continue? [yes(Y)/no(N)]: y
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/product/oracle

Database hostname ................ PDM8_NewDB
Listener port number ................ 1521
Database SID ................ wind
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Nov 29, 2007 5:34:19 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/product/oracle/cfgtoollogs/emca/wind/emca_2007-11-29_05-33-36-PM.log.
Nov 29, 2007 5:34:19 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5540 is already in use.
Nov 29, 2007 5:34:19 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5520 is already in use.
Nov 29, 2007 5:34:19 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Nov 29, 2007 5:34:19 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Nov 29, 2007 5:34:22 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 29, 2007 5:35:57 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 29, 2007 5:35:57 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is
http://PDM8_NewDB:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 29, 2007 5:35:57 PM
PDM8_NewDB$

第四步: 最好先 emctl stop dbconsole


PDM8_NewDB$emctl stop dbconsole
TZ set to ROC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://PDM8_NewDB:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.

第五步: emctl start dbconsole


PDM8_NewDB$emctl start dbconsole
TZ set to ROC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://PDM8_NewDB:1158/em/console/aboutApplication
- An instance of Oracle Enterprise Manager 10g Database Control is already running.
PDM8_NewDB$emctl stop dbconsole
TZ set to ROC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://PDM8_NewDB:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
PDM8_NewDB$emctl start dbconsole
TZ set to ROC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://PDM8_NewDB:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ................................. started.
------------------------------------------------------------------
Logs are generated in directory /u01/product/oracle/PDM8_NewDB_wind/sysman/log
PDM8_NewDB$


搞定 . 然後使用 http://PDM8_NewDB:1158/em 訪問即可.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/271283/viewspace-1002981/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-02-20

  • 博文量
    263
  • 访问量
    761517