miércoles, 9 de junio de 2010

ORACLE, Compila objetos invalidos

select 'alter ' || decode(object_type, 'PACKAGE BODY', 'PACKAGE', object_type)
|| ' ' || owner || '.' || object_name || ' compile'
|| decode(object_type, 'PACKAGE BODY', ' body;', ';')
from dba_objects
where status='INVALID'
order by owner,
decode(object_type, 'PACKAGE BODY', 'AAA', 'PACKAGE', 'AAB',
substr(object_type, 1, 3)) desc,
object_name;

No hay comentarios:

Publicar un comentario