SET PAGESIZE 0
SET LINESIZE 80
SET FEEDBACK OFF
SET TERMOUT OFF
COLUMN command_line1 FORMAT A75
COLUMN command_line2 FORMAT A75
SPOOL recomp.cmd
SELECT 'ALTER ' || object_type || ' ' || object_name || 
		 ' COMPILE;' command_line1,
		 'SHOW ERRORS' command_line2
  FROM user_objects
 WHERE object_type IN ('PACKAGE', 'PACKAGE BODY', 'FUNCTION', 'PROCEDURE')
   AND status = 'INVALID'
/
SPOOL OFF
SPOOL recomp.lis
START recomp.cmd
SPOOL OFF

