This discussion is archived
9 Replies Latest reply: Aug 22, 2013 9:04 PM by user5162193 RSS

Lost emkey.ora

626620 Newbie
Currently Being Moderated
We have an 11g on Linux. The previous DBA left silently and I need to dig out what are there. One of the problem is Enterprise Manager. I believe we are use database control not grid control. Have problem to make it work

emctl Start dbconsole - ok

go to web browser to connect to the service, get message:
Service is not initialized correctly. The Em Key is not configured properly. Run "emctl status emkey" for more details

[oracle@cchdb config]$ emctl status emkey
Oracle Enterprise Manager 11g Database Control Release 11.1.0.6.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
Please enter repository password:

The Em Key is not configured properly or is corrupted in the file system and does not exist in the Management Repository. To correct the problem:
1) Copy the emkey.ora file from another OMS or backup machine to the OH/sysman/config directory.
2) Configure the emkey.ora file by running "emctl config emkey -emkeyfile <emkey.ora file location>".

Not sure if there is 1 or more OMS installed. What is the best to do next?

Related questions:
1) how to I find if there are OMS installed or running? what is OMS the installation location and process on Linux.
2) If recreate repository, would it be created in the target database, or another database dedicated to OEM?

THANKS.
  • 1. Re: Lost emkey.ora
    mnazim Expert
    Currently Being Moderated
    check emkey.ora exist in the OH/sysman/config/emkey.ora
    also if not there then check in the repos it exist or not
    and if both places it not there then you have to remove the dbconsole and configure it again
  • 2. Re: Lost emkey.ora
    626620 Newbie
    Currently Being Moderated
    I appreacte you reply.

    emkey.ora is not in OH/sysman/config, nor the repository. I am planning to do as you sugegsted.

    To remove the dbconsole, did you mean to run emca -deconfig?

    To configure dbconsole, using emca -config, I guess, should I use -config create or recreate. The manual says that create/recreate will create a database to hold the repository. If I priovide my target database SID for the parameter, will the target database get dropped/recreated, or just overwrittern the SYSMAN schema?

    Thanks
  • 3. Re: Lost emkey.ora
    mnazim Expert
    Currently Being Moderated
    you need to follow the steps as below

    emca -deconfig dbcontrol db -repos drop
    emca -config dbcontrol db -repos create
  • 4. Re: Lost emkey.ora
    626620 Newbie
    Currently Being Moderated
    I tried to deconfig like below:
    [oracle@cchdb archivelog]$ emca -deconfig dbcontrol db -repos drop

    STARTED EMCA at Jun 12, 2009 11:20:35 AM
    EM Configuration Assistant, Version 11.1.0.5.0 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.

    Enter the following information:
    Database SID: TDEV
    Listener port number: 1521
    Password for SYSMAN user:
    Do you wish to continue? [yes(Y)/no(N)]: yes
    Jun 12, 2009 11:33:59 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/TDEV/emca_2009_06_12_11_20_35.log.
    Jun 12, 2009 11:34:00 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
    INFO: Stopping Database Control (this may take a while) ...
    Jun 12, 2009 11:34:04 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
    WARNING: Error initializing SQL connection. SQL operations cannot be performed
    Jun 12, 2009 11:34:04 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Dropping the EM repository (this may take a while) ...

    It took quite long time and block any connections to the database (session already open can still query the database).

    Did I do anything wrong?
  • 5. Re: Lost emkey.ora
    mnazim Expert
    Currently Being Moderated
    Please stop the running dbconsole/isqlplus, bounce the database and try again
  • 6. Re: Lost emkey.ora
    626620 Newbie
    Currently Being Moderated
    Yes. This works. I drop/create the repository and beable to see the OEM page. But in the welcome page, it says

    Oracle Enterprise Manager Database Console 11.1.0.6.0
    Accessibility Mode Disabled

    Why the Accessibility Mode is disabled. Is this the right mode?

    Thanks
  • 7. Re: Lost emkey.ora
    mnazim Expert
    Currently Being Moderated
    Yes this expected ,please check the doc.

    http://download.oracle.com/docs/cd/B14099_19/manage.1012/b16242/structure.htm
  • 8. Re: Lost emkey.ora
    626620 Newbie
    Currently Being Moderated
    Thanks
  • 9. Re: Lost emkey.ora
    user5162193 Newbie
    Currently Being Moderated

    Thanks, I had a problem setting up EM on my laptop - the console service was not starting after the domain on my laptop was changed. Your tip did the trick.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points