Skip to main content

Posts

Showing posts from June, 2016

A great script to quickly make sense of MSSQL Agent Jobs.

Orginally obtained from http://www.sqlservercentral.com/Forums/Topic410557-116-1.aspx /******************************************************************************* Name: GetJobSchedule (For SQL Server7.0&2000) Author: M.Pearson Creation Date: 5 Jun 2002 Version: 1.0 Program Overview: This queries the sysjobs, sysjobschedules and sysjobhistory table to produce a resultset showing the jobs on a server plus their schedules (if applicable) and the maximun duration of the job. The UNION join is to cater for jobs that have been scheduled but not yet run, as this information is stored in the 'active_start...' fields of the sysjobschedules table, whereas if the job has already run the schedule information is stored in the 'next_run...' fields of the sysjobschedules table. Modification History: ------------------------------------------------------------------------------- Version Date Name Modification -----------------