<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Time Delay While Running T-SQL Query &#8211; WAITFOR Introduction</title>
	<atom:link href="http://blog.sqlauthority.com/2009/01/03/sql-server-time-delay-while-running-t-sql-query-waitfor-introduction/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/01/03/sql-server-time-delay-while-running-t-sql-query-waitfor-introduction/</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rick Sline</title>
		<link>http://blog.sqlauthority.com/2009/01/03/sql-server-time-delay-while-running-t-sql-query-waitfor-introduction/#comment-53921</link>
		<dc:creator>Rick Sline</dc:creator>
		<pubDate>Tue, 21 Jul 2009 13:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1947#comment-53921</guid>
		<description>Some years ago I could not get a job scheduled through the server (politics) and had to launch a mission critical application that was all in T-SQL every day at the later of:
1) 5am
2) when a particular record was written to a table each day.  On &quot;bad&#039; days this could be as late as 7 or 8am

I didn&#039;t want to keep hitting the server in a tight loop, so I&#039;d leave the SP running to fire at 5am to check for the record, I&#039;d then re-check every 10 minutes.  

As an aside, if &quot;the record&quot; wasn&#039;t in place by 6am I&#039;d normally be on the phone to the person responsible for that  process to see what the hold-up was.  for major delays I&#039;d cancel the job until I got the all-clear.</description>
		<content:encoded><![CDATA[<p>Some years ago I could not get a job scheduled through the server (politics) and had to launch a mission critical application that was all in T-SQL every day at the later of:<br />
1) 5am<br />
2) when a particular record was written to a table each day.  On &#8220;bad&#8217; days this could be as late as 7 or 8am</p>
<p>I didn&#8217;t want to keep hitting the server in a tight loop, so I&#8217;d leave the SP running to fire at 5am to check for the record, I&#8217;d then re-check every 10 minutes.  </p>
<p>As an aside, if &#8220;the record&#8221; wasn&#8217;t in place by 6am I&#8217;d normally be on the phone to the person responsible for that  process to see what the hold-up was.  for major delays I&#8217;d cancel the job until I got the all-clear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michael oneill</title>
		<link>http://blog.sqlauthority.com/2009/01/03/sql-server-time-delay-while-running-t-sql-query-waitfor-introduction/#comment-45582</link>
		<dc:creator>michael oneill</dc:creator>
		<pubDate>Tue, 13 Jan 2009 16:33:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1947#comment-45582</guid>
		<description>hi,
I use the WAITFOR command allot in DTS&#039;s while an External Application (WinRar) compacts Access MDB files that have just been created from SQL Views. Once the Delay has timed out I then publish the Zipped files to our website. The WAITFOR command saved me creating lots of different DTS or Batch files can kicking then off at different times.
Cheers Michael</description>
		<content:encoded><![CDATA[<p>hi,<br />
I use the WAITFOR command allot in DTS&#8217;s while an External Application (WinRar) compacts Access MDB files that have just been created from SQL Views. Once the Delay has timed out I then publish the Zipped files to our website. The WAITFOR command saved me creating lots of different DTS or Batch files can kicking then off at different times.<br />
Cheers Michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dena</title>
		<link>http://blog.sqlauthority.com/2009/01/03/sql-server-time-delay-while-running-t-sql-query-waitfor-introduction/#comment-45406</link>
		<dc:creator>Dena</dc:creator>
		<pubDate>Tue, 06 Jan 2009 13:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1947#comment-45406</guid>
		<description>We have the use for a waitfor due to our developers writing a process that returns a status code. We will give it 45 seconds, check the results and continue depending on the results.</description>
		<content:encoded><![CDATA[<p>We have the use for a waitfor due to our developers writing a process that returns a status code. We will give it 45 seconds, check the results and continue depending on the results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://blog.sqlauthority.com/2009/01/03/sql-server-time-delay-while-running-t-sql-query-waitfor-introduction/#comment-45318</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Sat, 03 Jan 2009 21:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1947#comment-45318</guid>
		<description>I have the same questions as John.

I understand the value of the first example to wait X seconds until doing something else, but I don&#039;t get why you would wait until a specific time to execute.

Why not use SQL Agent with a scheduled job?

I assume that second feature simply exists, but that best practices would be to use an agent job?

Is the benefit perhaps for a one time or semi-random AdHoc style situation?

Also how does it handle waiting for a specific time to execute?

Does it check in the background and thus consume resources the entire time it is waiting for the specified date/time or does it have a more efficient way of &quot;sleeping&quot; until it is needed?</description>
		<content:encoded><![CDATA[<p>I have the same questions as John.</p>
<p>I understand the value of the first example to wait X seconds until doing something else, but I don&#8217;t get why you would wait until a specific time to execute.</p>
<p>Why not use SQL Agent with a scheduled job?</p>
<p>I assume that second feature simply exists, but that best practices would be to use an agent job?</p>
<p>Is the benefit perhaps for a one time or semi-random AdHoc style situation?</p>
<p>Also how does it handle waiting for a specific time to execute?</p>
<p>Does it check in the background and thus consume resources the entire time it is waiting for the specified date/time or does it have a more efficient way of &#8220;sleeping&#8221; until it is needed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blog.sqlauthority.com/2009/01/03/sql-server-time-delay-while-running-t-sql-query-waitfor-introduction/#comment-45311</link>
		<dc:creator>John</dc:creator>
		<pubDate>Sat, 03 Jan 2009 11:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1947#comment-45311</guid>
		<description>Have you ever used WAITFOR in a production environment?

I&#039;ve never really seen much of a use for it and I&#039;d be interested to hear ideas of practical uses for it.

For any situations where I want to delay the start of a query (e.g. DBCC commands run outside of core business hours), I&#039;ve always used SQL Server Agent instead.</description>
		<content:encoded><![CDATA[<p>Have you ever used WAITFOR in a production environment?</p>
<p>I&#8217;ve never really seen much of a use for it and I&#8217;d be interested to hear ideas of practical uses for it.</p>
<p>For any situations where I want to delay the start of a query (e.g. DBCC commands run outside of core business hours), I&#8217;ve always used SQL Server Agent instead.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
