<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>youdidwhatwithtsql.com &#187; Execute SQL Task</title>
	<atom:link href="http://www.youdidwhatwithtsql.com/tag/execute-sql-task/feed" rel="self" type="application/rss+xml" />
	<link>http://www.youdidwhatwithtsql.com</link>
	<description>making DBAs everywhere curse!</description>
	<lastBuildDate>Tue, 31 Jan 2012 12:21:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Execute SQ&#8230; Procedure Task</title>
		<link>http://www.youdidwhatwithtsql.com/execute-sq-procedure-task/559</link>
		<comments>http://www.youdidwhatwithtsql.com/execute-sq-procedure-task/559#comments</comments>
		<pubDate>Tue, 19 Jan 2010 22:04:10 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Execute SQL Task]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/execute-sq-procedure-task/559</guid>
		<description><![CDATA[I&#8217;ve been having a bit of a debate with some colleagues today about the Execute SQL Procedure Task in SSIS. Is it ok to enter raw SQL queries into this task or should everything be enclosed within a Stored Procedure? My view&#8230; For me, any day of the week, it should always be a proc. [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/execute-sq-procedure-task/559">Execute SQ&#8230; Procedure Task</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having a bit of a debate with some colleagues today about the <a href="http://technet.microsoft.com/en-us/library/ms141003.aspx" target="_blank">Execute <strike>SQL</strike> Procedure Task</a> in <a href="http://www.microsoft.com/sqlserver/2005/en/us/integration-services.aspx" target="_blank">SSIS</a>. Is it ok to enter raw SQL queries into this task or should everything be enclosed within a <a href="http://en.wikipedia.org/wiki/Stored_procedure" target="_blank">Stored Procedure</a>? My view&#8230;</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200"><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/execute_sql_task_bad.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="execute sql task bad" border="0" alt="execute sql task bad thumb Execute SQ... Procedure Task" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/execute_sql_task_bad_thumb.png" width="244" height="209" /></a> </td>
<td valign="top" width="200"><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/red_x.gif"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="red x" border="0" alt="red x thumb Execute SQ... Procedure Task" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/red_x_thumb.gif" width="200" height="200" /></a> </td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200"><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/execute_procedure_task_good.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="execute_procedure_task_good" border="0" alt="execute procedure task good thumb Execute SQ... Procedure Task" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/execute_procedure_task_good_thumb.png" width="244" height="208" /></a> </td>
<td valign="top" width="200"><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/green_tick.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="green tick" border="0" alt="green tick thumb Execute SQ... Procedure Task" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/green_tick_thumb.jpg" width="204" height="204" /></a> </td>
</tr>
</tbody>
</table>
</p>
<p>For me, any day of the week, it should always be a proc. Why on earth would you want to enter raw queries into this task? I would argue against this even for basic message logging. Enclosing your TSQL in stored procedures gives you much more flexibility. It&#8217;s so much easier to make minor modifications to a proc. Would you rather have to go through the rigmarole of opening and deploying SSIS packages. Sure, I know you&#8217;ll have to open the package if you introduce, or remove, new columns. But you&#8217;re pretty much free to modify your WHERE without issue. Lets not forget this also allows your system to be modified by those who don&#8217;t know SSIS. Perhaps you&#8217;ll be able to enjoy your holiday a little better next year.</p>
<p>I&#8217;m even tempted to open a <a href="http://connect.microsoft.com/" target="_blank">Microsoft Connect</a> item to fix this &#8216;bug&#8217;. Perhaps one day I will be lucky enough to see this task available in my toolbox.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/execute_procedure_task.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="execute_procedure_task" border="0" alt="execute procedure task thumb Execute SQ... Procedure Task" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/01/execute_procedure_task_thumb.png" width="222" height="72" /></a></p>
<p><map name='google_ad_map_559_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/559?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_559_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=559&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Fexecute-sq-procedure-task%2F559' title="Execute SQ... Procedure Task" alt=" Execute SQ... Procedure Task" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/execute-sq-procedure-task/559">Execute SQ&#8230; Procedure Task</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/execute-sq-procedure-task/559" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/execute-sq-procedure-task/559/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

