Executing Any EMCTL Command on Windows 2008 / Vista Returns "Permission denied" Error (Doc ID 1164293.1)

Last updated on JUNE 28, 2017

Applies to:

Enterprise Manager for Oracle Database - Version 10.2.0.3 to 12.1.0.2.0 [Release 10.2 to 12.1]
Enterprise Manager Base Platform - Version 10.2.0.1 to 12.1.0.1.0 [Release 10.2 to 12.1]
Microsoft Windows x64 (64-bit) - Version: 2008 R2
Checked for relevance on 14-Dec-2013

Symptoms

Enterprise Manager (EM) 10g or 11g Grid Control OMS or Agent has been installed on an MS Windows 2008 or Vista Server.
Database Control (dbconsole) 10.2.0.3 and higher has been installed on a Windows 2008 or Vista Server.

The EM OMS or Agent or dbconsole is able to startup and stop successfully from the MS Windows Services panel. But, trying to use the emctl utility from the command line to perform any operation on the OMS, Agent or dbconsole returns in a 'Permission denied' error. 

Note that, in all cases, it is Oracle's recommendation that the user exercise Enterprise Manager components with the Services Control Panel on MS Windows platforms.

For example, checking the Agent status returns:

D:\OracleHomes\agent11g\bin>emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Unable to open file for logging. D:\OracleHomes\agent11g/sysman/log/emctl.log: Permission denied
Error in tempfile() using D:\OracleHomes\agent11g\XXXXXXXXXX: Could not create temp file D:\OracleHomes\agent11g\sqFxDLPiBX: Permission denied at D:/OracleHomes/agent11g/bin/AgentStatus.pm line 233


Checking the 11g OMS status returns:

emctl status oms
Access is denied.
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Category
at oracle.sysman.emctl.wls.OMSController.<clinit>(OMSController.java:89)

Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Category
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 1 more
Could not find the main class: oracle.sysman.emctl.wls.OMSController. Program will exit.



This error occurs even if the Windows OS user who has installed the OMS / Agent or DB Control is logged into the machine and is running the emctl utility.
This Windows user is also part of the Local Administrators Group.

Changes

 

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