set heading off
set pages 9999
set linesize 500
set verify off
set echo off
SET FEED OFF
spool compile_invalid_object.sql
select 'alter '||object_type||' '||object_name||' compile;'
from user_objects
where status = 'INVALID'
and object_type in ('VIEW','FUNCTION','JAVA SOURCE','JAVA CLASS','PROCEDURE','PACKAGE','TRIGGER');
select 'alter package '||object_name||' compile body;'
from user_objects
where status = 'INVALID'
and object_type = 'PACKAGE BODY';
spool off
SET FEED ON
spool compile_invalid_object.log
@compile_invalid_object.sql
spool off[@more@]set heading off
set pages 9999
set linesize 500
set verify off
set echo off
SET FEED OFF
spool compile_invalid_object.sql
select 'alter '||object_type||' '||object_name||' compile;'
from user_objects
where status = 'INVALID'
and object_type in ('VIEW','FUNCTION','JAVA SOURCE','JAVA CLASS','PROCEDURE','PACKAGE','TRIGGER');
select 'alter package '||object_name||' compile body;'
from user_objects
where status = 'INVALID'
and object_type = 'PACKAGE BODY';
spool off
SET FEED ON
spool compile_invalid_object.log
@compile_invalid_object.sql
spool off
set pages 9999
set linesize 500
set verify off
set echo off
SET FEED OFF
spool compile_invalid_object.sql
select 'alter '||object_type||' '||object_name||' compile;'
from user_objects
where status = 'INVALID'
and object_type in ('VIEW','FUNCTION','JAVA SOURCE','JAVA CLASS','PROCEDURE','PACKAGE','TRIGGER');
select 'alter package '||object_name||' compile body;'
from user_objects
where status = 'INVALID'
and object_type = 'PACKAGE BODY';
spool off
SET FEED ON
spool compile_invalid_object.log
@compile_invalid_object.sql
spool off[@more@]set heading off
set pages 9999
set linesize 500
set verify off
set echo off
SET FEED OFF
spool compile_invalid_object.sql
select 'alter '||object_type||' '||object_name||' compile;'
from user_objects
where status = 'INVALID'
and object_type in ('VIEW','FUNCTION','JAVA SOURCE','JAVA CLASS','PROCEDURE','PACKAGE','TRIGGER');
select 'alter package '||object_name||' compile body;'
from user_objects
where status = 'INVALID'
and object_type = 'PACKAGE BODY';
spool off
SET FEED ON
spool compile_invalid_object.log
@compile_invalid_object.sql
spool off
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/76065/viewspace-788504/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/76065/viewspace-788504/