The following T-SQL query uses sys.dm_tran_locks in order to return useful information:
A sample output of the above query would look like the one below:
Artemakis Artemiou [MVP]
Author & Editor
Artemakis Artemiou is a Senior SQL Server Architect, Software Developer and Microsoft Data Platform MVP. He is also an author, regular blogger, president of Cyprus.NET User Group and CY Country leader of INETA-EU. He is also the creator of DBA Security Advisor and In-Memory OLTP Simulator. Artemakis is a frequent guest author of worldwide well-respected online journals where he writes articles focusing on many SQL Server topics.
Reference: The SQL Server and .NET Hub (http://www.sqlnethub.com)
@ Copyright 2008-2017 The SQL Server and .NET Hub