0

I have started a Query like the following in SQL Mgt studio:

enter image description here

Currently running sp_who I can see the Query is running for TBCompany_503

My question is that if I Kill the process for TBCompany_503 will it rollback the changes for TBCompany_500 - TBCompany_502 ?

Reason I want to stop it, and run them separately.

1 Answer 1

2

Not unless you wrapped those calls in the same transaction, otherwise those previously ran updates are committed already.

4
  • I haven't added any transactions, the script is as above in the image. so Every line is one update - ending eith a semi-colon Commented Nov 23, 2020 at 23:14
  • 1
    @DawoodAwan Right, so then the previous updates are already committed as they finish running (and only each update statement that hasn't finished executing yet will get rolled back).
    – J.D.
    Commented Nov 23, 2020 at 23:36
  • 1
    Thanks - now I can Kill the process without worrying my changes will get reverted Commented Nov 23, 2020 at 23:36
  • Why don't you use begin tran / rollback tran? Commented Nov 24, 2020 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.