terça-feira, 26 de novembro de 2013

21_Recompile_Invalid.sql


21_Recompile_Invalid.sql


alter session set nls_date_format='DD/MM/YY HH24:MI:SS';
col object_name format a30
select owner,object_name,object_type,last_ddl_time,status
from dba_objects
where status <> 'VALID'
and owner <> 'SYS'
/
set heading off;
select 'ALTER '||object_type||' '||owner||'.'||object_name||
CASE 
when object_type = 'PACKAGE BODY' Then ' Compile Body;'
else ' COMPILE;'
END
from dba_objects
where status <> 'VALID'
and owner <> 'SYS'
;

Nenhum comentário:

Postar um comentário