SELECT ‘alter ‘
|| DECODE (object_type, ‘PACKAGE BODY’, ‘PACKAGE’, object_type)
|| ‘ ‘
|| owner
|| ‘.’
|| object_name
|| ‘ compile;’
FROM dba_objects
WHERE status = ‘INVALID’
/
Compile Invalid Objects in oracle
SELECT ‘alter ‘
|| DECODE (object_type, ‘PACKAGE BODY’, ‘PACKAGE’, object_type)
|| ‘ ‘
|| owner
|| ‘.’
|| object_name
|| ‘ compile;’
FROM dba_objects
WHERE status = ‘INVALID’
/