473,386 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

CLI Trace - Syntax Error

Hello,

DB2 LUW v8 FP15
I am running a simple 'runstats on table session.temp_MID_1 and
indexes all' and it fails with

[04/29/2008 13:25:49.902600] SQLAllocStmt( phStmt=4:2 )
[04/29/2008 13:25:49.902707] <--- SQL_SUCCESS Time elapsed -
+6.190000E-004 seconds

[04/29/2008 13:25:49.903030] SQLExecDirectW( hStmt=4:2,
pszSqlStr="RUNSTATS ON TABLE SESSION.TEMP_MID_1 AND INDEXES ALL",
cbSqlStr=52 )
[04/29/2008 13:25:49.903327] ---Time elapsed - +3.230000E-004
seconds
[04/29/2008 13:25:49.903457] ( StmtOut="RUNSTATS ON TABLE
SESSION.TEMP_MID_1 AND INDEXES ALL" )
[04/29/2008 13:25:49.903583]
[04/29/2008 13:25:49.903664] ( Package="SYSSH100 ",
Section=65 )
[04/29/2008 13:25:49.903813]
sqlccsend( Handle - 2010514272 )
sqlccsend( ulBytes - 169 )
sqlccsend( ) rc - 0, time elasped - +4.500000E-005
sqlccrecv( )
sqlccrecv( ulBytes - 213 ) - rc - 0, time elapsed - +1.919000E-003
[04/29/2008 13:25:49.906177] ( COMMIT REPLY RECEIVED=1 )
[04/29/2008 13:25:49.906634]

[04/29/2008 13:25:49.906748] SQLExecDirectW( )
[04/29/2008 13:25:49.906826] <--- SQL_ERROR Time elapsed -
+3.796000E-003 seconds

[04/29/2008 13:25:49.901761] SQLFreeStmt( )
[04/29/2008 13:25:49.901826] <--- SQL_SUCCESS Time elapsed -
+5.340000E-004 seconds

[04/29/2008 13:25:49.902088] SQLAllocStmt( hDbc=0:4,
phStmt=&a45fedc4 )
[04/29/2008 13:25:49.902325] ---Time elapsed - +2.620000E-004
seconds
[04/29/2008 13:25:49.902417] ( Re-using Cached Statement Structure=1 )
[04/29/2008 13:25:49.902529]

[04/29/2008 13:25:49.902600] SQLAllocStmt( phStmt=4:2 )
[04/29/2008 13:25:49.902707] <--- SQL_SUCCESS Time elapsed -
+6.190000E-004 seconds

[04/29/2008 13:25:49.903030] SQLExecDirectW( hStmt=4:2,
pszSqlStr="RUNSTATS ON TABLE SESSION.TEMP_MID_1 AND INDEXES ALL",
cbSqlStr=52 )
[04/29/2008 13:25:49.903327] ---Time elapsed - +3.230000E-004
seconds
[04/29/2008 13:25:49.903457] ( StmtOut="RUNSTATS ON TABLE
SESSION.TEMP_MID_1 AND INDEXES ALL" )
[04/29/2008 13:25:49.903583]
[04/29/2008 13:25:49.903664] ( Package="SYSSH100 ",
Section=65 )
[04/29/2008 13:25:49.903813]
sqlccsend( Handle - 2010514272 )
sqlccsend( ulBytes - 169 )
sqlccsend( ) rc - 0, time elasped - +4.500000E-005
sqlccrecv( )
sqlccrecv( ulBytes - 213 ) - rc - 0, time elapsed - +1.919000E-003
[04/29/2008 13:25:49.906177] ( COMMIT REPLY RECEIVED=1 )
[04/29/2008 13:25:49.906634]

[04/29/2008 13:25:49.906748] SQLExecDirectW( )
[04/29/2008 13:25:49.906826] <--- SQL_ERROR Time elapsed -
+3.796000E-003 seconds

[04/29/2008 13:25:49.906970] SQLGetSqlca( hEnv=0:0, hDbc=0:0,
hStmt=4:2, pSqlcaOut=&081c92a8 )
[04/29/2008 13:25:49.907233] ---Time elapsed - +1.440000E-004
seconds

[04/29/2008 13:25:49.907321] SQLGetSqlca( )
[04/29/2008 13:25:49.907393] <--- SQL_SUCCESS Time elapsed -
+4.230000E-004 seconds

[04/29/2008 13:25:49.907486]
SQLGetDiagFieldW( fHandleType=SQL_HANDLE_STMT, hHandle=4:2,
iRecNumber=1, fDiagIdentifier=Unknown value 2467, pDiagInfo=&a45fe47c,
cbDiagInfoMax=140, pcbDiagInfo=&a45fe478 )
[04/29/2008 13:25:49.907843] ---Time elapsed - +9.300000E-005
seconds

[04/29/2008 13:25:49.907956] SQLGetDiagFieldW( pDiagInfo=5570642,
pcbDiagInfo=140 )
[04/29/2008 13:25:49.908114] <--- SQL_SUCCESS_WITH_INFO Time
elapsed - +6.280000E-004 seconds

[04/29/2008 13:25:49.908218]
SQLGetDiagFieldW( fHandleType=SQL_HANDLE_STMT, hHandle=4:2,
iRecNumber=1, fDiagIdentifier=Unknown value 2461, pDiagInfo=&a45fe474,
cbDiagInfoMax=4, pcbDiagInfo=&a45fe478 )
[04/29/2008 13:25:49.908577] ---Time elapsed - +1.040000E-004
seconds

[04/29/2008 13:25:49.908658] SQLGetDiagFieldW( pDiagInfo=0,
pcbDiagInfo=0 )
[04/29/2008 13:25:49.908807] <--- SQL_SUCCESS Time elapsed -
+5.890000E-004 seconds

[04/29/2008 13:25:49.908908] SQLErrorW( hEnv=0:0, hDbc=0:0, hStmt=4:2,
pszSqlState=&a45fed14, pfNativeError=&a45fed10, pszErrorMsg=&a45fe50c,
cbErrorMsgMax=1024, pcbErrorMsg=&a45fe508 )
[04/29/2008 13:25:49.909343] ---Time elapsed - +1.010000E-004
seconds
[04/29/2008 13:25:49.909565] ( iRowNumber=-1, iColumnNumber=-2 )
[04/29/2008 13:25:49.909761]

[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 ?
Jun 27 '08 #1
1 1969
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 IMPORT, LOAD, EXPORT, etc.
directly via ODBC. However, the ADMIN_CMD stored procedure in v8 does
support 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/infoce...om.ibm.db2.udb
..doc/admin/r0012547.htm for details of ADMIN_CMD under v8.
Cheers,

Dave.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William | last post by:
i am using a dataset and a DataAdapter to update a table with the following schema: ResourceID ProjectID LastName FirstName Year Nov Dec Jan
3
by: Neil Zanella | last post by:
Hello, I am trying to execute ADO.NET INSERT statement where one of the fields is coming from a password HTML control. When I access the text with password.Value and print with Response.Write...
1
by: amitbadgi | last post by:
I am gettign this error while converting an asp application to asp.net , its a query syntax error, Exception Details: System.Runtime.InteropServices.COMException: Syntax error in query expression...
1
by: amitbadgi | last post by:
I am geting the following error while conv an asp to asp.net Exception Details: System.Runtime.InteropServices.COMException: Syntax error in query expression 'id =System.__ComObject'. Source...
1
by: amitbadgi | last post by:
HI i am getting the foll error while conv an asp application to asp.net Exception Details: System.Runtime.InteropServices.COMException: Syntax error in UPDATE statement. Source Error: Line...
5
by: amitbadgi | last post by:
Hi guys, I am getting the following error in teh insert statement , I am converting this asp application to asp.net, here is teh error, Exception Details:...
2
by: david | last post by:
Anyone could give me a hand about this syntax error? Thank you. David Source Code: Dim conn As New SqlConnection(strConn) Dim daAngio As New SqlDataAdapter(strSelectStatement, conn) 'Create a...
2
by: abedt | last post by:
I got the following error: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where...
8
by: KunalDesale | last post by:
Hi, I am using VB.NET and SQL Server 2005 for devlopement of one software. I am getting syntax error at run type only on live system. If try to recreate it on my machine with same data I don't get...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.