CDBA
Hall of Fame
Points: 3266
More actions
September 19, 2008 at 11:31 am
#126512
How to stop a sql job after certain time of execution? We want to make sure it does not run for ever.
Environment: SQL2K5 EE 64BIT on 2K3
Thanks in advance
Mark Shvarts 1
SSCertifiable
Points: 5702
September 19, 2008 at 11:47 am
#874392
Set another job which periodically will query sysjobs and sysjobhistory in msdb system database. You can check run_status, _time, _duration.
To stop the job you can use sp_stop_job 'job_name'
September 19, 2008 at 12:01 pm
#874398
Thanks Mark
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply