Database Control (dbconsole) will not start

A common problem with 10g and higher database is that Database Control fails to start after installation. This more common on desktop and laptop installs but the resolution is the same.

The configuration files and repository used by Database Control contains information about the database, the listener and the hostname in which it is installed. Changes in either of those three items after the installation of Database Control will cause problems in the operations of Database Control.

In order to resolve the problem the configuration files and repository will need to be reconfigured. This document will detail the steps to recreating the configuration files and the repository.

Deleting the Database Control Configuration files

The configuration file are located in the following locations.

ORACLE_HOME/<hostname_sid>
ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>

You can either manually delete the above directories or you can emca. If you are using emca the command to delete the configuration files is:

ORACLE_HOME/bin/emca – deconfig dbcontrol db (10gR2 and higher)
ORACLE_HOME/bin/emca –x <sid> (10gR1)

When using emca it is possible that the changes that caused the problem with Database Control starting also prevent emca from deleting the configuration files.

[oracle@ora1 dbhome_1]$ emca -deconfig dbcontrol db

STARTED EMCA at Apr 8, 2010 9:19:51 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: orcl

Do you wish to continue? [yes(Y)/no(N)]: Y
Apr 8, 2010 9:20:13 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2010_04_08_09_19_49.log.
Apr 8, 2010 9:20:13 AM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 8, 2010 9:20:13 AM
[oracle@ora1 dbhome_1]$

In this case we will need to delete the directories manually.

[oracle@ora1 ~]$ cd $ORACLE_HOME
[oracle@ora1 dbhome_1]$ rm -R localhost_orcl/
[oracle@ora1 dbhome_1]$ cd oc4j/j2ee
[oracle@ora1 j2ee]$ rm -R OC4J_DBConsole_localhost_orcl/
[oracle@ora1 j2ee]$

Note to Windows users: You will need to remove the Database Control Service. The Database Control service has the naming convention of OracleDBConsole. You can use regedit to navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/SERVICES. Find the entry OracleDBConsole and delete it.

Deleting the Database Control Repository

Next the repository needs to be removed. Again emca can be used to remove the repository. For 10gR1 and R2 you can also use RepManager.

Note: It is possible to leave the repository in place, so you can skip the deletion step if you going to use the existing repository.

ORACLE_HOME/sysman/admin/emdrep/bin/RepManager <hostname> <listener_port> <sid> -action drop (10gR1 and R2)
ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop (10gR2 and higher)

Be aware that both commands listed above put the database in quiesce mode. If there are running transactions at the time executed the commands could appear to hang as they wait for the transactions to complete. Also during this time new connection will be blocked.

Below is the output for the emca command.

[oracle@ora1 ~]$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Apr 8, 2010 9:49:59 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:  
Password for SYSMAN user:  

Do you wish to continue? [yes(Y)/no(N)]: Y
Apr 8, 2010 9:50:17 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2010_04_08_09_49_59.log.
Apr 8, 2010 9:50:17 AM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Apr 8, 2010 9:50:17 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Apr 8, 2010 9:53:04 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 8, 2010 9:53:05 AM
[oracle@ora1 ~]$ 

Using the emca -deconfig dbcontrol db -repos drop command it is possible to delete the configuration files and the repository in one step.

If you are on 10gR1 and have problems with RepManager you can drop the repository manually with the script below.

shutdown immediate;
startup restrict;
exec sysman.emd_maintenance.remove_em_dbms_jobs;
exec sysman.setemusercontext('',5);
revoke dba from sysman;
declare
  cursor c1 is
    select owner, synonym_name name
    from dba_synonyms
    where table_owner = 'sysman';
begin
  for r1 in c1
  loop
    if r1.owner = 'public' then
      execute immediate 'drop public synonym '||r1.name;
    else
      execute immediate 'drop synonym '||r1.owner||'.'||r1.name;
    end if;
  end loop;
end;
/
drop user mgmt_view cascade;
drop role mgmt_user;
drop user sysman cascade;
alter system disable restricted session;

Recreate Database Control Repository and Configuration Files

If you did not remove the repository you can use the following commands to recreate the configuration files.

ORACLE_HOME/bin/emca –r   (10gR1)
ORACLE_HOME/bin/emca –config dbcontrol db

You can use the following commands to recreate both the configuration files and the repository

ORACLE_HOME/bin/emca  (10gR1)
ORACLE_HOME/bin/emca –config dbcontrol –repos create

Be aware that both commands listed above put the database in quiesce mode. If there are running transactions at the time executed the commands could appear to hang as they wait for the transactions to complete. Also during this time new connection will be blocked.

Below is the output of running ORACLE_HOME/bin/emca –config dbcontrol –repos create

[oracle@ora1 ~]$ emca -config dbcontrol db -repos create

STARTED EMCA at Apr 8, 2010 10:47:08 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: orcl
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]: 
Password for SYS user:  
Password for DBSNMP 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 ................ /u01/app/oracle/product/11.2.0/dbhome_1

