Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: batch recompile invalid packages
You may use following code for compilation of objects:
set echo off
set termout off
set feedback off
set pages 0
set heading off
spool compile1.sql
/* alter_comp_orac.1.sql */
select 'alter '||object_type||'
'||owner||'.'||object_name||' compile ;'
from dba_objects
where owner not like 'SYS'
and object_type not in ('PACKAGE BODY','PACKAGE')
union
select 'alter PACKAGE '||owner||'.'||object_name||'
compile BODY ;'
from dba_objects
where owner not like 'SYS'
and object_type in ('PACKAGE BODY')
order by 1;
spool off
@compile1
Regards
Rafiq
From: "Armstead, Michael A" <maa25681_at_GlaxoWellcome.com>
Reply-To: ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
Subject: RE: batch recompile invalid packages
Date: Tue, 09 Jan 2001 07:40:51 -0800
I hope this question is as simple as it sounds. Try this:
ALTER object-type object-name COMPILE;
Hope this helps.
Michael Armstead
Database Administrator, OCP-Certified
Corporate & Finance Information Systems
Glaxo SmithKline
> -----Original Message-----
> From: John Dunn [SMTP:john.dunn_at_sefas.co.uk]
> Sent: Tuesday, January 09, 2001 7:11 AM
> To: Multiple recipients of list ORACLE-L
> Subject: batch recompile invalid packages
>
> Is there a easy way for me to easily recompile all my packages, functions
> for a user etc without doing a create/replace
>
> John
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: John Dunn
> INET: john.dunn_at_sefas.co.uk
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Armstead, Michael A INET: maa25681_at_GlaxoWellcome.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). _________________________________________________________________Received on Tue Jan 09 2001 - 12:29:08 CST
![]() |
![]() |