I have a stored procedure dbo.testproc1 that acquires an exclusive table lock on a table dbo.L. This database is used in a multi-user environment and now how can I find, how much time is spent on waiting for this exclusive lock (by other concurrent sessions)?
I know sys.dm_os_wait_stats can be used to find the wait times, but how can I drill down to a specific lock on a particular table?