Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > IBM DB2 > Re: CLI Trace -...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 8839 of 9366
Post > Topic >>

Re: CLI Trace - Syntax Error

by "Dave Hughes" <dave@[EMAIL PROTECTED] > Apr 29, 2008 at 12:49 PM

Michel Esber wrote:

> Hello,
> 
> DB2 LUW v8 FP15
> 
> 
> I am running a simple 'runstats on table session.temp_MID_1 and
> indexes all' and it fails with
> 
[snip]
> [04/29/2008 13:25:49.909835] SQLErrorW( pszSqlState="42601",
> pfNativeError=-104, pszErrorMsg="[IBM][CLI Driver][DB2/LINUX]
> SQL0104N  An unexpected token "RUNSTATS ON TABLE SESSION.TEM" was
> found following "BEGIN-OF-STATEMENT".  Expected tokens may include:
> "<collect_stats_start>".  SQLSTATE=42601
> ", pcbErrorMsg=205 )
> [04/29/2008 13:25:49.910104]     <--- SQL_SUCCESS   Time elapsed -
> +1.196000E-003 seconds
> 
> 
> 
> ? It couldnīt be more simple than 'runstats on table T and indexes
> all'. How do I find where is the syntax error ?

The problem is that RUNSTATS is a CLP command, not an SQL statement.
Therefore you can't (directly) execute it via an interface like ODBC
(or JDBC, etc), just as you can't use IM****T, LOAD, EX****T, etc.
directly via ODBC. However, the ADMIN_CMD stored procedure in v8 does
sup****t RUNSTATS, so you should be able to execute it via something
like:

CALL ADMIN_CMD('RUNSTATS ON TABLE SESSION.TEMP_MID_1 AND INDEXES ALL')

See
http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb
..doc/admin/r0012547.htm for details of ADMIN_CMD under v8.


Cheers,

Dave.
 




 2 Posts in Topic:
CLI Trace - Syntax Error
Michel Esber <michel@[  2008-04-29 10:08:47 
Re: CLI Trace - Syntax Error
"Dave Hughes" &  2008-04-29 12:49:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 13:01:59 CDT 2008.