Article ID: 2663790 - View products that this article applies to.
Consider the following scenario:
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.
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.
Hotfix informationA 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];CNTACTMSNote 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.
PrerequisitesYou 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:
(http://support.microsoft.com/kb/2645939/ )Cumulative update package 2 for Host Integration Server 2009
File informationThe 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
For all supported versions of Microsoft Host Integration Server 2009, 64-bit (x64) editions
Collapse this tableExpand this table
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:
Note There are 10 space characters that are included between the quotation marks to indicate that the actual length of the parameter is 10.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
The Updategram that the BizTalk Adapter for DB2 uses to call DB2 Stored Procedures typically defines output parameters as follows:
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.