Article ID: 919474 - Last Review: December 4, 2007 - Revision: 2.3

FIX: If a SQL Server linked server uses Host Integration Server 2004 Microsoft OLE DB Provider for DB2, the query execution time may be slower than expected when the query uses a four-part name syntax

Hotfix download is availableHotfix Download Available
View and request hotfix downloads

On This Page

Expand all | Collapse all

SYMPTOMS

Consider the following scenario. You perform a query against an IBM DB2 database. The query uses a four-part name syntax. In this scenario, the query execution time may be slower than expected.

For example, the query execution time may be slower than expected when you perform a query that resembles the following:
SELECT * FROM LINKED_SERVER.CATALOG1.SCHEMA1.DB2_TABLE  WHERE COLUMN1 = '12345'
If the query uses the OPENQUERY syntax, the query execution time is faster than if the query uses a four-part name syntax. For example, the query execution time is faster when you perform a query that resembles the following:
SELECT * FROM OPENQUERY(LINKED_SERVER, ‘SELECT * FROM SCHEMA1.DB2_TABLE  WHERE COLUMN1 = '12345'’)
You experience this problem if a Microsoft SQL Server linked server uses Microsoft Host Integration Server 2004 Microsoft OLE DB Provider for DB2 to access the IBM DB2 database.

CAUSE

The following list describes the common reasons that this problem may occur:
  • The distributed query processor in SQL Server may execute the query statement multiple times. Each execution of the query statement adds to the overall query execution time.
  • The format of the query statement may cause some of the execution or all the execution to be performed locally by SQL Server instead of remotely on the IBM DB2 system. This may include query statements that include WHERE clauses or LIKE clauses. Therefore, more query data may be returned to SQL Server than is required for the particular query.

RESOLUTION

Microsoft Host Integration Server 2004

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
File information
The English version of this hotfix 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.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformSP requirement
Db2oledb.dll6.0.2043.0488,44817-Aug-200622:38x86SP1
Db2oledb.hNot Applicable24,51617-Aug-200622:43Not ApplicableSP1
Ddmstr.dll6.0.2043.044,03217-Aug-200622:38x86SP1
Drdaresync.exe6.0.2043.0337,40817-Aug-200622:38x86SP1
Microsoft.hostintegration.dataaccesslibrary.dll6.0.2043.086,01617-Aug-200622:38x86SP1
Microsoft.hostintegration.dataaccesstool.exe6.0.2043.02,703,36017-Aug-200622:38x86SP1
Microsoft.hostintegration.msdb2client.dll6.0.2043.0114,68817-Aug-200622:38x86SP1
Mseidb2c.dll6.0.2043.071,68017-Aug-200622:38x86SP1
Mseidb2d.dll6.0.2043.0435,20017-Aug-200622:38x86SP1
Mseidrda.dll6.0.2043.0695,80817-Aug-200622:38x86SP1
Note Because of file dependencies, the most recent hotfix that contains these files may also contain additional files.

Microsoft OLE DB Provider for DB2 version 1.0

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
File information
The English version of this hotfix 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.

32-bit x86-based version
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Db2oledb.dll7.0.2523.0515,34423-Aug-200621:38x86
Microsoft.hostintegration.dataaccesslibrary.dll7.0.2523.02,554,71223-Aug-200621:39x86
Microsoft.hostintegration.dataaccesstool.exe7.0.2523.0617,29623-Aug-200621:38x86
Mseidrda.dll7.0.2523.0781,07223-Aug-200621:39x86
Snanls.dll7.0.2523.0105,22423-Aug-200621:38x86
64-bit x64-based version
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformService branch
Db2oledb.dll7.0.2523.0757,52023-Aug-200621:37x64Not Applicable
Microsoft.hostintegration.dataaccesslibrary.dll7.0.2523.02,550,61623-Aug-200621:37x64Not Applicable
Microsoft.hostintegration.dataaccesstool.exe7.0.2523.0613,20023-Aug-200621:37x64Not Applicable
Mseidrda.dll7.0.2523.01,355,53623-Aug-200621:37x64Not Applicable
Snanls.dll7.0.2523.0128,77623-Aug-200621:37x64Not Applicable
Db2oledb.dll7.0.2523.0515,34423-Aug-200621:37x86SYSWOW
Mseidrda.dll7.0.2523.0781,07223-Aug-200621:37x86SYSWOW
Snanls.dll7.0.2523.0105,22423-Aug-200621:36x86SYSWOW
Note Because of file dependencies, the most recent hotfix 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 "Applies to" section.

MORE INFORMATION

This hotfix is designed to address the second reason that is described in the "Cause" section.

Microsoft OLE DB Provider for DB2 has been updated to support a writeable DBPROP_MAXROWS property. Therefore, SQL Server may retrieve less query data when SQL Server runs a four-part name query. Before you apply this hotfix, Microsoft OLE DB Provider for DB2 exposes the DBPROP_MAXROWS property as a read-only property. This read-only property has a default value of 0. Because the DBPROP_MAXROWS property is set to 0, SQL Server retrieves the whole table every time that a data query call is made.

The updated DBPROP_MAXROWS property that is included in this hotfix lets the distributed query processor in SQL Server set this property to 1. If this property is set to 1, SQL Server retrieves a limited number of rows of data from the IBM DB2 database instead of retrieving the whole table. Therefore, the four-part name query finishes running sooner.

Note The performance improvement that you experience depends on the format of the four-part name query together with the specific environment in which Microsoft OLE DB Provider for DB2 is used.

For more information about the DBPROP_MAXROWS property, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/ms723104.aspx (http://msdn2.microsoft.com/en-us/library/ms723104.aspx)
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
824684  (http://support.microsoft.com/kb/824684/ ) Description of the standard terminology that is used to describe Microsoft software updates
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.

APPLIES TO
  • Microsoft Host Integration Server 2004 Standard Edition
  • Microsoft Host Integration Server 2004 Enterprise Edition
  • Microsoft OLE DB Provider for DB2
Keywords: 
kbautohotfix kbbug kbfix kbhotfixserver kbqfe kbpubtypekc KB919474
 

Article Translations

 

Related Support Centers