Cancelling a query

  • i have a query that is doing about 50 million insertions on a table,the query has been running for 15 mins and i pressed the stop button but its still running, could you someone tell me how to stop it

  • you could try and kill it but its likely it will take around 15 mins to rollback.

    try doing the inserts in batches

  • Wait.

    It has to finish rolling back. There is no way to stop a rollback, what was done before you cancelled the query has to be undone.

    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
  • KlineandKing,

    Do as Gail said. You need to wait out the rollback.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • ok thanks guys am still waiting i appreciate it

  • You're welcome.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 6 posts - 1 through 5 (of 5 total)

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