June 16, 2009 at 7:34 am
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,
June 17, 2009 at 10:45 am
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
October 29, 2009 at 6:35 pm
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.
October 30, 2009 at 6:40 am
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
October 20, 2010 at 8:44 am
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
August 24, 2011 at 6:24 am
This may be a simple thing but... How can I find out which row was deleted ?
Thanks
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply