Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

  • Translate

  • It’s Me






  • My Certificates

  • Links

    My Acclaim Certification : Credly Profile
    My Oracle ACE Pro Profile

  • Achievements

    Awarded Top 100 Oracle Blogs from Worldwide - #RANK 39
  • VISITORS COUNT

  • Verified International Academic Qualification from World Education Service (WES)

    Verified International Academic Qualification from World Education Service (WES)

  • Jobs

How to create & drop the Enterprise Manager for RAC Database in Oracle 11gR2

Posted by Mir Sayeed Hassan on August 5th, 2020

How to Create & Drop the Enterprise Manager for RAC Database in Oracle 11gR2

Login to the server with Oracle User

Goto the default location of the home & drop the existing configuration of the EM

[oracle@racdb1 ~]$ cd $ORACLE_HOME
[oracle@racdb1 db_1]$ pwd
/u01/app/oracle/product/11.2.0/db_1
[oracle@racdb1 db_1]$ emca -config dbcontrol db -repos create -cluster

STARTED EMCA at Jul 28, 2020 10:40:28 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:
Database unique name: racdb
Service name: racdb
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/11.2.0/grid_1 ]:
Password for SYS user:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Password for SYSMAN user: Cluster name: racdb-cluster
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
ASM ORACLE_HOME [ /u01/app/11.2.0/grid_1 ]:
ASM port [ 1521 ]: 1521
ASM username [ ASMSNMP ]:
ASM user password: ********
----------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1

Database instance hostname ................ Listener ORACLE_HOME ................ /u01/app/11.2.0/grid_1
Listener port number ................ 1521
Cluster name ................ racdb-cluster
Database unique name ................ racdb
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
ASM ORACLE_HOME ................ /u01/app/11.2.0/grid_1
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP

------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 28, 2020 10:42:00 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/racdb/emca_2020_07_28_10_40_28.log.
Jul 28, 2020 10:42:32 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jul 28, 2020 10:47:59 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul 28, 2020 10:49:04 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jul 28, 2020 10:50:02 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jul 28, 2020 10:50:03 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_racdb1_racdb to remote nodes ...
Jul 28, 2020 10:50:05 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_racdb2_racdb to remote nodes ...
Jul 28, 2020 10:50:09 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/racdb1_racdb to remote nodes ...
Jul 28, 2020 10:50:11 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/racdb2_racdb to remote nodes ...
Jul 28, 2020 10:50:16 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jul 28, 2020 10:51:31 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 28, 2020 10:52:57 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 28, 2020 10:52:57 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://racdb1:1158/em <<<<<<<<<<<
Jul 28, 2020 10:53:14 AM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:

**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------
racdb racdb1 racdb1
racdb racdb2 racdb1

Jul 28, 2020 10:53:14 AM 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.2.0/db_1/racdb1_racdb/sysman/config/emkey.ora. 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 Jul 28, 2020 10:53:14 AM

Check the Status of EM

[oracle@afcdb1 db_1]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
https://racdb:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/racdb1_racdb1/sysman/log

DROP THE ENTERPRISE MANAGER

[oracle@racdb1 db_1]$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Jul 28, 2020 6:12:42 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:
Database SID: racdb1
Listener port number: 1521
Password for SYS user: ******
Password for SYSMAN user: ********

------------------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
------------------------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 28, 2020 6:14:24 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/racdb/emca_2020_07_28_06_12_41.log.
Jul 28, 2020 6:14:24 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jul 28, 2020 6:14:26 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
WARNING: ORA-01017: invalid username/password; logon denied

Jul 28, 2020 6:14:26 AM oracle.sysman.emcp.EMReposConfig stopDBMSJobs
WARNING: Error initializing SQL connection. SQL operations cannot be performed
Jul 28, 2020 6:14:26 AM oracle.sysman.emcp.EMReposConfig invoke
WARNING: Unable to remove DBMS jobs.
Jul 28, 2020 6:14:26 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jul 28, 2020 6:16:58 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 28, 2020 6:17:15 AM

Enterprise Manager is drop succeesfully

=====Hence tested & verified in our env=====