select str(request_session_id ,4 ,0) as SPID ,convert(varchar(20) ,db_name(resource_database_id)) as db_name ,resource_associated_entity_id ,O.name ,resource_type ,request_type ,request_mode ,request_status from sys.dm_tran_locks as A with (nolock) l…