Search

Wednesday, July 27, 2011

How to Kill Negative SPIDs -2

---Run the followoing query-----

select req_transactionUOW
from master..syslockinfo
where req_spid = -2

/**This will return a 32 digit UOW number which looks like a GUID. Somethinglike ‘DEF12078-0199-1212-B810-CD46A73F2498’
**/

--Copy this into your query window and run:

KILL ‘DEF12078-0199-1212-B810-CD46A73F2498’

/**SQL Server changes the SPID from a positive number to -2 for a orphaned SPID, and we cannot use negative ID in KILL SPID command.
**/

No comments:

Post a Comment