LCK_M_RX_X
Short Description
Occurs when a task is waiting to acquire an Exclusive lock on the current key value, and an Exclusive Range lock between the current and previous key.
Detailed Description​
Occurs when a task is waiting to acquire an Exclusive lock on the current key value, and an Exclusive Range lock between the current and previous key.
This is seen when the Serializable isolation level is in use.
For a lock compatibility matrix, see sys.dm_tran_locks (Transact-SQL).
How to reduce this wait​
- In SQL Server Management Studio (SSMS) Object Explorer, right-click the top-level server object, expand Reports, expand Standard Reports, and then select Activity – All Blocking Transactions. This report shows current transactions at the head of a blocking chain. If you expand the transaction, the report will show the transactions that are blocked by the head transaction. This report will also show the Blocking SQL Statement and the Blocked SQL Statement.
- Ensure your application uses SQL Server's locking mechanism in an efficient way and investigate why there has been a sudden change in locking.
- Has there been a software release?
- and lastly - examine the lock hierarchy to see if one thread is blocking your application are if it is safe do to so, kill the session. I reiterate, this is not something you should do lightly.
Additional Links​
- Microsoft Docs - Understand and Resolve SQL Server blocking problems
- Microsoft Docs - Transaction Locking and Row Versioning Guide
- Microsoft Docs - Resolve blocking problems caused by lock escalation in SQL Server
- Microsoft Docs - Schema Locks
- sqlskills.com - LCK_M_RX_X
Search online​
If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.