Script: Compile All Invalid Objects

-- ======================================================================================== -- Compile all Invalid objects --      PACKAGE BODY: --			alter package owner.package_body_name compile BODY; -- --	  All Others: --			alter object_type owner.object_name compile; -- ======================================================================================== SELECT 'alter ' || decode(owner,'PUBLIC','public ',' ') || decode(object_type,'PACKAGE BODY','PACKAGE','TYPE BODY','TYPE',object_type) FROM dba_objects WHERE status <> 'VALID';
 * ' ' || decode(owner,'PUBLIC','',owner || '.') || object_name || ' compile '
 * decode(object_type,'PACKAGE BODY','body','TYPE BODY','body','') || ';'