DBMS_STATS becomes INVALID after Refresh/Database Upgrade


From ANARDB database alert log file .........../bdump/alert_ANARDB.log

ORA-12012: error on auto execute of job 282253
ORA-04063: ORA-04063: package body "SYS.DBMS_STATS" has errors

Observation:
************
SYS.DBMS_STATS Package Body is Invalid.
select object_name,object_type ,owner, status from dba_objects where object_name='DBMS_STATS';

OBJECT_NAME OBJECT_TYPE OWNER STATUS
-------------------- ------------------- ------------------------------ -------
DBMS_STATS PACKAGE SYS VALID
DBMS_STATS PACKAGE BODY SYS INVALID
DBMS_STATS SYNONYM PUBLIC VALID

Solution
*********
Rebuild/ Re-compile the DBMS_STATS Objects as

sqlplus "/ as sysdba";

@?/rdbms/admin/dbmsstat.sql
@?/rdbms/admin/prvtstas.plb
@?/rdbms/admin/prvtstat.plb

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: