Re: Recompiling invalid objects with a batch file
Date: Wed, 4 Jun 2008 02:51:21 -0700 (PDT)
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;'
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