﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Leo Peysakhovich / Article Discussions / Article Discussions by Author  / Controlling Unusually Long Running Jobs / 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>Wed, 22 May 2013 03:03:57 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Controlling Unusually Long Running Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic175914-163-1.aspx</link><description>&lt;P&gt;Check my article &lt;A href="http://www.sqlservercentral.com/columnists/lPeysakhovich/howtofindthatjobisrunning.asp"&gt;http://www.sqlservercentral.com/columnists/lPeysakhovich/howtofindthatjobisrunning.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It gives you some additions to the issue.&lt;/P&gt;</description><pubDate>Mon, 19 Dec 2005 21:05:00 GMT</pubDate><dc:creator>Leo Peysakhovich</dc:creator></item><item><title>RE: Controlling Unusually Long Running Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic175914-163-1.aspx</link><description>&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #fffbf0"&gt;I cannot understand the BOL either.  they posted the statuses, but no rows are populated untill the end of the step.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #fffbf0"&gt;Any news on this?&lt;/FONT&gt;&lt;/P&gt;</description><pubDate>Mon, 19 Dec 2005 17:29:00 GMT</pubDate><dc:creator>Rafael H</dc:creator></item><item><title>RE: Controlling Unusually Long Running Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic175914-163-1.aspx</link><description>&lt;P&gt;Will do it. It become interesting.&lt;/P&gt;&lt;P&gt;I am in class for 3 days. But then I will make some experiments and let you know. Thanks for the remark. Sorry for the error (if it is)&lt;/P&gt;</description><pubDate>Mon, 09 May 2005 08:15:00 GMT</pubDate><dc:creator>Leo Peysakhovich</dc:creator></item><item><title>RE: Controlling Unusually Long Running Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic175914-163-1.aspx</link><description>&lt;P&gt;Yeah, I'm not sure what the problem is really.  There is a run_status field in sysjobhistory but it doesn't get populated until the job finishes, which defeats the purpose of having that field (other than for failed or succeeded values).  &lt;/P&gt;&lt;P&gt;Perhaps BOL is in error, which wouldn't be the first time.&lt;/P&gt;&lt;P&gt;Either way, let me know what you find when you check it.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Mon, 09 May 2005 07:48:00 GMT</pubDate><dc:creator>SQLZ</dc:creator></item><item><title>RE: Controlling Unusually Long Running Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic175914-163-1.aspx</link><description>&lt;P&gt;I didn't check it. But I will. I was stating based on SQL Server Book on line.&lt;/P&gt;&lt;P&gt;&lt;TABLE cols=3 cellPadding=2 rules=all width=587 border=1 frame=box&gt;&lt;TBODY&gt;&lt;TR vAlign=top&gt;&lt;TD width="29%"&gt;&lt;B&gt;run_status&lt;/B&gt;&lt;/TD&gt;&lt;TD width="23%"&gt;&lt;B&gt;int&lt;/B&gt;&lt;/TD&gt;&lt;TD width="48%"&gt;Status of the job execution: &lt;P&gt;0 = Failed1 = Succeeded2 = Retry3 = Canceled4 = In progress&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;</description><pubDate>Mon, 09 May 2005 06:52:00 GMT</pubDate><dc:creator>Leo Peysakhovich</dc:creator></item><item><title>RE: Controlling Unusually Long Running Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic175914-163-1.aspx</link><description>You can use any type of email. Check internet there are bunch of articles how to use CDO mail object. I just didn't focus on mail portion. Sorry.</description><pubDate>Mon, 09 May 2005 06:48:00 GMT</pubDate><dc:creator>Leo Peysakhovich</dc:creator></item><item><title>RE: Controlling Unusually Long Running Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic175914-163-1.aspx</link><description>&lt;P&gt;I hope this is not too OT....&lt;/P&gt;&lt;P&gt;Is xp_sendmail still a preferred method of sending out messages from SQL Server?  In some shops I have worked in xp_sendmail is not set up properly, Microsoft security prevents it from being sent (i.e. when you use the command it uses the pop-up confirmation screen), and/or the DBA manager does not want to use it due to a hacker or program gaining control of SQL Server and sending out mail.&lt;/P&gt;&lt;P&gt;Maybe someone could enlighten us on the use of xp_sendmail and how to set it up properly and securely?&lt;/P&gt;&lt;P&gt;I would love to use this script, but the use of xp_sendmail concerns me a bit and maybe someone can give us a few tips.&lt;/P&gt;</description><pubDate>Mon, 09 May 2005 06:33:00 GMT</pubDate><dc:creator>James Beaty-208368</dc:creator></item><item><title>RE: Controlling Unusually Long Running Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic175914-163-1.aspx</link><description>&lt;P&gt;Leo,&lt;/P&gt;&lt;P&gt;good article.  However, there is an issue with your use of the sysjobhistory table.  You mention, near the end of your article, that if we want to check on jobs that are still running we should change the line: &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and soh.run_status = 1 -- successful jobs &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;with line &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and ( soh.run_status = 1 or soh.run_status = 4 ) -- successful and in progress jobs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;However, the sysjobhistory table does not get populated by history information until the job completes, which means you cannot check for jobs that are still in progress.&lt;/P&gt;&lt;P&gt;I would suggest using master..xp_sqlagent_enum_jobs instead, which will always give you a more up to date view of what is happening to your jobs.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description><pubDate>Mon, 09 May 2005 03:13:00 GMT</pubDate><dc:creator>SQLZ</dc:creator></item><item><title>Controlling Unusually Long Running Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic175914-163-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF="http://www.sqlservercentral.com/columnists/lPeysakhovich/controllingunusuallylongrunningjobs.asp"&gt;http://www.sqlservercentral.com/columnists/lPeysakhovich/controllingunusuallylongrunningjobs.asp&lt;/A&gt;</description><pubDate>Tue, 19 Apr 2005 20:50:00 GMT</pubDate><dc:creator>Leo Peysakhovich</dc:creator></item></channel></rss>