set feedback off
set heading off
set linesize 1000
set pagesize 0
set pause off
set trimspool on
set verify off
spool tmp.sql;
select 'alter '||object_type||' '||owner||'.'||object_name||' compile;'
from dba_objects
where status = 'INVALID'
and object_type in ('FUNCTION','JAVA SOURCE','JAVA CLASS','PROCEDURE','PACKAGE','TRIGGER');
select 'alter package '||owner||'.'||object_name||' compile body;'
from dba_objects
where status = 'INVALID'
and object_type = 'PACKAGE BODY';
spool off;
@tmp[@more@]
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/631872/viewspace-815841/
,如需转载,请注明出处,否则将追究法律责任。