Home Forums SQL Server 2008 SQL Server 2008 - General Disable all the SQL jobs at once RE: Disable all the SQL jobs at once
Cadavre
SSC-Forever
Points: 41690
More actions
December 1, 2011 at 9:01 am
#1415333
DECLARE @SQL AS VARCHAR(MAX)
SELECT @SQL = COALESCE(@SQL+ + CHAR(13), '') + 'EXEC msdb..sp_update_job @job_name = ''' + name + ''', @enabled = 0;' FROM msdb.dbo.sysjobs
EXEC (@SQL)
I'd do what G-Squared suggested though.