ロックの状態を調べるSQLは以下の通り SELECT resource_type as オブジェクトの種類, resource_associated_entity_id as エンティティID, (CASE when resource_type = 'OBJECT' then OBJECT_NAME(resource_... SELECT resource_type AS type ,resource_associated_entity_id as entity_id ,( CASE WHEN resource_type = 'OBJECT' THEN OBJECT_NAME( resource_associated_entity_id ) ELSE ( SELECT OBJECT_NAME( OBJECT_ID ) FROM sys.partitions WHERE hobt_id=re
![SQLServerのテーブルロック状態を取得するSQL](https://cdn-ak-scissors.b.st-hatena.com/image/square/38251973bca7e1735c3c4c4f46b7fcf6f0c7b2b6/height=288;version=1;width=512/http%3A%2F%2Flightgauge.net%2Fwp-content%2Fuploads%2F2017%2F04%2F63515349bf228251f9b6397b8a88da1e_s.jpg)