Results 1 to 6 of 6

Thread: Stop execution

  1. #1
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506

    Question Unanswered: Stop execution

    Hi,
    Can anybody tell me how to stop the execution of a T-SQL statement at once? I have tried Alt+Break but its taking a long time to stop.Whats the reason?Plz suggest....I am dealing with a database containing 24343000 data.
    Joydeep

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Open the Current Activity tab in Enterprise Manager, right-click on the spid that is running your query and select Kill Process. Be warned that it may take as much time to roll-back your transaction as it has taken to complete it this far.

    Alternative? Dump the log, cold-boot the server, and restore the database to a point in time just prior to your query. Not for the faint of heart....
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by blindman
    Open the Current Activity tab in Enterprise Manager, right-click on the spid that is running your query and select Kill Process. Be warned that it may take as much time to roll-back your transaction as it has taken to complete it this far.

    Alternative? Dump the log, cold-boot the server, and restore the database to a point in time just prior to your query. Not for the faint of heart....
    hi Batman,
    I checked it ,but its taking the same time.Is there any faster way to kill that process ?I am using Query Analyser..
    Dump the log, cold-boot the server, and restore the database to a point in time just prior to your query. Not for the faint of heart....
    I haven't checked this and I don't want to cold boot the server...
    Plz suggest if there are any alternatives to do it quickly and with ease?
    I think you have already mentioned the available facilities.But I hope to hear more from u, if those are available.

    Thanks!!
    Joydeep

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    A lot depends on what your process is doing, and what else the server is doing. If you find an easy, general answer, please let me know... I'd love to add that to my bag of tricks!

    -PatP

  5. #5
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Its the transaction statements which are doing the problem..I mean insert and update statements..
    But select statement are just fine.
    if I use as for example : Kill 51(spid) in Query Analyser, the matter is that the rollback process is taking the time.Still searching and testing.....

  6. #6
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Probably too late to turn off logging now, but the next time you have a large update you might consider putting the database in a non-logged recovery mode, and then running a backup immediately after your process completes.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •