0

My company has a SQL job that runs at 12:45 every day. It updates a table that stores various daily prices. At that time, one of our services that uses the table will sometimes error out because of a deadlock. I've been tasked with writing retry logic for the service to try again when it craps out.

What would be the best way to write a script that will lock the SQL table in a transaction so I can run my retry tests against it?

Thanks.

ARHassing
  • 23
  • 4
  • http://stackoverflow.com/a/7813646/1280587 – paul Nov 18 '16 at 13:52
  • 1
    http://stackoverflow.com/questions/22825147/how-to-simulate-deadlock-on-sql-server/22825825#22825825 – Dave Mason Nov 18 '16 at 14:38
  • My answer got downvoted, so I deleted it. Please, don't try to reinvent the wheel. Try Polly (my preference) or Transcient for the c# side. https://www.nuget.org/packages/polly and https://msdn.microsoft.com/en-us/library/hh675232.aspx – granadaCoder Nov 18 '16 at 14:59

0 Answers0