Job creation for killing another job

  • Hi All,

    My client has come up with a requirement wherein we need to monitor a job(XYZ), and in case it runs beyond a certain time(specified by the business, lets say X:00 hours), we need to terminate that run. Now, we need to automate this termination, but I am just thinking as to the best possible way to do this; without affecting the normal DB/server functioning and also achieve the agenda.

    Any assistance is greatly appreciated.

    Regards, Sandeep

  • Stripathydba (9/6/2016)


    Hi All,

    My client has come up with a requirement wherein we need to monitor a job(XYZ), and in case it runs beyond a certain time(specified by the business, lets say X:00 hours), we need to terminate that run. Now, we need to automate this termination, but I am just thinking as to the best possible way to do this; without affecting the normal DB/server functioning and also achieve the agenda.

    Any assistance is greatly appreciated.

    Regards, Sandeep

    The impact of killing any SPID, whether it's running or job or not, really depends on what that SPID is doing. There are plenty of times that it would have no impact and would be safe to kill but you would have to determine that based upon what the job is doing.

    Sue

  • Maybe you can use sp_stop_job

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

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