更改主機名稱或ip 導致 Oracle10G Web OEM不能正常啟動的解決過程(zt)

jolly10發表於2008-04-25
引用: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
<<<<<<<<<<<
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.

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.

- 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.

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.

Starting Oracle Enterprise Manager 10g Database Control ................................. started.
------------------------------------------------------------------
Logs are generated in directory /u01/product/oracle/PDM8_NewDB_wind/sysman/log
PDM8_NewDB$


搞定 . 然後使用 訪問即可.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271283/viewspace-1002981/,如需轉載,請註明出處,否則將追究法律責任。

相關文章