Negative SPIDs are generated

  • Sometimes, by running SP_WHO2 'ACTIVE', can see -ne spids generated.

    How the spids are generated with "-ve" value?

    Any suggestions?

    Regards

    Thanks.

  • Hi Sourav,

    This link will definitely help you.

    http://www.sqlserverclub.com/articles/how-to-deal-with-negative-spids-in-sql-server.aspx

    [font="Verdana"]Thanks
    Chandra Mohan[/font]

  • Thanks much..It is much helpful...:-)

    Run the following (you’ll need to have a SQL Server login with sysadmin or processadmin privileges to do this):

    select req_transactionUOW

    from master..syslockinfo

    where req_spid = -2

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

    Copy this into your query window and run:

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

    Run sp_who/sp_who2 again and you will probably see that the offending SPID has disappeared. If it hasn’t, it’s probably still in rollback and you’ll have to wait, but by nature this kind of SPID is usually pretty quick to roll back and terminate. Yep, it’s THAT simple.

    Thanks.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply