August 2, 2023 at 12:06 pm
Hi,
We are experiencing deadlocks.
The process not being the victim is doing an update by stored procedure which has begin tran, commit tran. However the transactionname in the deadlock graph is implicit_transactions.
Could this be potentially causing the deadlock issue and from the application implicit_transaction is on?
August 2, 2023 at 1:15 pm
Implicit transaction is always on. You can't turn it off. You're focusing on the wrong thing. The issue with deadlocks is a combination of performance and coding. From the performance side, if all transactions clear before the possibility of any blocks, locks, or contention, then the chances of a deadlock are radically reduced. However, the real focus has to be on the code. You're accessing tables in two different orders (this is the most common issue) or something along those lines. Focus on the code for both the victim and the successful transaction. That's where the issue lies.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
August 2, 2023 at 5:58 pm
Open the deadlock graph using Solarwinds/SQLSentry Planexplorer (free tool) and you can see how locking evolves playing the graph.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply