Troubleshooting
Problem
On early iterations of DB2 for Linux, Unix and Windows version 9.7 (GA and Fix Pack 1), it is possible that calling CLI/ODBC metatdata functions (e.g. SQLTables, SQLColumns, etc) or the corresponding JDBC functions (e.g. DatabaseMetaData.getTables () ) will fail with SQLCODE -104 (SQL0104N, syntax error).
Symptom
The error message will be similar to the following:
SqlCode = -104
SqlErrd = { -2145779603, 0, 0, 0, -705, 0 }
SqlErrmc = ?;L K(;(
SqlErrmcTokens = { ?, L K(, ( }
SqlErrp = SQLNP021
SqlState = 42601
SqlWarn =
or
SQL0104N An unexpected token "?" was found following "L K(". Expected tokens may include: "(".
To see the full list of affected functions:
For JDBC, please refer to 'Table 11. Support for DatabaseMetaData methods' in the DB2 version 9.7 Information Center document 'Driver support for JDBC APIs' (link below).
For ODBC/CLI, please refer to the section 'Obtaining information about the data source's system tables (catalog functions)' in the DB2 version 9.7 Information Center document 'CLI and ODBC function summary' (link below).
[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Connectivity - DRDA","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","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.
Was this topic helpful?
Document Information
Modified date:
11 June 2026
UID
swg21445705