Local hostname ................ ora1.localdomain
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Apr 8, 2010 10:47:56 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2010_04_08_10_47_08.log.
Apr 8, 2010 10:47:57 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Apr 8, 2010 10:53:09 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Apr 8, 2010 10:53:13 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Apr 8, 2010 10:54:25 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Apr 8, 2010 10:54:28 AM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Apr 8, 2010 10:54:28 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Apr 8, 2010 10:54:48 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Apr 8, 2010 10:54:48 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Apr 8, 2010 10:55:28 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Apr 8, 2010 10:55:28 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Apr 8, 2010 10:56:24 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Apr 8, 2010 10:56:25 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://ora1.localdomain:1158/em <<<<<<<<<<<
Apr 8, 2010 10:56:42 AM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING: 
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0/dbhome_1/ora1.localdomain_orcl/sysman/config/emkey.ora.   Please ensure this file is backed up as the encrypted data will become unusable if this file is lost. 

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 8, 2010 10:56:42 AM
[oracle@ora1 ~]$

After the command completes successfully the Database Console will be running.

[oracle@ora1 ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
https://ora1.localdomain:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running. 
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/ora1.localdomain_orcl/sysman/log 
[oracle@ora1 ~]$

And you should now be able to access the interface at the site listed in the output of the status command.

8 thoughts on “Database Control (dbconsole) will not start”

  1. I’ve seen variations of these types of instructions on many pages. The reason they are applicable to my situation
    was that I needed to change the db control configuration files after I changed the hostname and ip address of the
    server on which Oracle was running.

    The steps outlined above are on target and better than the oracle notes!

    The important point missing from many of these articles (which is now obvious to me now!) is that you need to drop the repository
    BEFORE you change the hostname and IP address. It can be done afterwards, but the process is much more clunky!

    What took hours and hours the wrong way is now completed in 4 steps :

    1. emca -deconfig dbcontrol db -repos drop

    2. Change hostname and IP (I cheated and used YAST in SUSE Linux, rather than manually editing the files)

    3. Reboot the computer (this step may not be required, but my server ended up being accessible under both IPs until I did this)

    4. emca -config dbcontrol db -repos create

    Hope others find this useful — I see a lot of questions about changing the hostname and successfully reconfiguring the enterprise manager,
    but none seem to have satisfactory answers.

    Good luck!

  2. Hello Mark,

    Thank you for sharing that information. These problem seems to arise quite frequently given the number of people I see ask for help on the forms.

    Eric Jenkinson

  3. Mark, there is another option if you want to drop your config and the hostname was changed.
    Before drop the repository you must export the ORACLE_HOSTNAME system variable with the hostname name/ip that been used when the repository was created before. Then drop the repository.

    Here is my my example when I had this problem 2 months ago
    1049 feb/06 – 14:45:10 export ORACLE_HOSTNAME=”FB-BD1″
    1050 feb/06 – 14:45:18 emca -deconfig dbcontrol db -repos drop
    1051 feb/06 – 14:46:16 emca -deconfig dbcontrol db
    1053 feb/06 – 14:46:58 export ORACLE_HOSTNAME=”192.168.77.11″
    1054 feb/06 – 14:47:21 emca -config dbcontrol db -repos recreate

    No reboots needed, so you can apply this solution in high disponibility environments.

    Regards

  4. control file is read while instance is mnivog to mount stage from the nomount stage,the control file has the names and locations of all the datafiles and redolog files in the database(which can be called as structure of database).so when the instance wants to move from mount to open stage the control file will be checked for getting the names and locations of all those datafiles and redolog files.If all those online datafiles and redolog files are physically available and the datafile headers are in sync (i.e, they are having the same SCN) then only the instacne can be opened ..So that’s why its the most critical file of the database .Plus it has so many other roles also to play .

  5. HI please healp me if you know, I have oracle 11g r2 install on Windows 7 x64 and oracle enterprise dont work, i find your post and I get this error

    May 25, 2013 5:49:59 PM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at F:\app\TK\cfgtoollogs\emca\orcl\emca_2013_05_25_17_49_47.log.
    May 25, 2013 5:49:59 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
    INFO: Stopping Database Control (this may take a while) …
    May 25, 2013 5:50:00 PM oracle.sysman.emcp.EMReposConfig stopDBMSJobs
    WARNING: Error initializing SQL connection. SQL operations cannot be performed
    May 25, 2013 5:50:00 PM oracle.sysman.emcp.EMReposConfig invoke
    WARNING: Unable to remove DBMS jobs.
    May 25, 2013 5:50:05 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
    Refer to the log file at F:\app\TK\cfgtoollogs\emca\orcl\emca_2013_05_25_17_49_47.log for more details.
    Could not complete the configuration. Refer to the log file at F:\app\TK\cfgtoollogs\emca\orcl\emca_2013_05_25_17_49_47.log for more details.

  6. great post it worked for me from the first try without any errors on windows 2003

  7. I am getting the same error as John. I am trying to install and configure Oracle 11gR2 on CentOS 5.9.

    Please help us both in this regard.

  8. Hi All,

    I am getting error while configuring the db console as following.

    Provisioning archives deployment failed. do it manually

    Anyone has idea abot this?

Leave a Reply

Your email address will not be published. Required fields are marked *