Archive

Posts Tagged ‘sp_update_job’

How to enable/disable a job scheduled in SQLServer Agent?

February 14th, 2010 Amin Jaffer No comments

Using msdb.dbo.sp_update_job one can disable or enable jobs, the job_id can be retrieved from msdb.dbo.sysjobs

To enable
EXEC msdb.dbo.sp_update_job @job_id, @enabled = 1

To disable
EXEC msdb.dbo.sp_update_job @job_id, @enabled = 0

Categories: General DBA Tags: , ,
7 visitors online now
7 guests, 0 members
Max visitors today: 11 at 12:30 pm UTC
This month: 11 at 09-07-2010 12:30 pm UTC
This year: 62 at 07-28-2010 05:49 pm UTC
All time: 62 at 07-28-2010 05:49 pm UTC