SQL Server

Disable SQL Server Agent Job – SQL Server

September 18, 2017

Recently we had an issue with our tape backup system, we needed to quickly disable backup jobs to tape and enable backup jobs to drive. There were multiple jobs and using SSMS gui would have taken too much effort and time. To disable or enable multiple jobs update the sysjobs table in msdb.

Get list of jobs.

SELECT * FROM msdb.dbo.sysjobs

Update sysjobs table to disable job.

UPDATE msdb.dbo.sysjobs
SET enabled = 0
AND job_id = '87D56BD2-EC90-4A6C-A00C-30A8F81133F5'

You Might Also Like

No Comments

Leave a Reply