Microsoft KB Archive/919646

= FIX: Error message when you use the Microsoft OLE DB Provider for DB2 (DB2OLEDB) to connect to an IBM DB2 database that is running on a Linux-based server: &quot;SQLSTATE: 42601, SQLCODE: -104&quot; =

Article ID: 919646

Article Last Modified on 12/4/2007

-

APPLIES TO


 * Microsoft Host Integration Server 2004 Standard Edition
 * Microsoft OLE DB Provider for DB2

-





SYMPTOMS
Consider the following scenario. You use the Sample Query option in the Data Access Tool (DAT) to connect to an IBM DB2 database that is running on a Linux-based server. In this scenario, you receive an error message that resembles the following:

Could not connect to data source :

One or more errors occurred during processing of command.

An unexpected token &quot;WHERE =BEGIN-OF-STATEMENT &quot; was found following &quot;&quot;.

Expected tokens may include: &quot;&quot;. SQLSTATE: 42601, SQLCODE: -104

An IBM DB2 database that is running on a Linux-based server may return one of the following server class strings during the Exchange Server Attributes negotiation:
 * QDB2/LINUX
 * QDB2/LINUX390
 * QDB2/LINUXIA64
 * QDB2/LINUXPPC
 * QDB2/LINUXPPC64
 * QDB2/LINUXZ64

Note The server class string that the database returns depends on the Linux operating system on which the IBM DB2 database is running.

You receive the error message because the Microsoft OLE DB Provider for DB2 (DB2OLEDB) does not recognize the server class strings. The OLE DB Provider for DB2 does not recognize the server class strings because the provider was not tested against the DB2 operating system environment.

The OLE DB Provider for DB2 is not officially supported for use with IBM DB2 databases that are running on Linux-based servers. The OLE DB Provider for DB2 supports the following IBM DB2 operating system environments:
 * IBM DB2 V7 and later versions for z/OS to support an SNA LU 6.2 or TCP/IP network connection
 * IBM DB2 for OS/400 V5R1, DB2 for i5/OS V5R3 and later versions to support an SNA LU 6.2 or TCP/IP network connection
 * IBM DB2 for Universal Database V8.1 and later versions for Windows and AIX operating systems to support a TCP/IP network connection

The supported IBM DB2 operating system environments and features are listed in the Installation Guide.htm file that is included with Microsoft Host Integration Server 2004.



MORE INFORMATION
The OLE DB Provider for DB2 has been updated to support IBM DB2 databases that are running on Linux-based servers. After you apply this feature, the OLE DB Provider for DB2 correctly recognizes the server class strings that are returned by DB2 databases that are running on Linux-based servers.

Microsoft Knowledge Base article 911174 also describes a similar software update to the OLE DB Provider for DB2. That software update adds support for IBM DB2 databases that are running on Sun Microsystems Solaris systems. For more information about the update in Microsoft Knowledge Base article 911174, click the following article number to view the article in the Microsoft Knowledge Base:

911174 Error message when you use Microsoft OLE DB Provider for DB2 (DB2OLEDB) to connect to an IBM DB2 database that is running on a Sun Microsystems Solaris system: &quot;SQLSTATE 58004, SQLCODE -901&quot;

Host Integration Server 2004
A supported feature that modifies the product's default behavior is now available from Microsoft, but it is only intended to modify the behavior that this article describes. Apply it only to systems that specifically require it. This feature may receive additional testing. Therefore, if the system is not severely affected by the lack of this feature, we recommend that you wait for the next Host Integration Server 2004 service pack that contains this feature.

To obtain this feature immediately, contact Microsoft Product Support Services. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this software update has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Note Because of file dependencies, the most recent fix that contains these files may also contain additional files.



Microsoft OLE DB Provider for DB2 1.0
A supported feature that modifies the product's default behavior is now available from Microsoft, but it is only intended to modify the behavior that this article describes. Apply it only to systems that specifically require it. This feature may receive additional testing. Therefore, if the system is not severely affected by the lack of this feature, we recommend that you wait for the next OLE DB Provider for DB2 1.0 release that contains this feature.

To obtain this feature immediately, contact Microsoft Product Support Services. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this software update has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

64-bit (x64) version
Note Because of file dependencies, the most recent fix that contains these files may also contain additional files.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Keywords: kbinfo kbfix kbqfe kbpubtypekc kbhotfixserver kbhis2004 kbdb2oledb KB919646

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.