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.