﻿<?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 Joey Doherty / Article Discussions / Article Discussions by Author  / Controlling 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>Fri, 24 May 2013 20:22:14 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>&lt;P&gt;OK guys - thanks for your input on that subject.&lt;/P&gt;&lt;P&gt;Anyone have anything else to discuss on the article?&lt;/P&gt;</description><pubDate>Thu, 07 Sep 2006 10:47:00 GMT</pubDate><dc:creator>Joe Doherty-260822</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>&lt;P&gt;An open discussion can bring out many good things.  Herb is OK though.  It is right to question everything.  Even the forum process.  Questions are the things that spur research.&lt;/P&gt;&lt;P&gt;We all have ideas.  Some good, some not so good.  It is by putting forth the ideas that we see if they can stand and walk on their own (like children).  We can openly debate ideas and techniques.  We must not debate people.  If some one is out of line, that should be handled one-on-one and off line.  I don't see anyone out of line here.&lt;/P&gt;&lt;P&gt;Outside phycists and cosmologists we IT folk have just about the most free and open discussions of any group that I have been part of.&lt;/P&gt;</description><pubDate>Thu, 07 Sep 2006 10:09:00 GMT</pubDate><dc:creator>Charles Kincaid</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>Joe,Thanks for the article and the technique.   I like the idea and think it will work well in a number of situations.I am unsure why 'Herb' is attacking the subsequent contributors though.  Surely discussing the pro's and con's of various ways of tackling the issue adds to the value of the article.It also may provide feedback on con's the author had not thought of.I personally like the technique above but it does not ensure the last task completes which is sometimes required.</description><pubDate>Thu, 07 Sep 2006 03:19:00 GMT</pubDate><dc:creator>Richard Josey</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>&lt;P&gt;I participate in forums as a way to &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;demostrate&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; that I am keeping up on industry standards and best practices.  I am very careful not to post trade secrets or customer information.  Good employers recognize this.  Some places even have a time code for this under continuing education.&lt;/P&gt;&lt;P&gt;I do this while I have long running jobs going, on lunch, or after hours.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Wed, 06 Sep 2006 12:01:00 GMT</pubDate><dc:creator>Charles Kincaid</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>Charles: Thanks for the enlightment (not being smart). I have never considered that and I am not one to be PC. I think in the future I'll do my responses from home.</description><pubDate>Wed, 06 Sep 2006 11:43:00 GMT</pubDate><dc:creator>Herb Overstreet-363572</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>&lt;P&gt;Sreejith,&lt;/P&gt;&lt;P&gt;I did mention this point in the article. I am simply trying to illustrate the point of using the GETDATE() function and a cursor as one way of controlling when a job might might end. There are limitations.&lt;/P&gt;&lt;P&gt;The article was was aimed at the beginner as well as suggesting an idea. Perhaps the reindex was a bad example to use but I hoped this would start the reader off so that they could continue and experiment with something that would work for themself.&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description><pubDate>Wed, 06 Sep 2006 11:06:00 GMT</pubDate><dc:creator>Joe Doherty-260822</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>&lt;P&gt;Herb one reason might be employement contracts.  One might be allowed to participate in a forum but if that same person publishes an article the employer might actually own it and the rights thereto.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Wed, 06 Sep 2006 10:49:00 GMT</pubDate><dc:creator>Charles Kincaid</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>Great article that can be used for almost any operation. But as you can see you will always get suggestions as to "How to something", but why all these didn’t "this is better" or "you can get the same by" contributors put their fingers to a keyboard and do it before now. Thanks for taking the time to submit your method. </description><pubDate>Wed, 06 Sep 2006 10:36:00 GMT</pubDate><dc:creator>Herb Overstreet-363572</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;This seems to be interesting. &lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;I think REINDEX has been used in the article just as an example. But the concept can be used anywhere. &lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Thank you, it is a good point. &lt;/P&gt;</description><pubDate>Wed, 06 Sep 2006 08:53:00 GMT</pubDate><dc:creator>Ravi Prashanth Lobo-275382</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>Another way to do this is to schedule another job to schedule an sp_stop_job.   This stops the job in a far less graceful way but at the time you specify rather than the period to complete the loop.Your solution will always overrun by an unknown amount.One way to do a one-off reindex would be to create a table with all the table names/ids in and a reindexed 0,1 bit column which got updated after the reindex statement.This way the job would not start at the beginning again.For ongoing maintenance you could use a date column and select your tables on reverse date order.These would work with both the loop and hard kill techniques.</description><pubDate>Wed, 06 Sep 2006 08:52:00 GMT</pubDate><dc:creator>Richard Josey</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>&lt;P&gt;Joe,&lt;/P&gt;&lt;P&gt;Have you thought about what will happen if the "REINDEX" within the loop takes 2 hours? SQL will issue the REINDEX and wait for it to be completed so your GETDATE() &amp;lt; @FinishTime will be ingnored within the loop. Any thoughts / ideas?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sreejith&lt;/P&gt;</description><pubDate>Wed, 06 Sep 2006 07:48:00 GMT</pubDate><dc:creator>Sreejith Sreedharan</dc:creator></item><item><title>RE: Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>&lt;P&gt;Joey,&lt;/P&gt;&lt;P&gt;We face the same problem on Indexes. However I just need one simple job.&lt;/P&gt;&lt;P&gt;Create and SP on one of you databases on your server and executed it using a job The content of this SP ==&amp;gt; &lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;exec sp_msforeachtable @command1="print'?' dbcc dbreindex ('?')" &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Yes....thats all&lt;/P&gt;&lt;P&gt;Running this on a full operational 100 Gb OLTP database takes just 2 hours to compete.&lt;/P&gt;&lt;P&gt;Regards,Guus KramerThe Netherlands&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Wed, 06 Sep 2006 00:05:00 GMT</pubDate><dc:creator>Guus Kramer</dc:creator></item><item><title>Controlling Jobs</title><link>http://www.sqlservercentral.com/Forums/Topic304277-322-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF="temp"&gt;temp&lt;/A&gt;</description><pubDate>Fri, 25 Aug 2006 16:26:00 GMT</pubDate><dc:creator>Joe Doherty-260822</dc:creator></item></channel></rss>