info@techdevops.com | 437-991-3573 | Data Engineering Services
TechDevOps.com
Resources Tools
Experts in Microsoft SQL Server on Windows, Linux, Containers | Clusters, Always On, FCI | Migrations, Cloud, Performance



Enable or Disable All SQL Jobs
by BF (Principal Consultant; Architecture; Engineering)
2017-11-18









T-SQL:


Disable All SQL Jobs:
SELECT 'Exec MSDB..sp_update_job @job_name = '''+NAME+''', @enabled = 0' FROM MSDB..sysjobs order by name asc


Enable All SQL Jobs:
SELECT 'Exec MSDB..sp_update_job @job_name = '''+NAME+''', @enabled = 1' FROM MSDB..sysjobs order by name asc


Check All SQL Jobs Enabled Status:
Select [enabled], name from MSDB.dbo.sysjobs order by name asc