March 6, 2007 at 9:44 am
We have an MSDE instance, I have an osql job script created that runs database backups. I kicked off the job but would like to cancel it. Is there an osql command to do this? Thanks for any ideas.
March 6, 2007 at 10:58 am
Run sp_who to get the spid of the job. Then run kill spid
Take care,
Bert
"Speculations? I know nothing about speculations. I'm resting on certainties. I know that my Redeemer lives, and because He lives, I shall live also." - Michael Faraday
March 7, 2007 at 11:43 am
Not sure if I would feel comfortable to kill a process on a regular basis. I know it's not as dangerous as back in the 6.5 days. I learned the very hard way to not kill processes in 6.5.
When you stop a job in SQL Agent, does it kill the process or just try and cancel it? There's got to be a better way than killing the process.
March 7, 2007 at 11:48 am
Either way will keep your database in a consistent state (i.e. roll back the transaction).
I forgot to mention, you've got the option to use sp_stop_job.
Take care,
Bert
"Speculations? I know nothing about speculations. I'm resting on certainties. I know that my Redeemer lives, and because He lives, I shall live also." - Michael Faraday
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply