Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE:batch recompile invalid packages

RE:batch recompile invalid packages

From: <R.RASAL_at_ponl.com>
Date: Tue, 9 Jan 2001 15:18:00
Message-Id: <10736.126143@fatcity.com>


One simple but tedious way is ,

alter package .... compile ; ( also 'compile body ' , for compiling the body )

You can prepare a script which contain such alter commands for all packages . The script can also be prepared by ,

SELECT 'alter package ' || OBJECT_NAME || ' compile ; ' FROM ALL_OBJECTS WHERE OBJECT_TYPE = 'PACKAGE' AND STATUS='INVALID'; SELECT 'alter package ' || OBJECT_NAME || ' compile body ; ' FROM ALL_OBJECTS WHERE OBJECT_TYPE = 'PACKAGE BODY' AND STATUS='INVALID'; Spool the output of above in a file ( say xxx.sql and run this xxx.sql file ) .

In recent versions of Oracle there is package , DBMS_UTILITY . With the procedure , DBMS_UTILITY.COMPILE_SCHEMA(schema_name) , will compile the store objects .

Cheers ,



Rahul Rasal
UK Mobile No. : 07787824194
Received on Tue Jan 09 2001 - 15:18:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US