Lock, Block and Two Concurrent Processes

Recently I had a deadlock or blocking of my Microsoft SQL database while using Entity Framework, of course, it was a bad piece of code that was causing that block. After the blocking occurred I started getting timeout exception for every database action that I wanted to do, even for the basic most simple one queries.

locking-blocking

This specific issue will not be the topic of this article but something more general like what are and why blocks appear, how to detect which is the process that is causing the blocking and what you need to do to stop that process on a database level.Read More »