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?


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

| improve this answer | |
  • Hi, your website hits "ERROR: That reCAPTCHA response was incorrect." when i tried to comment – zeroflaw Oct 15 '19 at 6:27
  • First, thanks for your explanation. However i have some questions: 1. You mentioned RangeX-X locks will only be acquired on those "columns", does that mean that, any other insert/update/delete that involves that column, would be blocked? (which is almost similar to table lock?) 2. How to make those status change from 'WAIT' to deadlock? is that a timeout? – zeroflaw Oct 15 '19 at 6:27
  • All links in answer are dead. – Pang May 29 at 0:40

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,

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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