1. 程式人生 > >如何重新編譯PLSQL中的無效物件或者指定的物件

如何重新編譯PLSQL中的無效物件或者指定的物件

 Oracle   Tips,   Tricks   &   Scripts  
  1.   Topic:   Compiling   Invalid   Objects:  
   
  Oracle8i   and   Oracle9i   provides   a   script   called   utlrp.sql   located   in   $ORACLE_HOME/rdbms/admin   which   can   be   used   anytime   to   recompile   all   exisiting   PL/SQL   modules   (procedure,   functions,packages,triggers,   types,   and   views)   in   a   database.

編譯無效的物件:   $ORACLE_HOME/rdbms/admin/utlrp.sql    或者 編譯指定的物件:   過程:  
  alter   procedure   procedure_name   compile;  
  函式:  
  alter   function   function_name   compile;  
  包:  
  alter   package   package_name   compile;  
  包體:  
  alter   package   package_name   compile   body;