http://sqlwithmanoj.wordpress.com/2013/04/09/disableenable-multiple-sql-jobs-at-once/
USE msdb;
GO
-- Disable Multiple SQL Jobs at once:
DECLARE @dynSql NVARCHAR(MAX) = ''
SELECT @dynSql += N'exec msdb.dbo.sp_update_job @job_name = ''' + name + N''', @enabled = 0;' + CHAR(10) + CHAR(13)
FROM msdb.dbo.sysjobs
WHERE enabled = 1
ORDER BY name;
PRINT @dynSql;
Saturday, December 7, 2013
Subscribe to:
Posts (Atom)