none
SQLServer replication error "The row was not found at the Subscriber when applying the replicated command"

    Question

  • i have an error with replication when start sync process "The row was not found at the Subscriber when applying the replicated command"

    after this error i copy manually data from publisher to subscriber....so my question is:

    is possible to clean the script log that sync process should be use and reset sync from this last situation?it's correct question?

    i tryed to re-inizialize subscriber but without solution :( Somebody know wich steps should do to resolve this problem?

    thanks in advance!

    Friday, August 23, 2013 12:02 PM

Answers

All replies

  • You get that error when someone deletes records at the subscriber.  There are a few options for resolving the problem.

    1. Copy the row(s) from the publisher which were deleted from the subscriber back to the subscriber.
    2. Create a new snapshot and re-initialize the subscriber.
    3. In Replication Monitor, go to the distribution agent for the subscriber and right click on it.  Then left click Agent Profile.  In the window that opens you should see a profile named Continue on data consistency errors.  Check that profile and click the OK button.  When the agent retries it should skip the problems.  Don't forget to set the agent back to the original profile it was using once you have resolved the problems.

    Basically the distributor is attempting to replicate update or delete commands from the publisher to the subscriber and since the rows don't exist on the subscriber you are being alerted to the problem.

    Finally, in the future, don't delete data from the subscriber.



    Friday, August 23, 2013 1:06 PM
  • The error The row was not found at the Subscriber when applying the replicated command can happen for a variety of reasons.

    As Ed mentioned, this can happen if the row was deleted by a user at the Subscriber.  This should not occur as data at the Subscriber should be treated as read-only with Transactional Replication.

    There are other reasons you may receive the error The row was not found at the Subscriber when applying the replicated command described in FIX: Some changes may not be replication to the subscriber correctly in SQL Server 2005 or in SQL Server 2008 when the sum of parameters exceeds 2,100 and in Exploration into "Row was not found".

    You will need to investigate why you are getting the row was not found error and determine if it is a recurring problem or a 1 time event.  Consider doing a data validation to see how out your Publisher and Subscriber are.

    As Ed mentioned, you can manually get the data back in sync using tablediff utility, SQL Data Compare, or some other tool.  Alternatively, you can reinitialize the Subscriber to get everything back in sync.


    Brandon Williams (blog | linkedin)

    Friday, August 23, 2013 3:42 PM
    Moderator