OK, please clarify your platform (are you on DB2 for LUW?).
If you have a C Procedure you can of course use the runstats API just fine,
The point is that the API only works in C. So if you have any other
interface you're in for some sort of wrapper.
ADMIN_CMD() provides this wrapper. So I can submit an EXPORT, RUNSTATS and
other "commands" from any clinet/language which has an SQL interface.
Cheres
Serge
"Kevin Knaus " <db2udbdba-ezmlmshield-x12113711.[Email address protected]
wrote on 01/24/2006 10:20:05 AM:
> Serge,
>
> This leads to the question, 'Is ADMIN_CMD()required to do a RUNSTATS
> from a stored proc or is it just an option among other methods?"
>
> Because if you issue a "RUNSTATS" command with its various options from
> within a stored proc the proc will build and will run without failing
> even if you don't use ADMIN_CMD.
>
> Thank you,
>
> Kevin Knaus
> -----Original Message-----
> From: Serge Rielau
> [mailto:db2udbdba-ezmlmshield-x99493447.[Email address protected]
> Sent: Monday, January 23, 2006 10:58 PM
> To: LazyDBA Discussion
> Subject: RE: RUNSTATS from SP?
>
> It's an SQL API. All client interfaces support an SQL API to DB2. So you
> can do runstats from Java, .NET, SQL Procedures....
>
> Cheers
> Serge
>
> "Yao Sheila " <db2udbdba-ezmlmshield-x54225714.[Email address
> protected]
> wrote on 01/23/2006 05:58:06 PM:
>
> >
> > I wonder what is the difference or advantage by using system procedure
> > ADMIN_CMD to run stats or reorg?
> >
> >
> > Thanks.
> >
> > Have a nice day,
> >
> > Sheila Yao
> >
> > -----Original Message-----
> > From: Serge Rielau
> > [mailto:db2udbdba-ezmlmshield-x174015.[Email address protected]
> > Sent: Monday, January 23, 2006 4:15 PM
> > To: LazyDBA Discussion
> > Subject: Re: RUNSTATS from SP?
> >
> >
> > Try the ADMIN_CMD() procedure in DB2 V8.2 (I think)
> >
> >
> >
> > "Diego Figueira " <db2udbdba-ezmlmshield-x78095642.[Email address
> > protected] wrote on 01/23/2006 09:07:49 AM:
> >
> > > Hi all, is there a way to execute a RUNSTATS command from a Stored
> > > Procedure?
> > >
> > >
> > >
> > > Thanks!
> > >
> > >
> > >
> > > Diego
> > >
> > >
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> > > website: http://www.LazyDBA.com
> > > To unsubscribe: http://www.lazydba.com/unsubscribe.html
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> > website: http://www.LazyDBA.com
> > To unsubscribe: http://www.lazydba.com/unsubscribe.html
> >
> >
> >
> > ---------------------------------------------------------------------
> > PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> > website: http://www.LazyDBA.com
> > To unsubscribe: http://www.lazydba.com/unsubscribe.html
> >
>
>
>
> ---------------------------------------------------------------------
> PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> website: http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>
>
> ---------------------------------------------------------------------
> PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> website: http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
DB2 & UDB email list listserv db2-l LazyDBA home page