Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error: the row was not found at the subscriber when applying the replicated command Expand / Collapse
Author
Message
Posted Tuesday, June 16, 2009 7:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 08, 2011 6:21 AM
Points: 9, Visits: 191
Dear all,

I have configured peer to peer transactional replication with two servers (PRI, BCK)
I did the following scenario in testing:
1) I have Load Balance point to PRI server, Now when PRI and BCK servers are up, The synchronization is working fine from PRI to BCK
2) when BCK server is disconnected, then make it online, the synchronization return to work good
3) when PRI server disconnected the load balance switch to BCK server and theres no problem with this
4) after step (3) when PRI server is up, then when i check the synchronization it give the following error:

Error executing a batch of commands. Retrying individual commands
the row was not found at the subscriber when applying the replicated command.


i have traced the error using browsereplcommand and i have found there is a command trying to delete record according to ID but there is no records in both databases have this ID

the table that give the error contain the following trigger in both databases

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO

ALTER TRIGGER [dbo].[SysServicesLog_insert] ON [dbo].[SysServicesLog]
FOR INSERT
NOT FOR REPLICATION
AS
Declare
@ServiceType varchar(30)

Select @ServiceType = ServiceType
from inserted

DELETE FROM SysServicesLog WHERE ServiceType=@ServiceType AND SysServicesLogID NOT IN (Select

TOP 500 SysServicesLogID FROM SysServicesLog Where ServiceType=@ServiceType ORDER BY LogTimeStamp

desc)

I don't think there is problem with the trigger because its marked (Not For Replication) but maybe !!!

pls need help for this...

Thanks,



Post #735653
Posted Wednesday, June 17, 2009 10:45 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, August 15, 2011 12:53 PM
Points: 243, Visits: 236
I have run into this problem before, too. What I found that was a record was deleted by someone on the subscriber side. Transactional replication goes from publisher to subscriber, so when the subscriber's record got deleted, there was no way for the publisher to know that. So it all gets jammed up because its trrying to send a replication command for a record that no longer exists.

There is surely a better resolution for this, but I was in a hurry to get things running again. I ran the snapshot agent and had the subscription re-initialized so the day could continue. It was painful, but it got done.

After that, I ended up switching that table to snapshot replication (as it was before) because if that happened once, it was probably going to happen again. Snapshot doesn't care what you do on the subscriber - its gonna wipe it out and repopulate it anyway.




Randy
Post #736805
Posted Thursday, October 29, 2009 6:35 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 26, 2009 3:05 PM
Points: 2, Visits: 39


Hello!

Control 4 repliciones on the same server but different databases, only one of them fails, and sends the following error message

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

It confuses me that this is only one of 4 and all are configured the same way

I hope your help thanks.


Post #811313
Posted Friday, October 30, 2009 6:40 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 1:50 PM
Points: 3,287, Visits: 6,675
It is probably because someone deleted that row from the subscriber that is throwing the error. Try to reinitialize the article on the subscriber that is failing.


-Roy
Post #811516
Posted Wednesday, October 20, 2010 8:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 02, 2013 8:16 AM
Points: 4, Visits: 125
Instead of initializing the subscription, You can insert the deleted row in the subscriber database( if you have backup of table)
Then start the replication agent , It will fix the problem.

Best Regards
Ponnu
Post #1007786
Posted Wednesday, August 24, 2011 6:24 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, January 07, 2014 3:23 AM
Points: 115, Visits: 93
This may be a simple thing but... How can I find out which row was deleted ?

Thanks
Post #1164602
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse