emca時提示主機名不能有下劃線並且不能超過32個字元

msdnchina發表於2011-09-23
EMCA stops with "Hostname should not contain underscore _ in it and it should not be longer than 32 characters" [ID 1265731.1]

Applies to:

Enterprise Manager Grid Control - Version: 10.2.0.4 to 11.2.0.2 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Symptoms

EMCA or DBCA fails to install EM database console due to a server hostname of over 32 characters.

In the $ORACLE_HOME/cfgtoollogs/emca//emca_YYYY-MM-DD_HH-MM-SS-AM.log

Oct 4, 2010 9:23:47 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Invalid Hostname myhost.office.reading.berkshire.unitedkingdom.oracle.com Hostname should not contain underscore _ in it and it should not be longer than 32 characters.
Refer to the log file at $ORACLE_HOMEcfgtoollogsdbcaemConfig.log for more details.
Oct 4, 2010 9:23:47 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Invalid Hostname
myhost.office.reading.berkshire.unitedkingdom.oracle.com Hostname should not contain underscore _ in it and it should not be longer than 32 characters.
at oracle.sysman.emcp.ParamsManager.checkValidHostname(ParamsManager.java:2598)
at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:191)
at oracle.sysman.emcp.EMDBPreConfig.invoke(EMDBPreConfig.java:176)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:170)
at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:449)
at java.lang.Thread.run(Thread.java:595)


Cause

Hostname.domain is too long and the EMCA command does not allow a hostname.domain to be than greater than 32 characters.

Solution

1. Drop the DB Console objects (if created), using
2. set the following environment variable to only the short hostname:

ORACLE_HOSTNAME= or

In our example:

Linux/Unix: export ORACLE_HOSTNAME=myhost
or
Windows: set ORACLE_HOSTNAME=myhost

3. Ensure that the hosts file has the full entry of the IP address, hostname, hostname.domain. In our example, this would be:

10.123.123.123 myhost myhost.office.reading.berkshire.unitedkingdom.oracle.com

Note:
- hosts file on unix is located in /etc/hosts
- hosts file on for windows in at c:windowssystem32driversetchosts


4. Recreate the DB Console following the creation steps in

References

- How To Drop, Create And Recreate DB Control In A 10g/11g Database

[@more@]

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

相關文章