﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by webtekkie  / Job History with Timeline / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 26 May 2013 00:45:19 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Job History with Timeline</title><link>http://www.sqlservercentral.com/Forums/Topic690677-1524-1.aspx</link><description>Nice Script ...I would like to know whats mean of XX in result.i can not see last week's jobs result . like today tue morning i am running this script it showing me result on 2011-01-09 and 2011-01-10 what if i want to see results before this duration?Thanks</description><pubDate>Tue, 10 Jan 2012 07:29:15 GMT</pubDate><dc:creator>logicinside22</dc:creator></item><item><title>RE: Job History with Timeline</title><link>http://www.sqlservercentral.com/Forums/Topic690677-1524-1.aspx</link><description>Oh--Ok, I got it now. thank you!  Becasue I really like this query.  Uh, one more thing...explain LeadingMinutes, please.</description><pubDate>Wed, 02 Jun 2010 13:06:42 GMT</pubDate><dc:creator>amc-885860</dc:creator></item><item><title>RE: Job History with Timeline</title><link>http://www.sqlservercentral.com/Forums/Topic690677-1524-1.aspx</link><description>Hi amc.  It works like a bar chart.  For every minute a job is running, an 'X' is printed.  For every minute it is not running, a space is printed.  You can compare the lines to see when jobs are running at the same time.  So, if you have one row returned where the 'X's line up vertically with the lines above or below it, then it means the jobs were running concurrently.Hope that helps,Martin</description><pubDate>Wed, 02 Jun 2010 12:53:01 GMT</pubDate><dc:creator>webtekkie</dc:creator></item><item><title>RE: Job History with Timeline</title><link>http://www.sqlservercentral.com/Forums/Topic690677-1524-1.aspx</link><description>I'm a newbie.  can you explain a little more about leading minutes and duration timeline column?  I don't understand.  What spaces are you talking about?  Please help me to understand.</description><pubDate>Wed, 02 Jun 2010 09:55:20 GMT</pubDate><dc:creator>amc-885860</dc:creator></item><item><title>RE: Job History with Timeline</title><link>http://www.sqlservercentral.com/Forums/Topic690677-1524-1.aspx</link><description>Nicely done! I like the graph too. I was looking at the graph and thought shouldn't it reset back to left side of the "Duration Timeline" once the the next day's jobs are executed? Currently it looks like (from the graph) that the times of the jobs are changing.Just a thought.</description><pubDate>Tue, 01 Jun 2010 13:11:42 GMT</pubDate><dc:creator>Rudy Panigas</dc:creator></item><item><title>RE: Job History with Timeline</title><link>http://www.sqlservercentral.com/Forums/Topic690677-1524-1.aspx</link><description>Thanks, I like it!I did make a couple of minor changes. Our server names are &gt;10 characters and I like to see the run date and run time in descending order.SET DATEFORMAT dmySELECT  convert(varchar(20),his.server) as Server,  -- Increased to 20 characters convert(varchar(30),job.name) AS job_name,  CASE his.run_status WHEN 0 THEN 'Failed' WHEN 1 THEN 'Succeeded' ELSE '???' END as run_status, convert(varchar(4),run_duration/10000) + ':' + convert(varchar(4),run_duration/100%100) + ':' + convert(varchar(4),run_duration%100) as run_duration, convert(datetime, convert(varchar(10),run_date%100) + '/' + convert(varchar(10),run_date/100%100) + '/' + convert(varchar(10),run_date/10000) + ' ' + convert(varchar(4),run_time/10000) + ':' + convert(varchar(4),run_time/100%100) + ':' + convert(varchar(4),run_time%100)) as start_date, datediff(mi, getdate()-1, convert(datetime, convert(varchar(10),run_date%100) + '/' + convert(varchar(10),run_date/100%100) + '/' + convert(varchar(10),run_date/10000) + ' ' + convert(varchar(4),run_time/10000) + ':' + convert(varchar(4),run_time/100%100) + ':' + convert(varchar(4),run_time%100))) as LeadingMinutes, isnull(nullif(convert(int,(run_duration/10000 * 60) + (run_duration/100%100) + (ceiling(run_duration%100/60.0))),0),1) as DurationMinutes, REPLICATE(' ', datediff(mi, getdate()-1, convert(datetime, convert(varchar(10),run_date%100) + '/' + convert(varchar(10),run_date/100%100) + '/' + convert(varchar(10),run_date/10000) + ' ' + convert(varchar(4),run_time/10000) + ':' + convert(varchar(4),run_time/100%100) + ':' + convert(varchar(4),run_time%100)))) + REPLICATE('x', isnull(nullif(convert(int,(run_duration/10000 * 60) + (run_duration/100%100) + (ceiling(run_duration%100/60.0))),0),1)) as DurationTimeline, his.messageFROM msdb.dbo.sysjobhistory his INNER JOIN msdb.dbo.sysjobs job ON his.job_id = job.job_idWHERE convert(datetime, convert(varchar(10),run_date%100) + '/' + convert(varchar(10),run_date/100%100) + '/' + convert(varchar(10),run_date/10000) + ' ' + convert(varchar(4),run_time/10000) + ':' + convert(varchar(4),run_time/100%100) + ':' + convert(varchar(4),run_time%100)) between getdate()-1 and getdate() and step_id = 0ORDER BY his.server, his.run_date DESC,  -- Added DESC his.run_time DESC,  -- Added DESC job.name</description><pubDate>Wed, 13 May 2009 07:10:14 GMT</pubDate><dc:creator>RML51</dc:creator></item><item><title>Job History with Timeline</title><link>http://www.sqlservercentral.com/Forums/Topic690677-1524-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/Job/66476/"&gt;Job History with Timeline&lt;/A&gt;[/B]</description><pubDate>Sun, 05 Apr 2009 17:44:22 GMT</pubDate><dc:creator>webtekkie</dc:creator></item></channel></rss>