IBM Support

Microsoft SQL Server JDBC driver 7.4.1 fails to return column metadata when table name includes underscore character

Troubleshooting


Problem

No column metadata is retrieved when the name of a database object (i.e. table or view) includes an underscore character.

Symptom

Cognos Analytics retrieves metadata via the DatabaseMetadata interface implemented by a JDBC driver. No column metadata is retrieved when the object name includes an underscore.

Cause

The JDBC DatabaseMetadata interface methods accept values used to scope the metadata which should be retrieved. Several methods support pattern matching characters where JDBC uses the underscore character to match any single character and percentage as a wildcard.
When Cognos Analytics calls a method such as DatabaseMetadata.getColumns, it will pass the name of a database object (i.e. table). Should the name include either JDBC meta character, Cognos Analytics will escape those characters with an escape character.
Microsoft's 7.4.1 JDBC driver incorrectly handles parameter values where characters in a name include an escaped character
https://github.com/microsoft/mssql-jdbc/issues/1139

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"Component":"","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
05 February 2020

UID

ibm11073792