The simplest way to rebuild EM
Four steps:
Emca-repos Drop
Emca-repos Create
Emca-config Dbcontrol DB
Emctl Start Dbconsole
The detailed procedure is as follows:
[Email protected] admin]$ Emctl stop Dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, Oracle Corporation. All rights reserved.
Http://ora11gr2:5500/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ...
... Stopped.
[[email protected] admin]$ Emca-repos drop
EMCA started on 2011-5-2 20:43:18
EM Configuration Assistant, 11.2.0.0.2 official version
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID:ORCL
Listener Port number: 1521
SYS User's password:
Sysman User's password:
Sysman User's password:
Do you want to continue? [Yes (Y)/No (N)]: Y
2011-5-2 20:43:55 Oracle.sysman.emcp.EMConfig Perform
Info: This operation is being logged to/u01/cfgtoollogs/emca/orcl/emca_2011_05_02_20_43_17.log.
2011-5-2 20:43:56 Oracle.sysman.emcp.EMReposConfig Invoke
Info: Removing the EM Data archive (this may take some time) ...
2011-5-2 20:49:00 Oracle.sysman.emcp.EMReposConfig Invoke
Info: The repository was deleted successfully
Configuration of Enterprise Manager completed successfully
EMCA ended on 2011-5-2 20:49:00
[Email protected] admin]$ Emca-repos Create
EMCA started on 2011-5-2 20:49:27
EM Configuration Assistant, 11.2.0.0.2 official version
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID:ORCL
Listener Port number: 1521
SYS User's password:
Sysman User's password:
Do you want to continue? [Yes (Y)/No (N)]: Y
2011-5-2 20:49:53 Oracle.sysman.emcp.EMConfig Perform
Info: This operation is being logged to/u01/cfgtoollogs/emca/orcl/emca_2011_05_02_20_49_26.log.
2011-5-2 20:49:53 Oracle.sysman.emcp.EMReposConfig createrepository
Info: Creating an EM Data archive (this operation may take a while) ...
2011-5-2 20:58:32 Oracle.sysman.emcp.EMReposConfig Invoke
Info: The repository was created successfully
Configuration of Enterprise Manager completed successfully
EMCA ended on 2011-5-2 20:58:32
[Email protected] admin]$ emca-config Dbcontrol db
EMCA started on 2011-5-2 20:58:55
EM Configuration Assistant, 11.2.0.0.2 official version
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID:ORCL
Database Control has been configured for ORCL
You have chosen to configure database control to manage databases ORCL
This action removes the existing configuration and default settings and re-executes the configuration
Do you want to continue? [Yes (Y)/No (N)]: Y
Listener Oracle_home [/u01/oracle]:
SYS User's password:
DBSNMP User's password:
Sysman User's password:
e-mail address of the notification (optional):
Outgoing (SMTP) server for notifications (optional):
-----------------------------------------------------------------
The following settings have been specified
Database Oracle_home .../u01/oracle, ....----
The local hostname ....... ora11gr2 .....
The listener is oracle_home .../u01/oracle------
Listener port number ...... ....... 1521
Database SID ..... ORCL-----
The e-mail address of the notification .....
Notification of the outgoing (SMTP) server ..... .....
-----------------------------------------------------------------
Do you want to continue? [Yes (Y)/No (N)]: Y
2011-5-2 21:00:18 Oracle.sysman.emcp.EMConfig Perform
Info: This operation is being logged to/u01/cfgtoollogs/emca/orcl/emca_2011_05_02_20_58_55.log.
2011-5-2 21:00:20 Oracle.sysman.emcp.util.DBControlUtil stopoms
Info: Stopping Database Control (This operation may take some time) ...
2011-5-2 21:00:39 Oracle.sysman.emcp.EMReposConfig uploadconfigdatatorepository
Info: Uploading configuration data to the EM data archive (this operation may take some time) ...
2011-5-2 21:01:55 Oracle.sysman.emcp.EMReposConfig Invoke
Info: The configuration data was uploaded successfully
2011-5-2 21:02:07 Oracle.sysman.emcp.util.DBControlUtil Configuresoftwarelib
Info: The software library has been configured successfully.
2011-5-2 21:02:07 Oracle.sysman.emcp.EMDBPostConfig configuresoftwarelibrary
Info: Provisioning profile is being deployed ...
2011-5-2 21:02:57 Oracle.sysman.emcp.EMDBPostConfig configuresoftwarelibrary
Info: Provisioning file deployment was successful.
2011-5-2 21:02:57 Oracle.sysman.emcp.util.DBControlUtil Securedbconsole
Info: Protecting Database Control (This operation may take some time) ...
2011-5-2 21:03:46 Oracle.sysman.emcp.util.DBControlUtil Securedbconsole
Info: Database Control has been successfully protected.
2011-5-2 21:03:46 Oracle.sysman.emcp.util.DBControlUtil startoms
Info: Starting Database Control (This operation may take some time) ...
2011-5-2 21:04:39 Oracle.sysman.emcp.EMDBPostConfig performconfiguration
Info: The Database Control was successfully started
2011-5-2 21:04:39 Oracle.sysman.emcp.EMDBPostConfig performconfiguration
Info: >>>>>>>>>>> Control URL for Https://ora11gr2:5500/em <<<<< <<<<<<
2011-5-2 21:04:49 Oracle.sysman.emcp.EMDBPostConfig Invoke
Warning:
WARNING ************************
The management repository is placed in safe mode, in which Enterprise Manager data is encrypted. The encryption key has been placed in the file/u01/oracle/ora11gr2_orcl/sysman/config/emkey.ora. Be sure to back up this file, because if this file is lost, the encrypted data will not be available.
***********************************************************
Configuration of Enterprise Manager completed successfully
EMCA ended on 2011-5-2 21:04:49
[Email protected] admin]$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, Oracle Corporation. All rights reserved.
Https://ora11gr2:5500/em/console/aboutApplication
-an instance of Oracle Enterprise Manager 11g Database Control is already running.
The Enterprise Manager page for Oracle 11GR2 cannot be opened in the browser