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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Script to find all invalid objects and recompile

Re: Script to find all invalid objects and recompile

From: <sybrandb_at_my-deja.com>
Date: Mon, 11 Dec 2000 09:02:33 GMT
Message-ID: <912578$s6n$1@nnrp1.deja.com>

In article <3a3108e9.0_at_208.200.21.197>,
  Daniel Navarro <"dnavarro"@(no_spam)intervoice.com> wrote:
>
> Hi all,
>
> Does anyone have a script that will go out and find all invalid
 objects
> and
> recompile them. Every time I alter a package or DB object it marks
 its
> dependents status as 'INVALID' even though nothing done adversely
> affects the dependent object. I guess this is just a safeguard that
> Oracle
> puts in. What I would really like is that every time I alter a
 package
> or
> database object and compile it, a script would also compile its
> dependents
> also.
>
> I am using Oracle Enterprise 8.1.6 R2 on Linux.
>
> Also does anyone know if Oracle 8.1.6 R3 comes with Enterprise
 Manager?
> Oracle claimed that they would bundle it with this release, but
 they've
> been
> known to fib.
>
> -Daniel N
> Software System Engineer
>
>

set feedback off pagesize 0
spool temp.sql
select 'alter '||object_type||' '||owner||'.'||object_name||' compile '||decode(object_type,'PACKAGE BODY','BODY','')||';' from dba_objects
where status = 'INVALID' and object_type in ('PROCEDURE','FUNCTION','PACKAGE','PACKAGE BODY','TRIGGER','VIEW') /
spool off
set feedback on pagesize 24
spool temp.log
@temp.sql
spool off
exit

Hth,

--
Sybrand Bakker, Oracle DBA

All standard disclaimers apply
------------------------------------------------------------------------


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Dec 11 2000 - 03:02:33 CST

Original text of this message

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