Invoking RUNSTATS dynamically from an application

Invoking RUNSTATS dynamically from an application

 

  

Hi Gurus,

We have mechanisms in our application where we will generate
statistics for our tables at strategic points. Currently, for Sybase,
SQLServer, and Oracle, we are able to do this within stored procedures.
A bit of reading of the documentation for DB2 suggests that this is
simply not possible within DB2. Am I not reading this correctly?

What is the best way to invoke RUNSTATS or the equivalent within our
application? My current options are from within stored procedures, or
from within a Java application using JDBC. I know that in a worst-case
scenario, I could always do this by kicking off a shell process that
runs a script, but I would really prefer to not take that route.

Thanks.

-- Bill Province
DB2 & UDB email list listserv db2-l LazyDBA home page