Search This Blog

Sunday, September 11, 2011

Script to Check Invalid Objects in a Database


Select decode( object_type, 'PACKAGE BODY', 'ALTER PACKAGE ' || owner ||'.' || OBJECT_NAME || ' COMPILE BODY;','ALTER ' || owner ||'.'|| OBJECT_TYPE || ' ' || OBJECT_NAME || ' compile;' )
from dba_objects
where status = 'INVALID'
order by object_type;

No comments:

Post a Comment