This article was previously published under Q245833
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 56535 (SQLBUG_70)
The triggers that are generated and placed on the subscribing tables will not correctly identify the primary key columns if all of the following conditions are true:
The table participates in transactional replication with immediate-updating subscribers.
A text (or image or ntext) column occurs before the primary key column.
The subscriber connects back to the publisher to perform its two-phase commit using a dynamic remote procedure call (RPC).
This can lead to the following errors being generated when the subscribing table is updated:
Server: Msg 20515, Level 16, State 1, Procedure sp_MSreplraiserror, Line 9 Updatable Subscribers: Rows do not match between Publisher and Subscriber. Refresh rows at Subscriber.
Server: Msg 21054, Level 16, State 1, Procedure sp_MSreplraiserror, Line 16 Updatable Subscribers: RPC to Publisher failed.
Server: Msg 20512, Level 16, State 1, Procedure sp_MSreplraiserror, Line 8 Updatable Subscribers: Rolling back transaction.
To work around this problem, use any of the following:
Restructure the table so that the primary key is before the text column.
Do not replicate the text column.
Change the data type of the text column to varchar.
Use a static RPC, rather than a dynamic RPC, to connect back to publisher.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
For example, the following table does not create the error:
create table tab (colPK int primary key,...,colText text)
But this table will:
create table tab (colText text,...,colPK int primary key)
For more information about static and dynamic RPCs, see the "Configuration Modes" section of the Administration of Immediate-updating Subscribers topic in the SQL Server 7.0 Books Online.