invalid.sql
set heading off;
set feedback off;
set echo off;
set lines 999;
spool run_invalid.sql
select 'ALTER ' || OBJECT_TYPE || ' ' ||
OWNER || '.' || OBJECT_NAME || ' COMPILE;'
from dba_objects
where status = 'INVALID'
and object_type in ('PACKAGE','FUNCTION','PROCEDURE')
;
spool off;
set heading on;
set feedback on;
set echo on;
@run_invalid.sql
REF: http://www.dba-oracle.com/t_recompile_recompliling_invalid_objects.htm
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。