Analysing and Resolving Deadlocks.
2024TL; DR
Learn how get information about the deadlock XML, how to read it, what actions you can take to prevent deadlocks or at least mitigate the consequences of them. The session also includes a recap on locking in SQL Server.
Session Details
About every developer and DBA has to deal with deadlocks in their work. This session starts with a brief introduction to define what a deadlock is. The next step is to learn how you get information about deadlocks, how to get hold of the deadlock XML. From here I proceed to explain how to read that XML, and particularly what are the important things you should look for.
Before moving on how to resolve deadlocks, there is an interlude with a recap on the most important locking concepts in SQL Server, since without understanding about the locking mechanisms in SQL Server, it will be difficult to analyse and resolve deadlocks.
The second half of the session discusses various ways on how you can prevent deadlocks. Sometimes it is not entirely possible or feasible to entirely prevent deadlocks, and the session discusses which mitigating actions you can take in these cases.
Before moving on how to resolve deadlocks, there is an interlude with a recap on the most important locking concepts in SQL Server, since without understanding about the locking mechanisms in SQL Server, it will be difficult to analyse and resolve deadlocks.
The second half of the session discusses various ways on how you can prevent deadlocks. Sometimes it is not entirely possible or feasible to entirely prevent deadlocks, and the session discusses which mitigating actions you can take in these cases.
3 things you'll get out of this session
Speakers
Erland Sommarskog's previous sessions
Don’t Let Your Permissions Be Hijacked!
Learn how malicious users can lure a power user such as sysadmin to run code that performs action to the benefit of the evil user by something I call permission hijacking and what means you can take to prevent this from happening.
Packaging Permissions in Stored Procedures
Learn in this session how you can package any database- or server-level permission in a stored procedure with help of certificate signing or EXECUTE AS and why one method is to prefer over the other.