Re: Recompiling invalid objects with a batch file

From: Shakespeare <whatsin_at_xs4all.nl>
Date: Wed, 4 Jun 2008 12:59:22 +0200
Message-ID: <48467593$0$14361$e4fe514c@news.xs4all.nl>

"gazzag" <gareth_at_jamms.org> schreef in bericht news:f32a36ab-08f8-4dd4-9bca-7b0657f081f4_at_d45g2000hsc.googlegroups.com...
> On 3 Jun, 20:35, Ubiquitous <web..._at_polaris.net> wrote:
>>
>> I asked because I was unable to find them, but it might be because I
>> don't
>> have rights on those objects here.
>
> The syntax you're after is:
>
> ALTER <object_type> <object_name> RECOMPILE;
>
> So, in answer to your OP, you could refine the following script:
>
> SELECT 'ALTER '||object_type||' '||object_name||' COMPILE;'
> FROM user_objects
> WHERE status != 'VALID';
>
> Spool the output to a file. This will become your recompile script.
>
> HTH
>
> -g

But you would have to run this script serveral times when objects have dependencies......

Shakespeare Received on Wed Jun 04 2008 - 05:59:22 CDT

Original text of this message