TSQL - Remove/Delete all SQL Server Agent jobs on your development server

Post date: Oct 4, 2011 2:35:42 PM

This is a snippet that is used to create a script that will delete all SQL Server Agent jobs on the server.

I do not recommend running this query unless you are very sure that it is a good idea.

SELECT 'exec msdb.dbo.sp_delete_job @job_id = ''' + CAST(job_id as VARCHAR(500)) + '''' FROM msdb.dbo.sysjobs;