SQL Server deadlocks between select/update or multiple selects

Posted by RobW on Stack Overflow See other posts from Stack Overflow or by RobW
Published on 2009-03-19T11:48:37Z Indexed on 2010/04/02 3:13 UTC
Read the original article Hit count: 755

All of the documentation on SQL Server deadlocks talks about the scenario in which operation 1 locks resource A then attempts to access resource B and operation 2 locks resource B and attempts to access resource A.

However, I quite often see deadlocks between a select and an update or even between multiple selects in some of our busy applications. I find some of the finer points of the deadlock trace output pretty impenetrable but I would really just like to understand what can cause a deadlock between two single operations. Surely if a select has a read lock the update should just wait before obtaining an exclusive lock and vice versa?

This is happening on SQL Server 2005 not that I think this makes a difference.

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about deadlock