Tuesday, March 10, 2015

OEM Database Control Setup fails with ACCESS DENIED error

On Windows platform, if OEM Database Control configuration fails with “SEVERE: Error instantiating EM configuration files” message, this could be because of permission issue of the OS user doing the OEM configuration. See bellow

C:\Users>emca -config dbcontrol db -repos create

STARTED EMCA at Mar 11, 2015 11:46:03 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: mydb
Listener ORACLE_HOME [ D:\ORACLE\1120 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN 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 ................ D:\ORACLE\1120

Local hostname ................ MYSERVER
Listener ORACLE_HOME ................ D:\ORACLE\1120
Listener port number ................ 1521
Database SID ................ mydb
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Mar 11, 2015 11:58:45 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error instantiating EM configuration files
Refer to the log file at D:\ORACLE\cfgtoollogs\emca\mydb\emca_2015_03_11_11_46_02.log for more details.
Could not complete the configuration. Refer to the log file at D:\ORACLE\cfgtoollogs\emca\mydb\emca_2015_03_11_11_46_02.log for more details.

C:\Users>


Screenshot of command prompt could be as follows















If we open the log file mentioned above, it would show messages as follows. Highlighted in red is actually a hint that were actual problem is.
Mar 11, 2015 11:58:45 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Exit value of 255
Mar 11, 2015 11:58:45 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Creating shared install...
Source location: D:\ORACLE\1120
Destination (shared install) : D:\ORACLE\1120\PMS03198DBB_mydb
DeployMode : dbconsole

Creating directories...
Setting console properties ...
Setting log and trace files locations for Console ...
Setting log and trace files locations for Agent ...

Mar 11, 2015 11:58:45 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: OpenSCManager FAILED: Access is denied.

Service creation failed. Aborting...

Mar 11, 2015 11:58:45 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing CMD /C D:\ORACLE\1120\bin\emctl.bat deploy dbconsole -d mydb D:\ORACLE\1120\PMS03198DBB_mydb PMS03198DBB:3938 PMS03198DBB mydb
Mar 11, 2015 11:58:45 AM oracle.sysman.emcp.EMAgentConfig instantiateEMConfigFiles
CONFIG: Failed to deploy state dirs
Mar 11, 2015 11:58:45 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error instantiating EM configuration files
Refer to the log file at D:\ORACLE\cfgtoollogs\emca\mydb\emca_2015_03_11_11_46_02.log for more details.
Mar 11, 2015 11:58:45 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Error instantiating EM configuration files
            at oracle.sysman.emcp.EMAgentConfig.updateAgentConfigFiles(EMAgentConfig.java:3481)
            at oracle.sysman.emcp.EMAgentConfig.performConfiguration(EMAgentConfig.java:1465)
            at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:300)
            at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:278)
            at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:259)
            at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:599)
            at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1482)
            at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:583)
            at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:529)
Mar 11, 2015 11:58:45 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to D:\ORACLE\1120\oui

Solution
Actual problem is related to the permission of the user, which is not allowing the configuration command to create the OS level service for OEM. To solve the problem, the command prompt (to execute the OEM configuration command) should be opened with Administrator privileges, as follows.

No comments:

Post a Comment

Popular Posts - All Times