| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: analyze table inside a procedure?
Use dbms_utility.analyze_object for individual objects Use dbms_utility.analyze_schema for the complete schema. If you are on 8i (and *please, please always specify the version you are running*) you could also use execute immediate 'analyze table ...'
Hth,
Sybrand Bakker, Oracle DBA
"gdas" <gdas1NOgdSPAM_at_yahoo.com.invalid> wrote in message
news:2e4c521a.94171b32_at_usw-ex0108-063.remarq.com...
> Is there something special that must be done in order to analyze
> a table from inside a procedure? Is this not supported?
>
> I have about 100 tables I want to analyze in the procedure, but
> for simplicity's sake, I've only included one table here (same
> error)
>
> create or replace procedure gather_stats
> as begin
>
> begin
> ANALYZE TABLE account ESTIMATE STATISTICS;
>
> end;
> end;
>
>
> I get the following error:
>
> PLS-00103: Encountered the symbol "TABLE" when expecting one of
> the following:
> := . ( @ % ;
>
> Does anyone know what's happening?
> Thanks in advance,
> Gavin
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
>
Received on Mon Jun 19 2000 - 00:00:00 CDT
![]() |
![]() |