I ran the following query and my records are locked now I can't read or update or delete. For testing purpose i didn't called commit tran and now these records got stuck. How can I release these locks which are already placed.
BEGIN TRAN
SELECT * from inquiry with (XLOCK,READPAST) where inquiry_id=228563
You should find you lock process id by sys.dm_tran_locks and kill it manually
SELECT * FROM sys.dm_tran_locks WHERE RESOURCE_TYPE = ‘OBJECT’
and then use KILL with id number