SQL_PLUS中
spool ExecCompProc.sql 
0select  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 .
  Begin
      Execute Immediate Strsql.
      Exception
          --When Others Then Null.     
     When OTHERS Then dbms_output.put_line(Sqlerrm).     
  End.
 End Loop.
End.
执行
exec Zl_Compile_Invalid_Procedure.
如果要看到无法重编译的过程的出错信息,需要执行前设置set serverout on 
 
 
								 
									
相关文章
									
Oracle智能代理与OMS的问题解决方法
oracle中的to_date参数含义
检查汉字串中是否有半角或非法字符
Ubuntu可移动Linux版本将于10月发布
在Oracle中重编译所有无效的存储过程-Oracle认证考试
UbuntuLinux下播放Real多媒体的方法
打造自己的Linux常用应用软件列表
LINUX综合辅导:LPI资格认证考试的注意事项
综合辅导:让archlinux更动听-dmix多音流
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