MSDB, SQLAgent and Maintenance Plans


Convert MSDB Date and Time to DATETIME - Converts the MSDB job results date and time integer pair to a standard TSQL DATETIME datatype.

Convert MSDB Date to Date String - Converts the MSDB job results date integer to a date string of the format 'DD MMM YYYY'.

Convert MSDB Time to Time String - Converts the MSDB job results time integer to a time string of the format 'HH:MM:SS' in 24-hour clock format.

Convert MSDB Job Duration to Seconds - Converts MSDB integer format duration (HHMMSS) to #seconds.

Turn on Job Logging to Table - Sets the flag to have all SQL Agent (including MaintPlan) jobs to log to table (msdb..sysjobstepslogs) .

List SQL Agent Jobs - Returns a list of one or many SQL Agent Jobs, along with schedule details.

Decode MSDB Job Frequency - Takes an MSDB frequency integer and decodes it into a formatted string with one or many days.

List SQLAgent Jobs Last Run Summary - Lists all SQL Agent Jobs plus a summary of their last run.

List SQLAgent Job Run Detail - Lists a single SQLAgent Job plus details of all runs (length of history determined by SQLAgent settings)

List Maintenance Plan Jobs Last Run Summary - Similar to SQLAgent Jobs Summary but only for SQL Server Maintenance Plan Jobs

Maintenance Plan - Get Job Run Detail - Similar to SQLAgent Jobs Detail but only for SQL Server Maintenance Plan Jobs. Includes detail lines for all tasks in each job

List Currently Running Job Progress - Produces a list of all currently running SQL Agent jobs, including estimated ETA.