How to unlock a table in SQL Server 2012?

I created a table in SQL Server 2012 and when I execute

select * from tableName 

it takes a lot of time and for some time does not return a result.

Currently it has only 1 row. After the search, I know that it is blocked, so please help, how to unlock it or refuse it?

+5
source share
1 answer

Thanks guys .. This is allowed.

I said below the request

 SELECT OBJECT_NAME(P.object_id) AS TableName, Resource_type, request_session_id FROM sys.dm_tran_locks L JOIN sys.partitions P ON L.resource_associated_entity_id = p.hobt_id WHERE OBJECT_NAME(P.object_id) = 'P1Chronolog_IncidentActivityUpdates' 

and killed the corresponding session

 Kill session_ID 
+10
source

All Articles