BUG: Immediate Updating Subscriber May Fail If a Text Column Comes Before Primary Key
ID: Q245833
|
The information in this article applies to:
-
Microsoft SQL Server version 7.0
BUG #: 56535 (SQLBUG_70)
SYMPTOMS
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.
WORKAROUND
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.
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.
STATUS
Microsoft has confirmed this to be a problem in SQL Server version 7.0.
MORE INFORMATION
For example, the following table will 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)
Additional query words:
repl datatype 2pc
Keywords : SSrvDRI SSrvRep kbbug7.00 kbSQLServ700bug
Version : winnt:7.0
Platform : winnt
Issue type : kbbug