Unable to run DBCONSOLE – OC4J Configuration issue

Dec 28th, 2009

Sometimes you can get this error:

[oracle@oratest03 scripts]$ emctl start dbconsole
Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
[oracle@oratest03 scripts]$
[oracle@oratest03 scripts]$ export ORACLE_UNQNAME=T11R2
[oracle@oratest03 scripts]$ emctl start dbconsole
OC4J Configuration issue. /app/oracle/product/11.2.0.1/oc4j/j2ee/OC4J_DBConsole_oratest03_T11R2 not found.

This is due to a misconfiguration of dbconsole during database setup. The fastest solution is usually to recreate repository and configuration.

First, deconfigure dbconsole:

[oracle@oratest03 bin]$ ./emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Dec 28, 2009 12:15:33 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: T11R2
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:  

Do you wish to continue? [yes(Y)/no(N)]: Y
Dec 28, 2009 12:15:44 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /app/oracle/cfgtoollogs/emca/T11R2/emca_2009_12_28_12_15_32.log.
Dec 28, 2009 12:15:44 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Dec 28, 2009 12:15:45 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Dec 28, 2009 12:17:33 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Dec 28, 2009 12:17:33 PM

Now, let’s configure it again

[oracle@oratest03 bin]$ ./emca -config dbcontrol db -repos create                                          

