SQL Server - RangeX-X and RangeI-N locks
10
votes
2
answers
4922
views
I came to a dead point in a deadlock analyze. According to msdn :
RangeX-X are Exclusive range, exclusive resource lock; used when updating a key in a range.
RangeI-N are Insert range, null resource lock; used to test ranges before inserting a new key into an index.
So I understand that if I have an Index on 2 key columns - and I insert a new key I would have RangeI-N lock but if I update an existing key from the index I would have RangeX-X.
But my question is more or less complicated. Say I have the index IX_keys_included on column A, B and included column C.
In Serializable isolation mode I insert a new value for the included column C. Will there be RangeI-N or RangeX-X locks for the index IX_keys_included? Actually , will there be any locks given the fact that I insert a new column for an included column in the index?
Asked by yrushka
(1994 rep)
Apr 28, 2011, 12:49 PM
Last activity: Sep 5, 2020, 03:03 PM
Last activity: Sep 5, 2020, 03:03 PM