Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Invalid Package under SYS
I suggest you try running again that script, maybe something need to be
recompiled first.
Then I think you'll have to do manually
Run this query, this will show which are invalid, and then recompile one by one
If there is a compilation error, for example Oracle can't found a table, you will get that specific error.
select
decode( OBJECT_TYPE, 'PACKAGE BODY',
'alter package ' || OWNER||'.'||OBJECT_NAME || ' compile body;',
'alter ' || OBJECT_TYPE || ' ' || OWNER||'.'||OBJECT_NAME || ' compile;' )
from
dba_objects a
where
STATUS = 'INVALID' and
OBJECT_TYPE in ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
'TRIGGER', 'VIEW' )
order by
DECODE( OWNER,'DAZ',1,'ADM',2,3),
OBJECT_TYPE,
OBJECT_NAME;
Juan Carlos Reyes Pacheco
OCP
Database 9.2 Standard Edition
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Mon Apr 26 2004 - 16:45:41 CDT
![]() |
![]() |