Technical Blog Post
Abstract
SQL0204N when accessing tables in Microsoft SQL Server through Db2 Federation
Body
You may receive the following error when accessing tables in Microsoft SQL Server:
SELECT count(*) FROM SRV1.DB1.TAB1
"DB1.TAB1 is an undefined name.. SQLCODE=-204, SQLSTATE=42704, DRIVER=4.19.56
In db2diag.log, the following messages reveal the actual error happens on Db2 server:
EDUID : 12345 EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, mssql wrapper, Mssql_Server::get_error_info, probe:7
MESSAGE : ODBC error txt:
DATA #1 : Hexdump, 796 bytes
0x000000011E21E920 : 5B46 6C75 6964 5175 6572 795D 5B4F 4442 [FluidQuery][ODB
0x000000011E21E930 : 4320 5351 4C20 5365 7276 6572 2057 6972 C SQL Server Wir
0x000000011E21E940 : 6520 5072 6F74 6F63 6F6C 2064 7269 7665 e Protocol drive
0x000000011E21E950 : 725D 5468 6520 4461 7461 4469 7265 6374 r]The DataDirect
0x000000011E21E960 : 2070 726F 6475 6374 2079 6F75 2061 7265 product you are
0x000000011E21E970 : 2061 7474 656D 7074 696E 6720 746F 2061 attempting to a
0x000000011E21E980 : 6363 6573 7320 6861 7320 6265 656E 2070 ccess has been p
0x000000011E21E990 : 726F 7669 6465 6420 746F 2079 6F75 2062 rovided to you b
0x000000011E21E9A0 : 7920 4942 4D20 666F 7220 6578 636C 7573 y IBM for exclus
0x000000011E21E9B0 : 6976 6520 7573 6520 7769 7468 2049 424D ive use with IBM
0x000000011E21E9C0 : 2046 6C75 6964 2051 7565 7279 2E20 2059 Fluid Query. Y
0x000000011E21E9D0 : 6F75 2061 7265 206E 6F74 206C 6963 656E ou are not licen
0x000000011E21E9E0 : 7365 6420 746F 2075 7365 2074 6869 7320 sed to use this
0x000000011E21E9F0 : 7072 6F64 7563 7420 7769 7468 2061 6E79 product with any
0x000000011E21EA00 : 2061 7070 6C69 6361 7469 6F6E 206F 7468 application oth
0x000000011E21EA10 : 6572 2074 6861 6E20 4942 4D20 466C 7569 er than IBM Flui
0x000000011E21EA20 : 6420 5175 6572 792E 2020 2049 6620 796F d Query. If yo
0x000000011E21EA30 : 7520 776F 756C 6420 6C69 6B65 2074 6F20 u would like to
0x000000011E21EA40 : 7075 7263 6861 7365 2074 6869 7320 7072 purchase this pr
0x000000011E21EA50 : 6F64 7563 7420 666F 7220 736F 6D65 206F oduct for some o
0x000000011E21EA60 : 7468 6572 2075 7365 2C20 706C 6561 7365 ther use, please
0x000000011E21EA70 : 2063 616C 6C20 3830 302D 3837 362D 3331 call 800-876-31
0x000000011E21EA80 : 3031 206F 7220 7669 7369 7420 4461 7461 01 or visit Data
0x000000011E21EA90 : 4469 7265 6374 2061 7420 7777 772E 6461 Direct at www.da
0x000000011E21EAA0 : 7461 6469 7265 6374 2E63 6F6D 2000 0000 tadirect.com ...
Verify your ODBC config file (ODBCINI parameter in db2dj.ini) has the following line:
[MSSQLSERVER]
QEWSD=xxxx
This property may be generated due to license issue. Remove this entry to eliminate the warning.
UID
ibm13285801