POPUP ERROR:Enterprise Manager Database Control schema exists in the database

While Installing Oracle Enterprise Manager Grid Control on Oracle Database , we can see below error:

7/1/15 1:48:12 AM PDT:  return value: 2
INFO: 7/1/15 1:48:13 AM PDT: POPUP ERROR:Enterprise Manager Database Control schema exists in the database. To proceed with the installation of Enterprise Manager Cloud Control, you must deconfigure the same by running the following command:

To deconfigure Database Control for a single instance database, do the following command on database host:
 (a) Set the environment variable <ORACLE_HOME> to the database home.(b) Run the following command:
<Database ORACLE HOME>/bin/emca -deconfig dbcontrol db -repos drop -SYS_PWD <sys password> -SYSMAN_PWD <sysman password>

 

 

oem-error01

Reason :

When a new database instance is created using dbca utility , EM repository is create by default into the database instance.

This can be confirmed using below sql :

select * from sysman.mgmt_versions where status > 0 and component_mode like 'SYSAUX'  and component_name in ('DB','CORE');

Oracle Enterprise Manager Grid control checks for the same and if the EM repo is already present, the error is thrown.

 

Solution:

1 : Either create a new database instance without the EM repository as shown :

oem-error02

Select " Custom Database " from the screen and then uncheck the EM repository option in the next screen.

2 : Drop the existing EM repository and start the Oracle Enterprise Grid Control configuration process again .

  • To drop the existing EM repository , go to dataase host .
  • go to db_home/bin directory . 
  • execute below command : 
  • $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop -SYS_PWD test*123 -SYSMAN_PWD test*123

STARTED EMCA at Jul 5, 2015 7:46:20 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: OEMDB12C
Listener port number: 1521

Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 5, 2015 7:47:09 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /sandisk/oradata1/app/oracle/cfgtoollogs/emca/OEMDB12C/emca_2015_07_05_19_46_19.log.
Jul 5, 2015 7:47:09 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Jul 5, 2015 7:47:10 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
WARNING: Error initializing SQL connection. SQL operations cannot be performed
Jul 5, 2015 7:47:10 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) …
Jul 5, 2015 7:48:55 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 5, 2015 7:48:55 PM

  • Restart the DB instance.

 

Please follow and like us:

Please add your comments here