After an installation of a new Oracle Home and complete restore of the database it is nescesary to regenerate the Database Console repository to use the Enterprise Manager.
[oracle@centos ~]$ . oraenv
ORACLE_SID = [orcl] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle
create a password file:
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=<password>
and check the parameter remote_login_password:
[oracle@centos db_1]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 – Production on Thu Jan 10 19:15:47 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter password
NAME TYPE VALUE
———————————— ———– ——————————
remote_login_passwordfile string EXCLUSIVE
SQL>
if this is not exclusive, change it and restart the database. After this you can connect as sysdba over tns.
It is nescesary to recreate the repository because with the reintall of oracle we lost the repository key. which is located in the oracle_home. First thing to do is drop the repository:
[oracle@centos db_1]$ emca -deconfig dbcontrol db -repos drop
STARTED EMCA at Jan 10, 2008 8:12:36 PM
EM Configuration Assistant, Version 11.1.0.5.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Jan 10, 2008 8:12:46 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2008_01_10_20_12_36.log.
Jan 10, 2008 8:12:48 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) …
Jan 10, 2008 8:13:01 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) …
Jan 10, 2008 8:20:33 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jan 10, 2008 8:21:04 PM
[oracle@centos db_1]$
Now we can recreate the repository.
[oracle@centos db_1]$ emca -config dbcontrol db -repos create
STARTED EMCA at Jan 10, 2008 8:24:25 PM
EM Configuration Assistant, Version 11.1.0.5.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional): <my mail>
Outgoing Mail (SMTP) server for notifications (optional): centos.bekijkhet.com
—————————————————————–
You have specified the following settings
Database ORACLE_HOME ……………. /u01/app/oracle/product/11.1.0/db_1
Local hostname ……………. centos.bekijkhet.com
Listener port number ……………. 1521
Database SID ……………. orcl
Email address for notifications …………… <my mail>
Outgoing Mail (SMTP) server for notifications …………… centos.bekijkhet.com
—————————————————————–
Do you wish to continue? [yes(Y)/no(N)]: y
Jan 10, 2008 8:24:50 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2008_01_10_20_24_25.log.
Jan 10, 2008 8:24:54 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) …
Jan 10, 2008 8:38:28 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jan 10, 2008 8:38:57 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) …
Jan 10, 2008 8:42:16 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jan 10, 2008 8:42:25 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Jan 10, 2008 8:42:25 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives …
Jan 10, 2008 8:42:49 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Jan 10, 2008 8:42:49 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) …
Jan 10, 2008 8:43:17 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jan 10, 2008 8:43:17 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) …
Jan 10, 2008 8:45:47 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jan 10, 2008 8:45:47 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://centos.bekijkhet.com:1158/em <<<<<<<<<<<
Jan 10, 2008 8:46:42 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: /u01/app/oracle/product/11.1.0/db_1/centos.bekijkhet.com_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 Jan 10, 2008 8:46:42 PM
[oracle@centos db_1]$
Be sure to backup your system including the emkey.ora file!
[...] http://broersa.wordpress.com/2008/01/10/regenerate-database-console-repository/ [...]
Pingback by Oracle rename db_domain and GlobalName of a database « Andre Broers’ personal blog — July 17, 2008 @ 9:30 am
Thank you very much for these instructions! They have been very helpful and now my Enterprise Manager site is working again.
Comment by Melissa Engman — February 11, 2009 @ 7:37 pm
I love your site!
_____________________
Experiencing a slow PC recently? Fix it now!
Comment by Michael Tim — February 28, 2009 @ 5:23 pm
Hi there,
Thank you for the information and instructions. However, since I am a newbie at this, I’d like to ask you a silly question. By dropping the repository, is there any chance that it will affect the database itself? I.e. I have a few databases that I cannot afford to lose, and it seems that I have set up some parameters in the OEM incorrectly. I’d like to reconfigure the OEM without affecting the database itself, and I hope the steps that you posted above is the solution (please correct me if I’m wrong). Thanks a lot for your help and looking forward to hear from you soon. Once again, nice website Andre, and thanks for sharing all the very informative knowledge
Comment by jems — September 18, 2009 @ 7:12 am
no, it will only affect the sysman schema in the database. But if you r in doubt, try it on a spare machine.
Comment by andre — September 18, 2009 @ 7:55 pm
Thank you for your prompt reply Andre
I’ll try it out and let you know of the results
Cheers,
Jems
Comment by jems — September 21, 2009 @ 7:09 am
Hi Andre,
I just issued the below command to recreate the repository and everything seems to be working fine
Thanks for your help.
emca -config dbcontrol db -repos recreate
(Please correct me if I’m wrong,) I think if you use the above command, you don’t need to issue the drop repository command as Oracle will erase all the settings and recreate them for you.
E.g.
C:\>emca -config dbcontrol db -repos recreate
STARTED EMCA at 25/09/2009 11:19:29
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and perform
a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: Y
Listener port number: 1531
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN 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 ……………. D:\oracle\product\10.2.0\db_1
Database hostname ……………. orclsvr0001.prod.local
Listener port number ……………. 1531
Database SID ……………. orcl
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………
—————————————————————–
Do you wish to continue? [yes(Y)/no(N)]: Y
25/09/2009 11:20:04 oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at D:\oracle\product\10.2.0\db_1\cfgtoollog
s\emca\orcl\emca_2009-09-25_11-19-29-AM.log.
25/09/2009 11:20:13 oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) …
25/09/2009 11:20:16 oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) …
25/09/2009 11:22:06 oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
25/09/2009 11:22:07 oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) …
25/09/2009 11:25:26 oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
25/09/2009 11:25:46 oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) …
25/09/2009 11:26:26 oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
25/09/2009 11:26:26 oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://orclsvr0001.prod.local:5
500/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Sep 25, 2009 11:26:26 AM
Comment by jems — September 25, 2009 @ 1:41 am