October 7, 2005 at 7:14 am
Hi there,
One of my replication jobs is failing because of a bad command ("delete" command fails because of a constraint violation). I realize I can just start from scratch and resync databases etc., but before I do that, I was wondering if there is a way to just remove the bad command that is marked for Replication?
Thanks,
Peter
October 7, 2005 at 7:23 am
What type of replication?
I don't know if it will be the same in your implementation, but on ours you can look at the error and it will give you an xact_seqno and some more info. You can search in the msrepl_commands table, Distribution database for that xact_seqno and see it. You can delete the row from there (standard disclaimers apply - stop user access to the database, I would run a backupof the replicated database, distribution, etc. before trying anything).
We do this when our replication gets out of sync, since we have be-directional replication set up. If you have a row on one server but not the other, you have to manually re-sync them.
October 7, 2005 at 7:39 am
Yes, sorry, it is Transactional Replication (push).
The only error detail I have come across so far in regards to IDs is "Transaction sequence number and command ID of last execution batch are XXX.."
It would be nice to easily remove the bad command, but this particular database is accessed by primarily support staff, so it is not a big deal to just re-sync and start over. I will take a look at the msrepl_commands info that you gave me.
Thanks Chris!
October 7, 2005 at 7:42 am
That "Transaction sequence number and command ID" are what you can search by (xact_seqno and command_ID, if I remember correctly) in msrepl_commands.
October 7, 2005 at 8:01 am
Yes, I am seeing all of that. Going to take a look and ponder over for a while, as it does not have to be fixed today.
Thanks Chris!
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply