When long running Query#1 exclusively locks an object (table, index or page), and then Query#2 is executed by another user and becomes blocked on the lock held by Query:1, how would I get the name of the object which the two queries are contending over?
Sql-server – How to determine what object two SQL process are contending over
lockingsql serversql-server-2008
Related Question
- SQL Server Locking – How to Find the Query Holding a Lock
- Sql-server – the role of “ Intent lock ” in transaction and concurrency
- Why SQL Server Prefers Page Locking Over Row Locking
- SQL Server 2017 – How to Find Table/Object for KEY, PAGE, EXTENT Locks
- SQL Server – Blocked Process Report and Lockmode Application
- SQL Server 2016 – Why Use Intent Lock at Higher Level in Hierarchy
Best Answer
In management studio you can right click the server node and select
Reports -> Standard Reports -> Activity - all Blocking Transactions
to see blocking currently ongoing.The query that report runs can be traced through Profiler and is pasted below.