Create and Drop Oracle Enterprise Manager Console on Windows Server
Following are the steps to configure Oracle Enterprise Manager in Windows:
1. Check the sysman user is present in the database.
select username from dba_users where username ='SYSMAN';
2. If exists command to drop existing setting otherwise go to step 4
emca -deconfig dbcontrol db -repos drop
3. After step 2 check the user sysman is dropped from database.
select username from dba_users where username ='SYSMAN';
4. Start configuring Enterprise manager repository
emca -repos create
5. Configure db control service
emca -config dbcontrol db

It’s failed due to user name is locked, So need to reset and unlock username for DBSNMP and SYSMAN.

6. Again start the db control command:
emca -config dbcontrol db

Installation is completed.
Step 7: check status of Enterprise manage tool asStep 8: Start the enterprise manager tool
emctl status dbconsoleStep 9: Stop the enterprise manager tool
emctl start dbconsoleIf you received following errors:
emctl stop dbconsole
The OracleDBConsolePEGA service could not be started.
A service specific error occurred: 2.
More help is available by typing NET HELPMSG 3547.
Solution:
Then set the following parameters:
set oracle_home=
Set PATH=
set oracle_sid=
set oracle_hostname=localhost
set oracle_unqname=pegaTry to start the em console. Go to following link:
http://smarttechways.com/2014/09/25/environment-variable-oracle_unqname-not-defined-in-em-status/
emctl start dbconsole
Note: If it’s not started then set upper parameter and start from step 1 from reconfigure again.