20.4 Troubleshooting Management Repository Creation Errors

Oracle Universal Installer creates the Management Repository using a configuration step at the end of the installation process. If the repository configuration tool fails, note the exact error messages displayed in the configuration tools window, wait until the other configuration tools have finished, exit from Universal Installer, and then use the following sections to troubleshoot the problem.

20.4.1 Package Body Does Not Exist Error While Creating the Management Repository

If the creation of your Management Repository is interrupted, you may receive the following error when you attempt to create or drop the Management Repository at a later time:

ORA-00604: error occurred at recursive SQL level 1
ORA-04068: existing state of packages has been discarded
ORA-04067: not executed, package body "SYSMAN.MGMT_USER" does not exist
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at line 4

To fix this problem, see "General Troubleshooting Techniques for Creating the Management Repository".

20.4.2 Server Connection Hung Error While Creating the Management Repository

If you receive an error such as the following when you try to connect to the Management Repository database, you are likely using an unsupported version of the Oracle Database:

Server Connection Hung

To remedy the problem, upgrade your database to the supported version as described in Oracle Enterprise Manager Cloud Control Installation and Basic Configuration.

20.4.3 General Troubleshooting Techniques for Creating the Management Repository

If you encounter an error while creating the Management Repository, drop the repository by running the -drop argument to the RepManager script.

If the RepManager script drops the repository successfully, try creating the Management Repository again.

If the RepManager -action drop/drop fails for any reason, perform the following steps:

  1. Apply the Bundle Patch to the 12c OMS home. Note that this step is only applicable to OMS. Refer to My Oracle Support Note 1393173.1: Enterprise Manager Cloud Control Installation Instructions for Bundle Patch 1 and Plug-ins for instructions.
  2. Stop the OMS and verify that all the WLS / OMS processes have been stopped in the OMS home:
    cd <ORACLE_HOME>/bin
    emctl stop oms -all


    You should use the -all option so that the Admin Server is stopped as well

    Verify that there are no WLS / OMS processes still running:

    $ ps -ef | grep EMGC
    $ ps -ef | grep java
  3. Drop the repository objects using the "Repmanager drop" command:
    cd <ORACLE_HOME>/sysman/admin/emdrep/bin
    RepManager <database hostname> <database listener port> <database sid> -action drop -dbUser sys -dbPassword <sys user password> -dbRole sysdba -mwHome <Middleware Home> -mwOraHome <Middleware Home> -oracleHome <OMS Home>

    For example:

    RepManager repomachine.domain 1521 orcl -action drop -dbUser sys -dbPassword oracle123 -dbRole sysdba -mwHome /home/oracle/Middleware 
    -mwOraHome /home/oracle/Middleware -oracleHome /home/oracle/Middleware/oms
  4. Log in to the Repository Database as sys or any DBA user and verify that all the repository objects have been dropped:
    SQL> select username,account_status from dba_users where username in ('SYSMAN', 'SYSMAN_MDS','MGMT_VIEW','SYSMAN_BIPLATFORM','SYSMAN_APM','BIP','SYSMAN_OPSS','SYSMAN_RO') ;
    SQL> select owner,synonym_name from dba_synonyms where table_owner in ('SYSMAN', 'SYSMAN_MDS','MGMT_VIEW','SYSMAN_BIPLATFORM','SYSMAN_APM','BIP','SYSMAN_OPSS','SYSMAN_RO') ;
    SQL> select tablespace_name from dba_tablespaces where tablespace_name like 'MGMT%';
    SQL> select comp_name from SCHEMA_VERSION_REGISTRY;

    None of the above queries should return any rows. If any of the above queries return any rows, then raise an SR with Oracle Support.


    The above solution is applicable if the OMS is in working condition. If the OMS home is not available or not intact, raise an SR with Oracle Support.