Tag Archives: dynamic management view

MSSQL DMVs — Blockings

This is a very good DMV script that gives you blocking/​​locking even on page level and the SQL state­ment each spid is run­ning at the time.   SELECT tl.request_session_id AS Wait­ing­Ses­sionID ‚wt.blocking_session_id AS Block­ing­Ses­sionID ‚wt.resource_description ‚wt.wait_type ‚wt.wait_duration_ms ‚DB_NAME(tl.resource_database_id) AS Data­base­Name ‚tl.resource_associated_entity_id AS Waitin­gAs­so­ci­atedEn­tity ‚tl.resource_type AS Wait­in­gRe­source­Type ‚tl.request_type AS Wait­in­gRe­quest­Type ‚wrt.[text] AS Wait­ingT­Sql ‚btl.request_type Block­in­gRe­quest­Type ‚brt.[text] AS […]