Monday, February 03, 2014

Dynamically create a SQL script to recompile all INVALID objects

Dynamically create a SQL script to recompile all INVALID objects


set feedback off
set verify off
set echo off
set pagesize 0
set heading off

spool compile_invalid_objects.sql
select  'alter ' ||
       decode(object_type, 'PACKAGE BODY', 'package', object_type) ||
       ' ' ||
       object_name||
       ' compile' ||
       decode(object_type, 'PACKAGE BODY', ' body;', ';')
from   dba_objects
where  status = 'INVALID'
/
spool off
set feedback on
set verify on
set heading on
set pagesize 40
@compile_invalid_objects

No comments:

Integrate Oracle ADF with Oracle E-Business Sutie 12.2 ASCP Instance

Integrate Oracle ADF with Oracle E-Business Suite 12.2 ASCP Instance for  SPWA - Supply Planning Work Area What is  Oracle ADF? Orac...