Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

Check this link out, from the looks of it, an intent exclusive (IX) lock is illegal with an RI-N and RX-X lock. Or I am waaay off base, and really didn't help at all. I found the table in the print book, Professional SQL Server 2008 Internals and Troubleshooting,

share|improve this answer

I have figured this on my own and I wrote on my blog. For those interested in the solution visit this posts: RangeS-S, RangeS-U, RangeX-X

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.