EM 12c : Accessing Management Services Page in EM Console Reports Error "ORA-04063: package body "SYSMAN.EM_MTM_PKG" has errors" (Doc ID 2098761.1)

Last updated on JANUARY 31, 2016

Applies to:

Enterprise Manager Base Platform - Version 12.1.0.1.0 and later
Information in this document applies to any platform.

Symptoms

1. Clicking on Setup-->Manage Cloud Control-->Management Services in EM Console gives below error:

ORA-04063:package body "SYSMAN.EM_MTM_PKG" has errors

    Also navigating anywhere on the Management Services Page gives the same error.

2. The <EM_INSTANCE_BASE>/em/EMGC_OMS1/sysman/log/emoms.trc shows error as below:

2016-01-15 11:48:43,858 [oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl - Incident Dump Executor (created: Fri Jan 15 11:48:23 CET 2016)] WARN dump.OMSDump logp.251 - 
Exception retrieving oms data from the repository ORA-04063: package body "SYSMAN.EM_MTM_PKG" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYSMAN.EM_MTM_PKG"


3. The EMDIAG (repvfy) report using the <Document 1426973.1> shows:

repvfy -level 9 -detail
...............
verifyCORE
======================================================================
3. Invalid objects in EM schemas
=--------- ---------- ---------- ---------- ---------- ---------- ---------=
= Action:
= - Run the fix routine:
= $ repvfy verify core -test 3 -fix
=--------- ---------- ---------- ---------- ---------- ---------- ---------=

OWNER OBJECT_ID OBJECT_NAME OBJECT_TYPE
-------------------------------- ----------
SYSMAN 70475 EM_MTM_PKG PACKAGE BODY
SYSMAN 70242 EM_OMS_MONITOR PACKAGE BODY

4. Logging into the EM Repository database as the SYSMAN user and attempting to manually compile the invalid package bodies EM_MTM_PKG and EM_OMS_MONITOR fails with:

SQL> ALTER PACKAGE SYSMAN.EM_MTM_PKG COMPILE BODY;

Warning: Package Body altered with compilation errors.

SQL> show errors;
Errors for PACKAGE BODY SYSMAN.EM_MTM_PKG:

LINE/COL ERROR
-------- -----------------------------------------------------------------
4326/3 PL/SQL: SQL Statement ignored
4331/12 PL/SQL: ORA-04063: view "SYS.DBA_HIST_SNAPSHOT" has errors
4361/61 PL/SQL: ORA-04063: view "SYS.DBA_HIST_WR_CONTROL" has errors

SQL> ALTER PACKAGE SYSMAN.EM_OMS_MONITOR COMPILE BODY;

Warning: Package Body altered with compilation errors.

SQL> show errors;
Errors for PACKAGE BODY SYSMAN.EM_OMS_MONITOR:

LINE/COL ERROR
-------- -----------------------------------------------------------------
200/11 PL/SQL: SQL Statement ignored
202/18 PL/SQL: ORA-04063: view "SYS.DBA_HIST_SQLTEXT" has errors

Changes

AWR was de-installed in the EM repository database.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms