How do you determine the SQL query that failed in peer-to-peer replication?

  •  

    Hello,

    We are seeing error MSSQL_ENG020598 - "The row was not found at the Subscriber when applying the replicated command", when running peer to peer transactional replication.  Unfortunately the error message provides the database in which the error occurs but not the table or SQL statement that causes the conflict.

    Is there a way to determine exactly what query caused the conflict - or at least what table the error occurred in?

    Thanks in advance.

  • Check this..

    http://msdn2.microsoft.com/en-us/library/ms151174.aspx

    This error is raised in transactional replication if the Distribution Agent attempts to update a row at the Subscriber, but the row has been deleted or the primary key of the row has been changed. By default, Subscribers to transactional publications should be treated as read-only, because changes are not propagated back to the Publisher. For transactional replication, user changes should be made at the Subscriber only if updatable subscriptions or peer-to-peer replication is used.

     

    MohammedU
    Microsoft SQL Server MVP

  • Thanks for your reply. I had seen this article, however it didn't seem to point me in the right direction.

    What I was trying to find was what SQL statement caused the error? Or at least what table the error occurred in.

    From my understanding, if any errors occur when skipErrors is not enabled, it stops all replication from happening. This makes it hard to determine what the inconsistency is when running the table diff utility, as all queries after the error are now reported.

    I am looking for a way to determine what query is causing the conflict.

    Any help would be greatly appreciated.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply