Avatar of Daniel Mina
Daniel Mina
 asked on

How to compile dbms_utility in oracle?

Hello Experts,
I want to know how to compile invalid SYS objects especially "SYS.DBMS_UTILITY" as I've many invalid objects in SYS schema and when I try to compile them I get the following error message:

ORA-20001: Cannot recompile SYS objects
ORA-06512: at "SYS.DBMS_UTILITY", line 387
ORA-06512: at line 1

Oracle version: 11.2 g

Thanks,
Daniel Mina.
* Oracle PL/SQLOracle Database* Oracle DBA

Avatar of undefined
Last Comment
Ora_Techie

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
slightwv (䄆 Netminder)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
johnsone

If after you run utlrp, there are still invalid objects take a look at DBA_ERRORS to see what's going on.
Ora_Techie

Check if you have any invalid component?

select comp_name
from dba_registry
where status ='INVALID'

Open in new window

slightwv (䄆 Netminder)

>> Check if you have any invalid component?


Components are different from objects/packages like dbms_utility.  You find those with:

select object_name, object_type
from dba_objects
where status=''INVALID';

Open in new window


Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Ora_Techie

My Idea was because author says there are many invalid objects under SYS which is not normal. It happened to me once after applying the bundle patch, many objects got invalid under SYS and they wouldn't recompile using utlrp. What was found that the CATPROC component got invalid so the solution was to recreate that by running catlog.sql & catproc.sql and then recompiling the objects by using utlrp.sql.