Last active
January 18, 2023 14:22
-
-
Save Toscan0/dbc5078e234587b0d8acdd1fe735331c to your computer and use it in GitHub Desktop.
Get locked tables in SQL Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [yourdatabase]; | |
GO | |
SELECT * | |
FROM sys.dm_tran_locks | |
WHERE 1=1 | |
AND resource_database_id = DB_ID() | |
AND resource_associated_entity_id = OBJECT_ID(N'dbo.yourtablename'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment