This post will Specially help you to run Oracle Enterprise Manager on Windows 7,Windows 8 and Windows 2012
If you are receiving following error this will help.
CONFIG: OpenSCManager FAILED: Access is denied.
Tips
0. Always Assign Static IP to your Machine in windows host file.
1. Change IP to Machine name as listed below.
2. Run CMD as administrator
3. Execute Drop EM Repo Command
4. Unlock DBSNMP and SYSMAN users
5. Execute Create EM Repo Command
These are the steps:
1. Change the
%ORACLE_HOME%\network\admin\listener.ora
file from an IP number to machine name.
2. Change the
%ORACLE_HOME%\network\admin\tnsnames.ora
file from an IP number to a machine name.
3. Change the
C:\WINDOWS\System32\drivers\etc\hosts
file by adding this line beneath the default localhost
line (for the new Hostname value):
4. Change the Windows
and change the computername
hostname
by right click mycomputer >properties>change settings>changeand change the computername
5. Reboot the machine to set the networking. Unlock the
SYSMAN
account because it ensures that emca
can drop it and all dependencies. Then, drop the em
configuration with the following commands.
Start cmd As administrator
C:\Data> set ORACLE_SID=orcl C:\Data> emca -deconfig dbcontrol db -repos drop
6. You’ll receive the following prompts, enter the Oracle SID and Port number without double quotes but you must enter all passwords with double quotes (at least in Oracle Database 11g):Oracle Database 11gR1Oracle Database 11gR27. If you failed to unlock theSYSMAN
account in step #5, you should drop theSYSMAN
user manually. If youdon’t drop theSYSMAN
schema, you’ll raise an error when you try to recreate it:The Java stack trace will look like this, more or less based on version and release:Drop the user and dependent on version a few other objects, like:8. You can then create theem
environment with the following syntax:9. Again, you’ll receive the following prompts, enter the Oracle SID and Port number without double quotes but you must enter all passwords with double quotes (at least in Oracle Database 11g):
C:\>emca -config dbcontrol db -repos create
STARTED EMCA at Oct 15, 2015 2:57:02 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: ow113
Listener port number: 1521
Listener ORACLE_HOME [ C:\oracle\product\11.2.0\dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for DBSNMP user: Oct 15, 2015 2:57:22 PM oracle.sysman.emcp.util.Genera
lUtil initSQLEngineLoacly
WARNING: ORA-28000: the account is locked
Password for SYSMAN user: Terminate batch job (Y/N)? y
C:\Windows\system32>sqlplus sys as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Oct 15 14:57:34 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter user DBSNMP account unlock;
User altered.
SQL> exit
C:\>emca -config dbcontrol db -repos create
STARTED EMCA at Oct 15, 2015 3:03:55 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: ow113
Listener port number: 1521
Listener ORACLE_HOME [ C:\oracle\product\11.2.0\dbhome_1 ]:
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 ................ C:\oracle\product\11.2.0\dbhome_1
Local hostname ................ SUPPER-1049
Listener ORACLE_HOME ................ C:\oracle\product\11.2.0\dbhome_1
Listener port number ................ 1521
Database SID ................ ow113
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y