Microsoft KB Archive/922663

= BUG: Error message when you replicate a table to a SQL Server destination by using snapshot replication in SQL Server 2000: &quot;Bulk-copy commit failed (bcp_batch) ODBC message: SQLSTATE 37000, native error 4813&quot; =

Article ID: 922663

Article Last Modified on 11/2/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Workgroup Edition
 * Microsoft SQL Server 2000 Personal Edition

-



Bug #: 474952 (SQL Server 8.0)



SYMPTOMS
Consider the following scenario. In Microsoft SQL Server 2000, you replicate a table to a SQL Server destination by using snapshot replication. The table has a column of the text data type or of the image data type. In this scenario, you may experience one of the following symptoms if the column contains a null value or zero-length data:  The replication subscription fails, and you receive the following error message:

Bulk-copy commit failed (bcp_batch). ODBC message: SQLSTATE 37000, native error 4813, [Microsoft][ODBC SQL Server Driver][SQL Server]Expected the text length in data stream for bulk copy of text, ntext, or image data.

 The number of rows that are actually replicated does not match the number of rows that you expect to be replicated.



WORKAROUND
To work around this problem, specify a WHERE clause for the publication to filter out any null values or any zero-length data. To do this, follow these steps:  Start SQL Server Enterprise Manager. Right-click the publication that contains the table. Click Properties. In the Publication Properties dialog box, click the Filter Rows tab.</li> Double-click the article that contains the table.</li>  In the Specify Filter dialog box, enter a statement that resembles the following statement. SELECT <published_columns> FROM <TABLE> WHERE <YourColumnName> IS NOT NULL </li></ol>

Note When you use this workaround, the data in the other columns of the problematic row is no longer published.

<div class="status_section">

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

Keywords: kbexpertiseadvanced kbtshoot kbbug KB922663

-

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

© Microsoft Corporation. All rights reserved.