0

I am facing the error 20598 with Transactional Replication:

The row was not found at the Subscriber when applying the replicated command.

Normally this error occurs when an UPDATE or DELETE statement is executed by the publisher for a primary key value and the record (against which UPDATE/DELETE executed) does not exist in the subscriber database.

But in my case the scenario is different.

I diagnosed and found the record exists in the article/table of subscriber database, because when I executed the command (retrieved with help of sp_browsereplcmds) at the subscriber it executed successfully.

What may be the possible reason of it?

I'm using SQL Server 2016 both side.

3
  • how many subscriptions you have connected to your subscriber db?
    – user37701
    Commented Mar 28, 2018 at 3:19
  • Only one subscription for a publication. Commented Mar 28, 2018 at 10:49
  • Is it possible that the target row exists at subscriber, but was changed since last time it was synced from publisher? Commented May 4, 2020 at 7:39

1 Answer 1

1

What may be the possible reason of it?

There are multiple reasons that could cause this:

  1. It could be someone or a process/apps deleted and inserted the data in subscriber db (while cmds are being applied). Review your subscriber security settings and check what process/apps are accessing the subscriber db.
  2. Multiple publications connected to subscriber db. pub1 (deleted the data first) then pub2 tried to UPDATE/DELETE the data which could cause an error 20598.
  3. Triggers on subscriber tables that could delete/insert/update the data.

HTH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.