<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Job Agent Execution (Run) Timeline Report Graph in SSRS</title>
	<atom:link href="http://thinknook.com/job-agent-execution-run-timeline-report-graph-in-ssrs-2012-11-10/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinknook.com/job-agent-execution-run-timeline-report-graph-in-ssrs-2012-11-10/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=job-agent-execution-run-timeline-report-graph-in-ssrs</link>
	<description>Because the world needs another Business Intelligence blog!</description>
	<lastBuildDate>Fri, 14 Sep 2018 19:30:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>By: Links Naji</title>
		<link>http://thinknook.com/job-agent-execution-run-timeline-report-graph-in-ssrs-2012-11-10/#comment-3392</link>
		<dc:creator><![CDATA[Links Naji]]></dc:creator>
		<pubDate>Thu, 29 Oct 2015 18:30:45 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=820#comment-3392</guid>
		<description><![CDATA[If yr running SQL 2000, you could use the &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/aa226054(SQL.80).aspx&quot; title=&quot;CAST and CONVERT&quot; rel=&quot;nofollow&quot;&gt;CAST and CONVERT functions&lt;/a&gt;, maybe u need to do some string slicing as well to pad the year.]]></description>
		<content:encoded><![CDATA[<p>If yr running SQL 2000, you could use the <a href="https://msdn.microsoft.com/en-us/library/aa226054(SQL.80).aspx" title="CAST and CONVERT" rel="nofollow">CAST and CONVERT functions</a>, maybe u need to do some string slicing as well to pad the year.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Programmer</title>
		<link>http://thinknook.com/job-agent-execution-run-timeline-report-graph-in-ssrs-2012-11-10/#comment-3391</link>
		<dc:creator><![CDATA[Programmer]]></dc:creator>
		<pubDate>Thu, 29 Oct 2015 14:53:49 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=820#comment-3391</guid>
		<description><![CDATA[Hello,

is there a statement without the FORMAT-function, because in some sql server versions this functions can not be used.

greets]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>is there a statement without the FORMAT-function, because in some sql server versions this functions can not be used.</p>
<p>greets</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links Naji</title>
		<link>http://thinknook.com/job-agent-execution-run-timeline-report-graph-in-ssrs-2012-11-10/#comment-3329</link>
		<dc:creator><![CDATA[Links Naji]]></dc:creator>
		<pubDate>Tue, 17 Feb 2015 09:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=820#comment-3329</guid>
		<description><![CDATA[Thanks for sharing :)]]></description>
		<content:encoded><![CDATA[<p>Thanks for sharing <img src="http://thinknook.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eldritch-fossicker</title>
		<link>http://thinknook.com/job-agent-execution-run-timeline-report-graph-in-ssrs-2012-11-10/#comment-3328</link>
		<dc:creator><![CDATA[eldritch-fossicker]]></dc:creator>
		<pubDate>Tue, 17 Feb 2015 06:52:24 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=820#comment-3328</guid>
		<description><![CDATA[err removed my link
code dump:
SELECT
	name
	-- added Days Back to use a fitler aginst the user input
	,DATEDIFF(DAY,CONVERT(DATE, calc.run_date),GETDATE()) AS DaysBack
	,CONVERT( DATETIME, calc.run_date + SPACE(1) + calc.run_time) AS start_time
	-- using seconds here as I had a problem with times over 24 hrs
	,DATEADD(SECOND, jh.run_duration, CONVERT( DATETIME, calc.run_date + SPACE(1) + calc.run_time)) AS end_time
	,run_status
	,instance_id
FROM msdb.dbo.sysjobhistory jh
INNER JOIN msdb.dbo.sysjobs j ON jh.job_id = j.job_id
-- you where using TIME before so i&#039;m assuming SQL 2008+
CROSS APPLY (
	SELECT	
		-- using brittle padding, we know the source is a number 
		-- stuffing in symbols from back to front just a preference
		STUFF(STUFF(REPLACE(STR(jh.run_date, 8), SPACE(1), &#039;0&#039;),7,0,&#039;-&#039;),5,0,&#039;-&#039;) AS run_date,
		STUFF(STUFF(REPLACE(STR(jh.run_time,6),SPACE(1),&#039;0&#039;) ,5,0,&#039;:&#039;),3,0,&#039;:&#039;) AS run_time,
		STUFF(STUFF(REPLACE(STR(jh.run_duration,6),SPACE(1),&#039;0&#039;),5,0,&#039;:&#039;),3,0,&#039;:&#039;) AS run_duration
) AS calc
WHERE
	step_id = 0 
	-- limit query to only last week and remove dynamic filter, I have a small setup
	AND jh.run_date &gt;= CONVERT(INT, FORMAT(DATEADD(DAY, -7, GETDATE()), &#039;yyyyMMdd&#039;, &#039;en-GB&#039;)) 
	-- just using a magic number here for simplicity, 05 minutes 00 seconds
	AND jh.run_duration &gt; 500 
ORDER BY
	start_time]]></description>
		<content:encoded><![CDATA[<p>err removed my link<br />
code dump:<br />
SELECT<br />
	name<br />
	&#8212; added Days Back to use a fitler aginst the user input<br />
	,DATEDIFF(DAY,CONVERT(DATE, calc.run_date),GETDATE()) AS DaysBack<br />
	,CONVERT( DATETIME, calc.run_date + SPACE(1) + calc.run_time) AS start_time<br />
	&#8212; using seconds here as I had a problem with times over 24 hrs<br />
	,DATEADD(SECOND, jh.run_duration, CONVERT( DATETIME, calc.run_date + SPACE(1) + calc.run_time)) AS end_time<br />
	,run_status<br />
	,instance_id<br />
FROM msdb.dbo.sysjobhistory jh<br />
INNER JOIN msdb.dbo.sysjobs j ON jh.job_id = j.job_id<br />
&#8212; you where using TIME before so i&#8217;m assuming SQL 2008+<br />
CROSS APPLY (<br />
	SELECT<br />
		&#8212; using brittle padding, we know the source is a number<br />
		&#8212; stuffing in symbols from back to front just a preference<br />
		STUFF(STUFF(REPLACE(STR(jh.run_date, 8), SPACE(1), &#8216;0&#8217;),7,0,&#8217;-&#8216;),5,0,&#8217;-&#8216;) AS run_date,<br />
		STUFF(STUFF(REPLACE(STR(jh.run_time,6),SPACE(1),&#8217;0&#8242;) ,5,0,':&#8217;),3,0,':&#8217;) AS run_time,<br />
		STUFF(STUFF(REPLACE(STR(jh.run_duration,6),SPACE(1),&#8217;0&#8242;),5,0,':&#8217;),3,0,':&#8217;) AS run_duration<br />
) AS calc<br />
WHERE<br />
	step_id = 0<br />
	&#8212; limit query to only last week and remove dynamic filter, I have a small setup<br />
	AND jh.run_date &gt;= CONVERT(INT, FORMAT(DATEADD(DAY, -7, GETDATE()), &#8216;yyyyMMdd&#8217;, &#8216;en-GB&#8217;))<br />
	&#8212; just using a magic number here for simplicity, 05 minutes 00 seconds<br />
	AND jh.run_duration &gt; 500<br />
ORDER BY<br />
	start_time</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eldritch-fossicker</title>
		<link>http://thinknook.com/job-agent-execution-run-timeline-report-graph-in-ssrs-2012-11-10/#comment-3327</link>
		<dc:creator><![CDATA[eldritch-fossicker]]></dc:creator>
		<pubDate>Tue, 17 Feb 2015 06:51:27 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=820#comment-3327</guid>
		<description><![CDATA[Thanks for sharing thought I would do the same. I ran into a snag with jobs that execute longer than 24hr. Some other changes to match my coding style. 

&lt;a href=&quot;https://gist.github.com/eldritch-fossicker/5a51739cc35487af655f#file-jobagent_sqljobagentscheduletimeline_dataset-sql&quot; title=&quot;complete code found here&quot; rel=&quot;nofollow&quot;&gt;]]></description>
		<content:encoded><![CDATA[<p>Thanks for sharing thought I would do the same. I ran into a snag with jobs that execute longer than 24hr. Some other changes to match my coding style. </p>
<p><a href="https://gist.github.com/eldritch-fossicker/5a51739cc35487af655f#file-jobagent_sqljobagentscheduletimeline_dataset-sql" title="complete code found here" rel="nofollow"></a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/products/


Served from: thinknook.com @ 2026-04-15 01:01:17 by W3 Total Cache
-->