Tag: Deadlocks

  • Creating a Deadlock

    Previously we have looked at how to capture a deadlock, but how do we go about creating a deadlock? I think the following is the simplest method: 1. Create two tables with a single row in each and update a row in the first table (note transaction is started with BEGIN TRAN, but not committed.)…

  • SQL Server Locks

    Here is a simple script to get some more detailed information about locking, which I have added to over the last few years.

  • Capturing Deadlocks

    So, deadlocks. “A deadlock occurs when two or more tasks permanently block each other by each task having a lock on a resource which the other tasks are trying to lock.” http://msdn.microsoft.com/en-us/library/ms178104.aspx How to capture deadlocks? How many ways can you capture a deadlock? Lots! Luckily I do not see a lot of deadlocks in…