SQL_PLUS中
spool ExecCompProc.sql
select 'alter procedure 'object_name' compile;' From all_objects where status = 'INVALID' and object_type = 'PROCEDURE';
spool off
@ExecCompProc.Sql;
整理成一个存储过程
Create Or Replace Procedure Zl_Compile_Invalid_Procedure As
Strsql Varchar2(200);
Begin
For x In (Select Object_Name From All_Objects Where Status = 'INVALID' And Object_Type = 'PROCEDURE') Loop
Strsql := 'Alter Procedure ' x.Object_Name ' Compile&...[ 查看全文 ]