Oracle Invalid Compile 스크립트



set heading off

set feedback off

set pages 1000

set verify off

spool allcompile.sql


SELECT 

'alter '||DECODE(object_type,'PACKAGE BODY',

'PACKAGE',object_type)||' '||owner||'.'||object_name||

' compile'||

DECODE(object_type,'PACKAGE BODY',' body;',';')

FROM dba_objects

WHERE object_type in ('VIEW','FUNCTION','TRIGGER','PROCEDURE','PACKAGE','PACKAGE BODY')

AND status='INVALID'

ORDER BY owner,decode

(object_type,'VIEW','A','FUNCTION','B',

'TRIGGER','C','PROCEDURE','D',

'PACKAGE','E','PACKAGE BODY','F')

,object_name

/


spool off



블로그 이미지

운명을바꾸는자

IT와 함께 살아가는 삶

,