Posts

Showing posts from March, 2012

SQL Agent Jobs - Non Maint Plan

While doing some development found a need to find non-Maintenance Plan Jobs for doing some reporting.  After couple minutes searching Google and some other sites, there is a huge lack of information or queries that effectively show how to obtain or tie system tables together to derive the literal SQL Agent Jobs. That being said, here is a little script i created that will query the system databases and produce a list of SQL Agent jobs. Code Snippet: 1: select * 2: from msdb.dbo.sysjobs as job 3: where job.job_id not in (select job_id from msdb.dbo.sysmaintplan_subplans)