emca fails with "Database instance is unavailable" though available


Fix | Friday, November 23, 2012
Share
  • Facebook
  • LinkedIn
  • Twitter
  • Google Plus
  • Email
  • Comment

emca fails with "Database instance is unavailable" though available

By: Giri Mandalika | Principal Software Engineer

The following example shows the symptoms of failure, and the exact error message.

$ emca -repos create
...
Password for SYSMAN user:  
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 19, 2012 10:33:42 AM oracle.sysman.emcp.DatabaseChecks \
         checkDbAvailabilityImpl
WARNING: ORA-01034: ORACLE not available
Nov 19, 2012 10:33:42 AM oracle.sysman.emcp.DatabaseChecks \
         throwDBUnavailableException
SEVERE: 
Database instance is unavailable. Fix the ORA error thrown and 
run EM Configuration Assistant again.
Some of the possible reasons may be : 
1) Database may not be up. 
2) Database is started setting environment variable ORACLE_HOME 
with trailing '/'. Reset ORACLE_HOME and bounce the database. 
For eg. Database is started setting environment variable 
ORACLE_HOME=/scratch/db/ . Reset ORACLE_HOME=/scratch/db  and bounce 
the database.

Fix:

Ensure that the ORACLE_HOME is pointing to the right location in $ORACLE_HOME/bin/emca file.

Rather than installing from scratch, if ORACLE_HOME was copied over from another location, likely it results in wrong location for ORACLE_HOME in several Enterprise Manager (EM) specific scripts and files. It usually happens when the directory structure on the target machine is not identical to the structure on the original/source machine, including the top level directory location where Oracle RDBMS was installed properly using the installer.

这里需要确认emca可运行程序一定要是$ORACLE_HOME/bin下的。有时因为path里面有多个oracle路径,会造成此问题

你可能感兴趣的:(oracle)