0

I understand that T-Rep includes a publisher, distributor and subscriber. Usually I find replication failing due to a Primary Key conflict or a row not found issue. I am planning to leverage the distribution databases and the publisher database to find the exact error of failure and then automatically fix the error by a SQL job (running every 15 mins or so)

Incase of a PK Issue the conflicting record be deleted and the new record be inserted and in case of a row not found issue the missing row be inserted from the publisher.

How feasible this solution would be? What tables in the distribution DB will be helpful with this autofix job?

Alok Singh
  • 174
  • 3
  • 15
  • Does your replication setup fail so often as to warrant the effort? If so, that's odd behavior and you should investigate the root cause of that before investing time in papering over the issue. – Ben Thul Jul 29 '16 at 14:57
  • I am working for a retail chain setup where 500 Servers replicate data throughout the day to a central server. Now if 10% of the servers generate 1 error each day, its around 50 escalations I deal with... Tiring. I cant get into the root cause because of limitations on resources. – Alok Singh Jul 29 '16 at 15:55
  • To be clear, you're using transactional replication here (not merge replication)? – Ben Thul Jul 29 '16 at 16:14
  • Yes - Transactional replication! – Alok Singh Jul 29 '16 at 16:15
  • 1
    Given what you're describing, I'd look into merge replication. It was designed to accommodate the setup you're describing (i.e. multiple clients replicating disconnected changes to a central server). – Ben Thul Jul 29 '16 at 20:11

0 Answers0