Microsoft KB Archive/239458

= FIX: Replication: Problems Mapping Characters to DB2 OLEDB Subscribers =

Article ID: 239458

Article Last Modified on 10/5/2005

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q239458



BUG #: 55057,55058,55480 (SQLBUG_70)



SYMPTOMS
While replicating to subscribers running DB2 using the Microsoft OLEDB provider, certain datatypes are mapped incorrectly and nullability is not preserved. Also, when replicating to DB2 subscribers on MVS systems, the distribution agent fails with this error:

SQLCODE: -601 SQLSTATE: 42710

A SQL error has occurred. Please consult the documentation for your specific DB2 version for a description of the associated Native Error and SQL State.

-or-

SQLCODE: -302 SQLSTATE: 22001

The value of the input variable or parameter is invalid or too large for the target column or target value.



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next SQL Server service pack that contains this hotfix.

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

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:   File name   Platform

s70722i.exe Intel s70722a.exe Alpha NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.



MORE INFORMATION
Specific symptoms encountered due to this bug are:
 * If the publisher column was defined with NOT NULL, the subscriber table was created to allow NULLs.
 * VARCHAR datatypes (variable length) are mapped to CHAR (fixed length) datatypes on the subscriber.
 * The script file that contains the CREATE TABLE SQL statement being generated by the replication engine contains TAB characters that the DB2 subscriber on MVS was unable to handle. This results in the error with SQLCODE: -601 and SQLSTATE: 42710
 * Problems with binding in the OLEDB provider where if the source type is a CHAR datatype, then the scale of the destination column is supplied incorrectly in bytes instead of characters. The DB2 subscriber on MVS does strict checking on the parameter column length to verify that it is less or equal to the defined column length in the table. This results in the error with SQLCODE: -302 and SQLSTATE: 22001.

Keywords: kbbug kbfix kbqfe KB239458

-

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

© Microsoft Corporation. All rights reserved.