Search This Blog

Sunday, September 11, 2011

Script to Recompile all user level Objects

set heading off
set feedback off
spool x.dat

select 'alter ' || decode(object_type,'PACKAGE BODY','PACKAGE',object_type) || ' ' || object_name || ' compile ' || decode(object_type,'PACKAGE BODY',' body;',';')
from user_objects
where object_type in ('FUNCTION','PACKAGE','PACKAGE BODY','PROCEDURE','TRIGGER','VIEW')
and status = 'INVALID'
order by object_type , object_name;

spool off
set heading on
set feedback on
@x.dat
 

No comments:

Post a Comment