Kill negative (orphan) pid SQL Server

Sometimes in sql server you will see negative pid running and blocking other processes. These are distributed transactions and sometimes they don’t complete or hang and block other processes. Negative PID can’t be killed by issuing normal kill pid command, to kill negative PID request_owner_guid is required.

USE Master;

FROM sys.dm_tran_locks
WHERE request_session_id =-2

Once you have the guid, use it to kill the negative PID.

KILL 'guid'

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>