Enterprise Manager (EM) Clean Up in Oracle Database 11.2-12.2

Enterprise Manager (EM) Clean Up in Oracle Database 11.2-12.2Enterprise Manager (EM) clean up in Oracle Database 11.2-12.2 is targeting Enterprise Manager Database Control only. EM DB Control does not exist anymore since Oracle Database 12c and got replaced by EM Express, a light-weight EM.

Enterprise Manager (EM) Clean Up in Oracle Database 11.2-12.2

Enterprise Manager (EM) Clean Up in Oracle Database 11.2-12.2As Enterprise Manager Database Control gets replaced by EM Express since Oracle Database 12.1.0.1 its repository must be removed when upgrading to Oracle Database 12c or later. The following MOS Notes offer plenty of information:

When you remove the EM Repository from the database you must stop the console first.

Before you start removing anything from your database please make sure you read my introductory blog post about how to Remove and Clean Up Components from Oracle 11.2 – 12.2 . You’ll find links to monitor proper component removal there as well as in the SQL Scripts Repository on this blog.

Oracle Database 11.2.0.4

Remove Oracle Enterprise Manager Database Control before you approach an upgrade to Oracle Database 12c. Otherwise the removal will happen during the database upgrade but taking several extra minutes.

If you are happy with Oracle Enterprise Manager Database Control in Oracle Database 11g right now – and you use it, then there’s no reason to remove it at the moment.

$ emctl stop dbconsole

Now wait until the DB Console shuts down. Afterwards start removing the repository from your database. The script gets delivered with Oracle Database 12c (12.1 and 12.2). emremove.sql is in your 12c's $ORACLE_HOME/rdbms/admin. It does not exist in any Oracle 11g installation unless you copy it from 12c.

$ sqlplus / as sysdba
SQL> @/u01/app/oracle/product/12.2.0.1/rdbms/admin/emremove.sql

Oracle 12.1.0.2

The preupgrd.sql of Oracle Database 12.1.0.2 will log this message when EM DB Control Repository gets detected:

WARNING: --> Enterprise Manager Database Control repository found in the database

     In Oracle Database 12c, Database Control is removed during
     the upgrade. To save time during the Upgrade, this action
     can be done prior to upgrading using the following steps after
     copying rdbms/admin/emremove.sql from the new Oracle home
   - Stop EM Database Control:
    $> emctl stop dbconsole

   - Connect to the Database using the SYS account AS SYSDBA:

   SET ECHO ON;
   SET SERVEROUTPUT ON;
   @emremove.sql
     Without the set echo and serveroutput commands you will not
     be able to follow the progress of the script.

Once you see this message approach the removal process as explained in the Oracle Database 11.2.0.4 section.

Oracle 12.2.0.1

The preupgrade.jar of Oracle Database 12.2.0.1 will log this message when EM DB Control Repository gets detected:

  RECOMMENDED ACTIONS
  ===================
   + Remove the EM repository.

     - Copy the $ORACLE_HOME/rdbms/admin/emremove.sql script from the target
     12.2.0.1.0 ORACLE_HOME into the source 11.2.0.4.0 ORACLE_HOME.

     Step 1: If database control is configured, stop EM Database Control,
     using the following command

       $> emctl stop dbconsole

     Step 2: Connect to the database using the SYS account AS SYSDBA

       SET ECHO ON;
       SET SERVEROUTPUT ON;
      @emremove.sql

     Without the set echo and serveroutput commands, you will not be able to
     follow the progress of the script.

     The database has an Enterprise Manager Database Control repository.

     Starting with Oracle Database 12c, the local Enterprise Manager Database
     Control does not exist anymore. The repository will be removed from your
     database during the upgrade.  This step can be manually performed before
     the upgrade to reduce downtime.

Once you see this message approach the removal process as explained in the Oracle Database 11.2.0.4 section.

Component Clean Up Series

Finally download a slide deck about the Component Clean Up on this blog:
https://mikedietrichde.com/slides/

 

Share this: