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 126.96.36.199.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?
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?
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
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?
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 188.8.131.52.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).