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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ANALYZE in a stored procedure

Re: ANALYZE in a stored procedure

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 06 Jan 2000 19:50:20 +0800
Message-ID: <3874817C.4C7C@yahoo.com>


Michael G. Schneider wrote:
>
> Thank's a lot for the answer. I didn't know that before.
>
> Michael G. Schneider
> mailto:mgs_at_mgs-software.de
>
> Sybrand Bakker <postmaster_at_sybrandb.demon.nl> schrieb in im Newsbeitrag:
> 947157361.21109.0.pluto.d4ee154e_at_news.demon.nl...
> > This is ddl and ddl is not allowed in pl/sql directly.
> > You need to call dbms_utility.analyze_object (or
> dbms_system.analyze_object,
> > I don't remember).
> >
> > Hth,
> > --
> > Sybrand Bakker, Oracle DBA
> > Michael G. Schneider <mgs_at_mgs-software.de> wrote in message
> > news:851pnk$8ab$1_at_ssauraac-i-1.production.compuserve.com...
> > > Probably a beginner's question. Sorry ...
> > >
> > > I want to write a stored procedure, which analyzes the statistics. So I
> > try
> > > to write
> > >
> > > CREATE OR REPLACE PROCEDURE P_SysCreateStatistik
> > > AS
> > > BEGIN
> > > ANALYZE TABLE tbl COMPUTE STATISTICS;
> > > END;
> > > /
> > > SHOW ERRORS;
> > >
> > > But Oracle tells me "found the word TABLE, when one of the following is
> > > expected ...". The ANALYZE-statement is correct, when being entered in
> SQL
> > > Plus directly.
> > >
> > > Michael G. Schneider
> > > mailto:mgs_at_mgs-software.de
> > >
> > >
> >
> >

or dbms_utility.execute_ddl_statement

(or thereabouts)
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Thu Jan 06 2000 - 05:50:20 CST

Original text of this message

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