set pagesize 0
set serveroutput on
@ioa
spool off
spool do_recomp
DECLARE
    CURSOR c_recompiles IS select 'alter '||object_type||' '||object_name||' compile;' stmt
			    from user_objects
			    where object_type in ('PROCEDURE','PACKAGE','FUNCTION');
BEGIN
    FOR v IN c_recompiles LOOP
	dbms_output.put_line(v.stmt);
	dbms_output.put_line('show err');
    END LOOP;
end;
/

spool off
spool recomp
@do_recomp.lst
spool off
