I am using MS-SQL 2008 and for coding using C # in a web project.
I am currently stuck in sql deadlock.
I have 2 transactions, one of two is a long transaction.
When both transactions are performed simultaneously, a deadlock occurs and the short transaction will be automatically deleted.
My current solution, I caught the deadlock exception and redid the short transaction, it works well, just take the time.
But, I wonder if there is any solution to avoid a deadlock due to the root cause?
kidgu
source share