Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Are database locks reentrant?

$
0
0

Hi,

I'm using sql server profiler to investigate a deadlock and want to see if I'm interpreting the mode column of the Lock:Acquired and Lock:Released events correctly.

Here is a sequence of lock events on one of the resources involved in the deadlock.

EventClass, TextData, SPID, Type, Mode

  • Lock:Acquired, (91c240674a87), 71, 7 - Key, 4 - U
  • Lock:Acquired, (91c240674a87), 71, 7 - Key, 5 - X
  • Lock:Released, (91c240674a87), 71, 7 - Key, 0 - NULL

Event 2 - the update lock was converted to an exclusive lock.  Event 3 - process 71 no longer holds a lock on the key.  Is that correct?

What I want to rule out is the possibility that database locks are reentrant, and 2 successive lock events by the same process would require 2 release events to free the resource.

I'm using Sql Server 2008 r2.

David


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>