STARTED EMCA at Dec 28, 2009 12:17:43 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: T11R2
Listener port number: 1521
Listener ORACLE_HOME [ /app/oracle/product/11.2.0.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 ................ /app/oracle/product/11.2.0.1

Local hostname ................ oratest03
Listener ORACLE_HOME ................ /app/oracle/product/11.2.0.1
Listener port number ................ 1521
Database SID ................ T11R2
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ............... 

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Dec 28, 2009 12:17:58 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /app/oracle/cfgtoollogs/emca/T11R2/emca_2009_12_28_12_17_43.log.
Dec 28, 2009 12:17:59 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Dec 28, 2009 12:23:44 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Dec 28, 2009 12:23:47 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Dec 28, 2009 12:24:41 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Dec 28, 2009 12:24:43 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Dec 28, 2009 12:24:43 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Dec 28, 2009 12:25:13 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Dec 28, 2009 12:25:13 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Dec 28, 2009 12:25:54 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Dec 28, 2009 12:25:54 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Dec 28, 2009 12:26:19 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Dec 28, 2009 12:26:19 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://oratest03:1158/em <<<<<<<<<<<
Dec 28, 2009 12:26:25 PM 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: /app/oracle/product/11.2.0.1/oratest03_T11R2/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 Dec 28, 2009 12:26:25 PM

That’s all. Remember, if you want or need, to backup you encryption key.

  1. paco
    Feb 12th, 2010 at 12:26
    Reply | Quote | #1

    Thanksssssssss!

  2. willem
    Mar 2nd, 2010 at 15:30
    Reply | Quote | #2

    I get a

    ORA-20001: SYSMAN already exists..

    error while recreating the repos. Have you seen that one before? Complete logfile:

    “Check if repos user already exists.

    oud 6: WHERE username=UPPER(‘&EM_REPOS_USER’);
    nieuw 6: WHERE username=UPPER(‘SYSMAN’);
    oud 8: IF ( ‘&EM_CHECK_TYPE’ = ‘EXISTS’) THEN
    nieuw 8: IF ( ‘NOT_EXISTS’ = ‘EXISTS’) THEN
    oud 11: raise_application_error(-20000, ‘&EM_REPOS_USER does not exists..’);
    nieuw 11: raise_application_error(-20000, ‘SYSMAN does not exists..’);
    oud 14: ELSIF ( ‘&EM_CHECK_TYPE’ = ‘NOT_EXISTS’ ) THEN
    nieuw 14: ELSIF ( ‘NOT_EXISTS’ = ‘NOT_EXISTS’ ) THEN
    oud 17: raise_application_error(-20001, ‘&EM_REPOS_USER already exists..’);
    nieuw 17: raise_application_error(-20001, ‘SYSMAN already exists..’);
    oud 21: raise_application_error(-20002, ‘Invalid Check type &EM_CHECK_TYPE’);
    nieuw 21: raise_application_error(-20002, ‘Invalid Check type NOT_EXISTS’);
    DECLARE
    *
    FOUT in regel 1:
    .ORA-20001: SYSMAN already exists..
    ORA-06512: in regel 17″

  3. Jasna
    May 8th, 2010 at 08:08
    Reply | Quote | #3

    Hi,
    I had the same problem as above, and tried the following steps as mentioned above, but still the repository creation failed.
    I have installed Oracle 11g R2. when i start –> programs–>oracle_oradb11g_home1–>database control orcl
    The page cannot be displayed error message comes
    Please do help me to sort it out

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\Administrator>emctl status dbconsole
    Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to da
    tabase unique name.

    C:\Documents and Settings\Administrator>emctl start dbconsole
    Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to da
    tabase unique name.

    C:\Documents and Settings\Administrator>export ORACLE_UNQNAME=orcl
    ‘export’ is not recognized as an internal or external command,
    operable program or batch file.

    C:\Documents and Settings\Administrator>set ORACLE_UNQNAME=orcl

    C:\Documents and Settings\Administrator>emctl status dbconsole
    OC4J Configuration issue. D:\app\Administrator\product\11.2.0\dbhome_1/oc4j/j2ee
    /OC4J_DBConsole_ZAMEEL_orcl not found.

    C:\Documents and Settings\Administrator>emctl start dbconsole
    OC4J Configuration issue. D:\app\Administrator\product\11.2.0\dbhome_1/oc4j/j2ee
    /OC4J_DBConsole_ZAMEEL_orcl not found.

    C:\Documents and Settings\Administrator>emca -deconfig dbcontrol db -repos drop

    STARTED EMCA at May 8, 2010 10:45:29 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
    May 8, 2010 10:46:26 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at D:\app\Administrator\cfgtoollogs\emca\or
    cl\emca_2010_05_08_10_45_29.log.
    May 8, 2010 10:46:46 AM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
    WARNING: EM is not configured for this database. No EM-specific actions can be p
    erformed.
    May 8, 2010 10:46:59 AM 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 ag
    ain .
    Refer to the log file at D:\app\Administrator\cfgtoollogs\emca\orcl\emca_2010_05
    _08_10_45_29.log for more details.
    Could not complete the configuration. Refer to the log file at D:\app\Administra
    tor\cfgtoollogs\emca\orcl\emca_2010_05_08_10_45_29.log for more details.

    C:\Documents and Settings\Administrator>emca -config dbcontrol db -repos create

    STARTED EMCA at May 8, 2010 10:50:07 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 [ D:\app\Administrator\product\11.2.0\dbhome_1 ]:
    Password for SYS user:
    Password for DBSNMP user:
    Password for SYSMAN user:
    Email address for notifications (optional): jasnashyam@gmail.com
    Outgoing Mail (SMTP) server for notifications (optional):
    —————————————————————–

    You have specified the following settings

    Database ORACLE_HOME ……………. D:\app\Administrator\product\11.2.0\dbhome
    _1

    Local hostname ……………. ZAMEEL
    Listener ORACLE_HOME ……………. D:\app\Administrator\product\11.2.0\dbhome
    _1
    Listener port number ……………. 1521
    Database SID ……………. orcl
    Email address for notifications …………… jasnashyam@gmail.com
    Outgoing Mail (SMTP) server for notifications ……………

    —————————————————————–
    Do you wish to continue? [yes(Y)/no(N)]: y
    May 8, 2010 10:55:30 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at D:\app\Administrator\cfgtoollogs\emca\or
    cl\emca_2010_05_08_10_50_07.log.
    May 8, 2010 10:56:51 AM oracle.sysman.emcp.EMReposConfig createRepository
    INFO: Creating the EM repository (this may take a while) …
    May 8, 2010 10:56:52 AM oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Error creating the repository
    May 8, 2010 10:56:52 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Refer to the log file at D:\app\Administrator\cfgtoollogs\emca\orcl\emca_r
    epos_create_.log for more details.
    May 8, 2010 10:56:52 AM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error creating the repository
    Refer to the log file at D:\app\Administrator\cfgtoollogs\emca\orcl\emca_2010_05
    _08_10_50_07.log for more details.
    Could not complete the configuration. Refer to the log file at D:\app\Administra
    tor\cfgtoollogs\emca\orcl\emca_2010_05_08_10_50_07.log for more details.

    C:\Documents and Settings\Administrator>