Kill a spid -2?

  • I was working on a SSIS package and it crashed at one point. I believe it left behind a table lock. Efforts to get it to clear has failed, including various DBCC commands to empty caches, clear buffers and whatnots. Using sp_who2 only give me one process that I deliberately executed as a test showing being blocked by a -2. Of course, I can't kill using -2 because spid has to be between 1 to 1024.

    What am I missing in needing to clear the lock?

    Thanks.

  • Just if anyone runs across this, this is worked.

    Basically, spid -2 is the transaction manager used in SSIS, which as I indicated in OP had crashed and thus orphaned its transaction.

    To kill the orphaned process, we need to get GUID and use that to kill those thread instead.

    use master

    select distinct req_transactionUOW from syslockinfo

    kill 'D5499C66-E398-45CA-BF7E-DC9C194B48CF' -- A sample!! use the preceding query to get your own GUID

    (Ignore the first entry where the values are all zeroes.

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

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