Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

Row Conflict issue with Replication in SQL Server

Sep 3 2011 9:40PM by Paresh Prajapati   

While i was working on the issue of replication and encountered issue with following error,

Command attempted:
if @@trancount > 0 rollback tran
(Transaction sequence number: 0x000CAB2A00038CB6003B00000000, Command ID: 2)

Error messages:
The row was not found at the Subscriber when applying the replicated command. (Source: MSSQLServer, Error number: 20598)

Below is the script through which, we can get the details like publisher database, Article id and article name. You need to pass sequence number which gives error details as mentioned above.

SELECT 
* 
FROM dbo.MSarticles m
WHERE EXISTS
(
SELECT mc.Article_id from MSrepl_commands mc
WHERE mc.xact_seqno = 0x000CAB2A00038CB6003B00000000
and mc.Article_id = m.article_id
)

Hope this help you to figure out the issue. I will post for more details for the same.

Read More..   [0 clicks]

Published under: SQL Server Tips ·  ·  ·  · 


Paresh Prajapati
6 · 22% · 7099
7
 
1
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

2  Comments  

  • When working on replication, it is not uncommon to have such conflicts. Typically what happens is the somebody (or something) changed the key column. Replication uses the ROWGUID column, and therefore, imagine this scenario:

    Assume that your ROWGUID is different from the primary keys: 1. Data is added to a table 2. Data replicates to the subscribers 3. Data row is deleted from the publisher and replication link removed manually 4. Data re-added via Import/Export data wizard or manually via script

    What would typically happen is that while one would manage to keep the primary keys the same, the ROWGUID changes. Therefore, you end up with a PKV on the subscriber because the publisher is trying to replicate data to the subscriber, which already exists.

    On the other hand, if the ROWGUID column value was not changed, either the replication meta-data still has the row marked as "deleted", or one ends up in a data conflict.

    In most cases that I have seen, replication issues are either due to bad data-cleanup scripts or poor application design.

    In this case, it looks as if the data row replicated to the subscriber was deleted at the subscriber instead of at the publisher. So, now, when the row is updated at the publisher, you end up in a conflict - a classic case of an incorrectly written data-cleanup script.

    commented on Sep 5 2011 4:54AM
    Nakul Vachhrajani
    4 · 33% · 10677
  • Yes Nakul,

    Thanks for sharing nice tip for replication issue. In may case Row Conflict issue occurred due to same article was added in different publication-subscriber, where subscribers are same in both. So during reinitialized, it had encountered with issue.

    commented on Sep 5 2011 5:35AM
    Paresh Prajapati
    6 · 22% · 7099

Your Comment


Sign Up or Login to post a comment.

"Row Conflict issue with Replication in SQL Server" rated 5 out of 5 by 7 readers
Row Conflict issue with Replication in SQL Server , 5.0 out of 5 based on 7 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]