Creating dbconsole 11.2 fails with "Exception in thread "main" oracle.sysman.emcp.exception.DatabaseUnavailableException: Database instance unavailable" on Windows (Doc ID 1332546.1)

Last updated on NOVEMBER 29, 2014

Applies to:

Enterprise Manager for Oracle Database - Version 11.2.0.1 to 11.2.0.3 [Release 11.2]
Microsoft Windows x64 (64-bit)
Microsoft Windows (32-bit)

Symptoms

Creating dbconsole using "emca -config dbcontrol db -repos create" fails with:-

STARTED EMCA at Apr 20, 2011 10:31:11 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database SID: test
Exception in thread "main" oracle.sysman.emcp.exception.DatabaseUnavailableException: Database instance unavailable.
at oracle.sysman.emcp.DatabaseChecks.throwDBUnavailableException(DatabaseChecks.java:151)
at oracle.sysman.emcp.DatabaseChecks.checkDbAvailabilityImpl(DatabaseChecks.java:144)
at oracle.sysman.emcp.DatabaseChecks.checkDbAvailability(DatabaseChecks.java:163)
at oracle.sysman.emcp.DatabaseChecks.getDbServiceName(DatabaseChecks.java:582)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1272)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:574)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:522)

In some circumstances, the error can be:-

STARTED EMCA at Feb 15, 2011 7:19:08 PM
 EM Configuration Assistant, Version 11.2.0.0.2 Production
 Copyright (c) 2003, 2005, Oracle. All rights reserved.
 
 Enter the following information:
 Database SID: test2
 Feb 15, 2011 7:19:20 PM 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 data base.
 For eg. Database is started setting environment variable ORACLE_HOME=/scratch/db/ . Reset ORACLE_HOME=/scratch/db and bounce

The following can be seen in the $ORACLE_BASE/cfgtoollogs/emca/<sid>/<emca_*currenttimestamp>.log files:-

CONFIG: SQLEngine connecting with SID: <sid>, oracleHome: <ORACLE_HOME>, and user:
May 19, 2011 2:21:41 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: ORA-01031: insufficient privileges
oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01031: insufficient privileges

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms