/ Published in: SQL
Let's say you need to deactivate jobs, do something, then reactivate jobs. You can use this to generate the code for both by changing "@enabled = 0" with 1
- SELECT 'exec msdb..sp_update_job @job_name = ''' + name + ''', @enabled = 0'
- FROM msdb..sysjobs
- WHERE enabled = 1
You need to login to post a comment.