Re: Recompiling invalid objects with a batch file
From: gazzag <gareth_at_jamms.org>
Date: Wed, 4 Jun 2008 02:51:21 -0700 (PDT)
Message-ID: <f32a36ab-08f8-4dd4-9bca-7b0657f081f4@d45g2000hsc.googlegroups.com>
> I asked because I was unable to find them, but it might be because I don't
> have rights on those objects here.
Date: Wed, 4 Jun 2008 02:51:21 -0700 (PDT)
Message-ID: <f32a36ab-08f8-4dd4-9bca-7b0657f081f4@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 Received on Wed Jun 04 2008 - 04:51:21 CDT