Thursday, February 9, 2012

Are RANGE locks indicative of Serializable isolation level?

I recall reading somewhere that RANGE are only used in serializable
isolation level. Can anyone confirm this?
I've recently found some blocking and when I did an "sp_lock" on the
blocking SPID I saw many RANGE locks. The programmer tells me that they are
using "read committed" isolation level but based on the RANGE locks - I am
thinking that it must be serializable.
Can anyone confirm that RANGE locks are used ONLY in serializable isolation
level?
Thanks in advance.Yes they are associated with Serializable actions. You should be able to
see what is going on by running a profiler trace.
Andrew J. Kelly
SQL Server MVP
"TJTODD" <Thxomasx.Toddy@.Siemensx.com> wrote in message
news:%23Hkw4MpQEHA.808@.tk2msftngp13.phx.gbl...
> I recall reading somewhere that RANGE are only used in serializable
> isolation level. Can anyone confirm this?
> I've recently found some blocking and when I did an "sp_lock" on the
> blocking SPID I saw many RANGE locks. The programmer tells me that they
are
> using "read committed" isolation level but based on the RANGE locks - I am
> thinking that it must be serializable.
> Can anyone confirm that RANGE locks are used ONLY in serializable
isolation
> level?
> Thanks in advance.
>|||Thanks for the response Andrew.
A follow-up question...
How would I be able to tell the isolation level for a particular SPID in a
profiler trace? I don't see anything apparent that would give me this info.
Thanks Again.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:#mC4edqQEHA.3596@.tk2msftngp13.phx.gbl...
> Yes they are associated with Serializable actions. You should be able to
> see what is going on by running a profiler trace.
> --
> Andrew J. Kelly
> SQL Server MVP
>
> "TJTODD" <Thxomasx.Toddy@.Siemensx.com> wrote in message
> news:%23Hkw4MpQEHA.808@.tk2msftngp13.phx.gbl...
> are
am[vbcol=seagreen]
> isolation
>|||Make sure you have (among the normal events) the Existing connections,
SP:Stmt starting, SQL:Stmt Starting events and Login. One of these should
show a command of SET ISOLATION_LEVEL xxxx. Make sure you start the trace
before they Login so you can see all the commands.
Andrew J. Kelly
SQL Server MVP
"TJTODD" <Thxomasx.Toddy@.Siemensx.com> wrote in message
news:uX9jTqqQEHA.556@.TK2MSFTNGP10.phx.gbl...
> Thanks for the response Andrew.
> A follow-up question...
> How would I be able to tell the isolation level for a particular SPID in a
> profiler trace? I don't see anything apparent that would give me this
info.
> Thanks Again.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:#mC4edqQEHA.3596@.tk2msftngp13.phx.gbl...
to[vbcol=seagreen]
they[vbcol=seagreen]
I[vbcol=seagreen]
> am
>

No comments:

Post a Comment