Uber Kill

  • Is there any way to Kill a spid so that it just stops and leaves whatever it was doing in whatever state it is?

    I have a daft long insert that I need to kill - and then truncate the table afterwards and start again (yeah batch it, I know) . So I don't care about its transactional consistency etc...

    Anyway to acheive this, or do I have to wait for the rollback to complete?

  • I do not think so. SQL Server is built on the basis of atomicity.

  • The transaction has to roll back. SQL Server guarantees that transactions are completed entirely, or not at all.

    Even if you kill the SQL process and restart it, the rollback will be done. It'll ust be done as part of the recovery rather than as a process rollback.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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