IBM Support

SQL0104N when a reorg table command is issued from a CLI application

Troubleshooting


Problem

When a reorg table command is issued from a CLI application against a DB2 database server, the application fails with SQL0104N.

Symptom

For example:

Similar entries may be seen in a CLI trace:

SQLGetDiagRecW( fHandleType=SQL_HANDLE_STMT, hHandle=1:1, iRecNumber=1, pszSqlState=&02f0f684, pfNativeError=&02f0f750, pszErrorMsg=&03672b98, cbErrorMsgMax=512, pcbErrorMsg=&02f0f74c )

---> Time elapsed - +9.000000E-006 seconds

( iRowNumber=-1, iColumnNumber=-2 )

SQLGetDiagRecW( pszSqlState="42601", pfNativeError=-104, pszErrorMsg="[IBM][CLI Driver][DB2/SUN64] SQL0104N An unexpected token "test" was found following "reorg table ". Expected tokens may include: "JOIN". SQLSTATE=42601

", pcbErrorMsg=158 )

<--- SQL_SUCCESS Time elapsed - +4.752000E-003 seconds

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Programming Interface - CLI","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;9.1;10.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
01 May 2025

UID

swg21590305