FIX: Incorrect output parameter data for CHAR or VARCHAR data types may be returned when you use the BizTalk Adapter for DB2 to call DB2 Stored Procedures

Article translations Article translations
Article ID: 2663790 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • You use the Microsoft BizTalk Adapter for DB2 to call DB2 Stored Procedures.
  • The DB2 Stored Procedure includes one or more output parameters that are defined as CHAR or VARCHAR data types.
  • One of the following updates is applied for Microsoft Host Integration Server 2009 or for Microsoft BizTalk Adapters for Host Systems 2.0:
    • 2538036 FIX: Incorrect data may be inserted into DB2 graphic data types when you use Host Integration Server 2009 data providers
    • 2587090 Cumulative update package 1 for Host Integration Server 2009
    • 2645939 Cumulative update package 2 for Host Integration Server 2009

In this scenario, the data returned for the CHAR or VARCHAR output parameters may be incorrect. The actual data returned is not deterministic because it can be random character data.

When this problem occurs, IBM DB2 may return an error message that resembles the following:
01004 The value of a string was truncated when assigned to another string data type with a shorter length.

Note The actual error message may vary, depending on the IBM DB2 version where the Stored Procedure is defined.

CAUSE

The BizTalk Adapter for DB2 uses metadata that is obtained from DB2 in a query to determine the size (length) of output parameters before the BizTalk Adapter for DB2 calls the Stored Procedure.

This process works correctly when you use Host Integration Server 2009 or BizTalk Adapters for Host Systems 2.0.

A change is included in the updates that are listed in the "Symptoms" section for the Host Integration Server 2009 DB2 Data providers. This change alters the behavior. After the updates are applied, the BizTalk Adapter for DB2 uses the parameter definition from the Updategram as the length for CHAR and VARCHAR output parameters. If the actual length of the output parameter is longer than defined in the Updategram, DB2 reports an error, and invalid data is returned for the parameter.

RESOLUTION

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 the problem described in this article. 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. The hotfix that resolves this issue is included in cumulative update package 3 for Host Integration Server 2009.

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 website:
http://support.microsoft.com/default.aspx?scid=fh;[LN];CNTACTMS
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.

Prerequisites

You must have cumulative update package 2 for Microsoft Host Integration Server 2009 installed to apply this hotfix. For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2645939 Cumulative update package 2 for Host Integration Server 2009

File information

The English (United States) version of this hotfix uses a Microsoft Windows Installer package to install the hotfix. The dates and the times for these files are listed in Coordinated Universal Time (UTC) in the following table. When you view the file information, the date 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.
For all supported versions of Microsoft Host Integration Server 2009, 32-bit (x86) editions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Msdrda.dll8.0.3927.2882,89613-Apr-201220:44x86

For all supported versions of Microsoft Host Integration Server 2009, 64-bit (x64) editions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Msdrda.dll8.0.3927.2882,89613-Apr-201220:44x86
Msdrda.dll8.0.3927.21,531,60013-Apr-201220:46x64

WORKAROUND

To work around this problem, change the Updategram to include the correct length for the CHAR and VARCHAR output parameters. For example, if the output parameter is defined as a CHAR(10) in the DB2 Stored Procedure, the Updategram includes a statement that resembles the following:
OUT_PARM1="          "
Note There are 10 space characters that are included between the quotation marks to indicate that the actual length of the parameter is 10.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

The Updategram that the BizTalk Adapter for DB2 uses to call DB2 Stored Procedures typically defines output parameters as follows:
OUT_PARM1=""

The output parameters are blank (null). However, they are present and quoted. In this case, the BizTalk Adapter for DB2 uses a length of 1 for the CHAR and VARCHAR output parameters. If the actual length of the parameters is longer than 1, the problem that is described in the "Symptoms" section occurs.

Properties

Article ID: 2663790 - Last Review: April 25, 2012 - Revision: 1.0
APPLIES TO
  • Microsoft Host Integration Server 2009
  • Microsoft BizTalk Adapters for Host Systems 2.0
Keywords: 
kbqfe kbfix kbexpertiseinter kbsurveynew kbbug kbhotfixserver kbautohotfix KB2663790

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com