http://www.sqlservercentral.com/blogs/joewebb/2010/01/27/speaking-at-the-baltimore-sql-server-user-group/

Printed 2014/07/29 01:45AM

Speaking at the Baltimore SQL Server User Group

By Joe Webb, 2010/01/27


On Monday, the first of February, 2010, I will be speaking at the Baltimore SQL Server User Group meeting at 7:00 PM EST. My topic will be SQL Server Locking and Blocking Made Simple. In it, I will discuss:

Here is a sample slide from the presentation. You can download the entire presentation here.

During the presentation, I will regularly use the following script to view the locks being held by SQL Server.

–examine the resources
SELECT
resource_type
,(CASE
WHEN resource_type = ‘OBJECT’ THEN object_name(resource_associated_entity_id)
WHEN resource_type IN (‘DATABASE’, ‘FILE’, ‘METADATA’) THEN ‘N/A’
WHEN resource_type IN (‘KEY’, ‘PAGE’, ‘RID’) THEN (
SELECT
object_name(object_id)
FROM
sys.partitions
WHERE
hobt_id=resource_associated_entity_id)
ELSE
‘Undefined’
END) AS resource_name
,request_mode as lock_type
,resource_description
,request_status
,request_session_id
,request_owner_id AS transaction_id
FROM
sys.dm_tran_locks
WHERE
resource_type <> ‘DATABASE’;

I hope you’ll join me there.

If you’re interested in having me speak at your local user group, please send me an email or direct message me in twitter. I’d love to talk with you.


Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.