<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Michael Entin's notebook : SSIS</title><link>http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx</link><description>Tags: SSIS</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Does buffer.NextRow() skips the first row in a buffer?</title><link>http://blogs.msdn.com/michen/archive/2008/10/19/does-buffer-nextrow-skips-the-first-row-in-a-buffer.aspx</link><pubDate>Sun, 19 Oct 2008 10:33:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9006104</guid><dc:creator>michen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/michen/comments/9006104.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=9006104</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=9006104</wfw:comment><description>&lt;p&gt;I got a follow up question to &lt;a href="http://blogs.msdn.com/michen/archive/2007/08/31/Buffer.EndOfRowset.aspx" target="_blank" mce_href="http://blogs.msdn.com/michen/archive/2007/08/31/Buffer.EndOfRowset.aspx"&gt;my old post regarding enumerating rows in SSIS buffer&lt;/a&gt;, that suggested using following code to process rows in custom SSIS transform:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&lt;font color="#0000ff"&gt;while &lt;/font&gt;&lt;font color="#000000"&gt;(buffer.NextRow())        &lt;br /&gt;{         &lt;br /&gt;&amp;#160; &lt;/font&gt;&lt;font color="#008000"&gt;// do something with the row        &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Here is the question:&lt;/p&gt;  &lt;blockquote class="Q"&gt;buffer.NextRow() moves the pointer forward, so following your code to the letter will make you skip the first row. &lt;/blockquote&gt;  &lt;p&gt;Does it? Actually, no. It behaves like many other enumeration interfaces, e.g. COM's IEnumVariant and .NET's IEnumerator, so I'll quote documentation from &lt;a class="" href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerator.movenext.aspx" target="_blank" mce_href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerator.movenext.aspx"&gt;IEnumerator::MoveNext&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;After an enumerator is created or after the &lt;span sdata="cer" target="M:System.Collections.IEnumerator.Reset"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl33" onclick="javascript:Track(&amp;#39;ctl00_rs1_mainContentContainer_cpe691486_c|ctl00_rs1_mainContentContainer_ctl33&amp;#39;,this);" href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerator.reset.aspx"&gt;&lt;font color="#0033cc"&gt;Reset&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; method is called, an enumerator is positioned before the first element of the collection, and the first call to the &lt;span sdata="cer" target="M:System.Collections.IEnumerator.MoveNext"&gt;&lt;span class="selflink"&gt;&lt;strong&gt;MoveNext&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; method moves the enumerator over the first element of the collection. &lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Can you guess why it was designed this way? Let's think what would happen, if the enumerator was positioned on the first element (row in SSIS case) initially. How would we know if the first element exists at all? The enumerator would have to provide another property, like EndOfCollection - making everything more complicated. Note that as explained in my linked post, buffer.EndOfRowset() is not such an indicator. It does not tell you that enumerator finished enumerating rows in current buffer, it tells you that current buffer is the very last buffer you will receive. &lt;/p&gt;  &lt;p&gt;With enumerator initially positioned before first row, you call NextRow() which will immediately return false if the collection is empty, and position iterator to first row if it exists. So the code is correct.&lt;/p&gt;  &lt;p&gt;A note regarding my original post: the SSIS team found that this change caused too many problems for the users, so the final release of SSIS 2008 reverted back to the SSIS 2005 behavior. Interestingly, it was not a simple undo of code change, as the data flow engine has been substantially rewritten, but a new code to simulate the old behavior. Thus the &amp;quot;wrong&amp;quot; code will keep working in 2008. I still recommend changing it according to my previous blog - I think my loop just looks cleaner :).&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9006104" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS+Programming/default.aspx">SSIS Programming</category></item><item><title>Lookup multiple rows?</title><link>http://blogs.msdn.com/michen/archive/2008/06/07/lookup-multiple-rows.aspx</link><pubDate>Sat, 07 Jun 2008 11:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8579759</guid><dc:creator>michen</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/michen/comments/8579759.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=8579759</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=8579759</wfw:comment><description>&lt;P&gt;Can SSIS Lookup do what this user wants it to do? 
&lt;BLOCKQUOTE class=Q&gt;
&lt;P&gt;I have a problem with a lookup output, I get this warning: The Lookup transformation encountered duplicate reference key values when caching reference data. I know what it is, but I don't like to avoid this warning, I'd like to get all the rows (two in this case) that the lookup output provides me.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Unfortunately, no - the reason is that Lookup transform is &lt;A class="" href="http://msdn.microsoft.com/en-us/library/ms136027.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ms136027.aspx"&gt;synchronous&lt;/A&gt;, i.e. it does not add new rows or remove rows*, it just modifies the values - i.e. it can't produce two output rows for&amp;nbsp;one input&amp;nbsp;row.&lt;/P&gt;
&lt;P&gt;It would of course be possible to make an asynchronous Lookup, or provide an option, but the current Lookup is complex enough, that I think more options would kill it :)&lt;/P&gt;
&lt;P&gt;If you need this functionality, you can use Merge Join transform.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Notes&lt;/U&gt;&lt;BR&gt;*What happens with the rows that are redirected to "not found" output in SSIS 2008? They are not deleted from the buffer (synchronous transform can't do it), they are just marked as belonging to the other path, and the components on the main path do not see them.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8579759" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS+Lookup/default.aspx">SSIS Lookup</category></item><item><title>Configuring .NET for running SSIS packages from custom applications</title><link>http://blogs.msdn.com/michen/archive/2008/03/14/configuring-net-for-running-ssis-packages-from-custom-applications.aspx</link><pubDate>Sat, 15 Mar 2008 01:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8212671</guid><dc:creator>michen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/michen/comments/8212671.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=8212671</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=8212671</wfw:comment><description>&lt;P&gt;If you&amp;nbsp;&lt;A class="" href="http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx" mce_href="http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx"&gt;execute SSIS packages&lt;/A&gt; from custom applications, you own the application and thus you are responsible for configuring .NET runtime properly to get the maximum performance.&lt;/P&gt;
&lt;P&gt;.NET configuration is usually performed using .exe.config files, so it is a just matter of providing good config file. How do you know what is good? The simplest way is to look at the config file that SSIS provides, and copy the appropriate settings. Now let's take a look at DTExec.exe.config provided with SQL Server 2008 and discuss the choices made by SSIS team.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;startup&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;requiredRuntime&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;version&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;v2.0.50727&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;startup&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;runtime&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;gcServer&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;enabled&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;disableCommitThreadStack&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;enabled&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;generatePublisherEvidence&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;enabled&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;runtime&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;configuration&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#a31515&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/a5dzwzc9.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/a5dzwzc9.aspx"&gt;&lt;STRONG&gt;requiredRuntime&lt;/STRONG&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;- this line simply tells which version of .NET you want to use. 2.0 or above should be good.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#a31515&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms229357.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/ms229357.aspx"&gt;&lt;STRONG&gt;gcServer&lt;/STRONG&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;- DTEXEC uses the "server" version of garbage collector. Server GC performs better for typical SSIS load, especially&amp;nbsp;on multiprocess machines. This is important if your SSIS package uses managed transforms (e.g. ADO.NET source, script transform, or custom transform written in .NET).&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#a31515&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/bb882564.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/bb882564.aspx"&gt;&lt;STRONG&gt;disableCommitThreadStack&lt;/STRONG&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;- by default .NET commits the thread stacks (i.e. reserves memory for stacks&amp;nbsp;- usually from page file). But SSIS creates a lot of threads, while typically uses little stack space, so it performs better if stack memory is not immediately committed when the thread is created. With&amp;nbsp;this option&amp;nbsp;your application&amp;nbsp;might perform a bit better and require smaller page file (note that anyway, the page file&amp;nbsp;is not really used until needed). The drawback of this choice is that application might fail if Windows is totally out of memory, and application&amp;nbsp;can't extend its stack. But in this situation something has already gone bad, and it is probably better to fail fast in this case anyway.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#a31515&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/bb629393.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/bb629393.aspx"&gt;&lt;STRONG&gt;generatePublisherEvidence&lt;/STRONG&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/FONT&gt;- this tells .NET runtime the DTEXEC does not use Publisher evidence, and thus .NET does not&amp;nbsp;have to verify authenticode signatures. This increases the startup performance a little bit, but mainly prevents &lt;A class="" href="http://support.microsoft.com/kb/918644" target=_blank mce_href="http://support.microsoft.com/kb/918644"&gt;problems that may occur&amp;nbsp;when authenticode checks certificate revocation list&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Now that you know these options made by SSIS team, you may test and decide whether they are appropriate for your application as well, and copy them to your application's config file if needed.&lt;/P&gt;
&lt;P&gt;P.S. Also make sure you create SSIS package using MTA thread, see Matt's blog for details:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/mattm/archive/2007/09/14/running-packages-from-custom-applications.aspx"&gt;http://blogs.msdn.com/mattm/archive/2007/09/14/running-packages-from-custom-applications.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8212671" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS+Programming/default.aspx">SSIS Programming</category></item><item><title>SSIS event handler threading</title><link>http://blogs.msdn.com/michen/archive/2008/02/01/event-handler-threading.aspx</link><pubDate>Fri, 01 Feb 2008 23:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7379625</guid><dc:creator>michen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/michen/comments/7379625.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=7379625</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=7379625</wfw:comment><description>&lt;P&gt;I've got an interesting question/statement about event handlers:&lt;/P&gt;
&lt;BLOCKQUOTE class=Q&gt;Tasks fire the same EH at the same time. My understanding is all EHs fire at the same time (Parallel).&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If I understand the question correctly,&amp;nbsp;the&amp;nbsp;package has an &lt;STRONG&gt;event handler&lt;/STRONG&gt; that can&amp;nbsp;handle multiple &lt;STRONG&gt;events&lt;/STRONG&gt;, and these events fire at about the same time. What happens?&lt;/P&gt;
&lt;P&gt;Well, I did not work much with event handlers, so let's experiment and test how it works. This is really simple. I've create a package with two dummy script tasks A and B (not connected with any precedence constraints) that fail (by returning failure) and OnError event handler on the Package. The event handler contains a simple script task that prints the name of the event source:&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;MsgBox(Dts.Variables(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"SourceName"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;).Value, MsgBoxStyle.Information, &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"Event Handler"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;What will be the result of executing this? Will we get two message boxes at the same time, or sequentially two message boxes? &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;The answer is - two message boxes popup sequentially one after another, but never at the same time. Ssometimes A is the first, sometimes B. The event handler (like any other task) is not reentrable and only a single instance of an event handler can be running at a time, thus the second event has to wait for the event handler to finish processing the first event before processing the next one.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7379625" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SQL 2008 &amp; VS 2008</title><link>http://blogs.msdn.com/michen/archive/2007/12/04/SQL-2008-and-VS-2008.aspx</link><pubDate>Wed, 05 Dec 2007 09:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6663107</guid><dc:creator>michen</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/michen/comments/6663107.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=6663107</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=6663107</wfw:comment><description>Currently SQL Business Intelligence Development Studio (BIDS) and all the project types (AS, IS and RS) live in Visual Studio 2005. So don't try to open a solution that contains IS project in VS 2008 yet. What about final SQL 2008 - now that Visual Studio 2008 is released - what are the plans for BIDS and support of BI projects VS 2008?...(&lt;a href="http://blogs.msdn.com/michen/archive/2007/12/04/SQL-2008-and-VS-2008.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6663107" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/Katmai/default.aspx">Katmai</category></item><item><title>Deploying packages</title><link>http://blogs.msdn.com/michen/archive/2007/11/07/deploying-packages.aspx</link><pubDate>Wed, 07 Nov 2007 12:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5955354</guid><dc:creator>michen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/michen/comments/5955354.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=5955354</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=5955354</wfw:comment><description>&lt;P mce_keep="true"&gt;How can one deploy packages programmatically? Here is the original question - &lt;/P&gt;
&lt;BLOCKQUOTE class=Q&gt;
&lt;P mce_keep="true"&gt;Is it possible to deploy a package programmatically? We have an application which has a work flow for approval of object. If the object (ssis package) is approved by the concerned authority it has to be deployed to sql server. How can this code be integrated into the application?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;First, what does it mean to deploy a package? The package is simply a document (DTSX file). SSIS&amp;nbsp;utilities (DTEXEC, DTUTIL and other)&amp;nbsp;natively support three locations for&amp;nbsp;such files:&amp;nbsp;the actual file in the OS file system, a row in SQL table, or virtualized file in SSIS storage (which wraps the previous two). If you use custom application to run your packages, you can store them anywhere you want (e.g. application resources) - and use &lt;A class="" href="http://technet.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.package.loadfromxml.aspx" target=_blank mce_href="http://technet.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.package.loadfromxml.aspx"&gt;LoadFromXML&lt;/A&gt; to load it.&lt;/P&gt;
&lt;P&gt;Since package is just a file, in most cases simply copying a file to destination directory location, or to SQL table is all it takes to deploy a package. One can use SSIS API&amp;nbsp;(like &lt;A class="" href="http://blogs.msdn.com/controlpanel/blogs/is%20it%20possivle%20to%20deploy%20a%20package%20programmatically? we have an application which have a work flow for approval of object. if the object(ssis package) is approved by the concerned authority it has to be deployed to sql server. How can this code be integrated into the application?" target=_blank mce_href="http://blogs.msdn.com/controlpanel/blogs/is it possivle to deploy a package programmatically? we have an application which have a work flow for approval of object. if the object(ssis package) is approved by the concerned authority it has to be deployed to sql server. How can this code be integrated into the application?"&gt;SaveToSqlServer&lt;/A&gt;) to do this, run DTUTIL, or copy file using Win32 or .NET APIs.&lt;/P&gt;
&lt;P&gt;In some cases it is necessary to make some adjustments to the package, e.g. if you have multiple packages calling each other - modify the parent package to correctly reference new location of child package(s). This can be done using SSIS API as well, but it is easier and usually better for maintainability to do this using SSIS configurations - edit the configuration values instead of the package itself.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5955354" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>Don't run SSIS package using SQL/CLR</title><link>http://blogs.msdn.com/michen/archive/2007/08/24/don-t-run-ssis-package-using-sql-clr.aspx</link><pubDate>Sat, 25 Aug 2007 03:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4550316</guid><dc:creator>michen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/michen/comments/4550316.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=4550316</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=4550316</wfw:comment><description>&lt;P&gt;A&amp;nbsp;recent &lt;A class="" title=Comment href="http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx#4401800" mce_href="http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx#4401800"&gt;commenter&lt;/A&gt; suggested running SSIS using SQL/CLR:&lt;/P&gt;
&lt;BLOCKQUOTE class=Q&gt;
&lt;P&gt;Just an idea on how to do this that may be a bit easier than any of the methods covered. &amp;nbsp;IF you were to write a CLR procedure which accepts a string as its parameter. &amp;nbsp;The string passed in would be the xml definition of a package (either loaded from a source (file, server, etc)or from an application which is able to create the package definition). &amp;nbsp;Then using the CLR procecure that I mentioned above (which has references to the DTS runtime), you could use the Microsoft.SqlServer.Dts.Runtime.Package LoadFromXML() method to flesh out an empty package and then the Execute() method to actually run it. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This may look like a good idea, but don't do this. The reason is that SQL Server has very&amp;nbsp;strict requirements on the type of code running inside (this is how it achieves the great reliability, and why by default it only allows "safe" .NET code and only selected system assemblies). It takes a lot of effort to "harden" code to satisfy these requirements. See e.g. this excellent article by Joe Duffy describing one of the issues: &lt;A href="http://www.bluebytesoftware.com/blog/2007/08/23/ThreadInterruptsAreAlmostAsEvilAsThreadAborts.aspx"&gt;http://www.bluebytesoftware.com/blog/2007/08/23/ThreadInterruptsAreAlmostAsEvilAsThreadAborts.aspx&lt;/A&gt;. Only a subset of .NET framework has been "hardened" to qualify.&lt;/P&gt;
&lt;P&gt;The SSIS uses "unsafe" .NET code, and we've not done enough testing of SSIS and dependencies inside SQL Server to recommend running it this way, so it is unsupported.&lt;/P&gt;
&lt;P&gt;You'd be safer if you write a web service application that does it, and the extra benefit - &lt;A class="" title="Running SSIS package via Web Service" href="http://msdn2.microsoft.com/en-us/library/ms403355.aspx#service" mce_href="http://msdn2.microsoft.com/en-us/library/ms403355.aspx#service"&gt;SQL Books Online has sample code&lt;/A&gt;!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4550316" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS+Programming/default.aspx">SSIS Programming</category></item><item><title>Do I have to be admin?</title><link>http://blogs.msdn.com/michen/archive/2007/06/25/ssis_5F00_admin.aspx</link><pubDate>Tue, 26 Jun 2007 07:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3536921</guid><dc:creator>michen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/michen/comments/3536921.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=3536921</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=3536921</wfw:comment><description>&lt;P&gt;Often, I see people reporting "zzz fails if I'm not admin". Do I have to be machine admin to use SSIS?&lt;/P&gt;
&lt;P&gt;Well, absolutely no. Most SSIS tasks can be performed without being admin at all. Actually, I develop on Vista machine and I very rarely need to &lt;A class="" title="Vista UAC step by step" href="http://technet2.microsoft.com/WindowsVista/en/library/0d75f774-8514-4c9e-ac08-4c21f5c6c2d91033.mspx?mfr=true" target=_blank mce_href="http://technet2.microsoft.com/WindowsVista/en/library/0d75f774-8514-4c9e-ac08-4c21f5c6c2d91033.mspx?mfr=true"&gt;elevate to admin status&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Then why would&amp;nbsp;you get errors if&amp;nbsp;you are not admins? Most often you don't have access to whatever data source or package location you use. E.g. if you load a package from SQL Server, you need to have access to this SQL Server.&amp;nbsp;Often people automatically get access because they are local admins, but for other users,&amp;nbsp;access should be configured explicitly.&lt;/P&gt;
&lt;P&gt;Same is true for database and file connections at package execution time: if package tries to access something, the user who runs the package has to have an access to this resource (assuming package is using integrated authentication). So if your package fails when run as non-admin, the first step to do is turn on SSIS or console logging and see what error you get - this will point to the resource for which you need permissions.&lt;/P&gt;
&lt;P&gt;Do I ever have to be machine administrator when working with SSIS? Yes, there are several situations when admin is needed.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;First, when you look at the running packages in SSMS, you'll only see your own packages if you are non-admin. If you need to see all packages, you need to be machine admin (unfortunately, it is controlled by admin membership - would be better to have specialized role for this).&lt;/LI&gt;
&lt;LI&gt;Second, if you are developing custom task or transform in managed code, you'll need to install it to GAC - this requires machine admin as well.&lt;/LI&gt;
&lt;LI&gt;When developing in native code, this is usually simpler - you register the task once as admin; later you can compile it as regular user.&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3536921" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/non-admin/default.aspx">non-admin</category></item><item><title>SSIS Backpressure Mechanism</title><link>http://blogs.msdn.com/michen/archive/2007/06/12/ssis-backpressure-mechanism.aspx</link><pubDate>Wed, 13 Jun 2007 05:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3260307</guid><dc:creator>michen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/michen/comments/3260307.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=3260307</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=3260307</wfw:comment><description>&lt;P&gt;One of the mechanisms that SSIS data flow engine utilizes to achieve high performance is “back pressure”.&lt;/P&gt;
&lt;P&gt;Let’s consider a simple package with a source and destination. What happens if the source is fast and destination is slow? Say source is huge local raw file and destination is a remote relational database. If we read the source data with full speed, we would need a lot of memory to store all the data we’ve read, but could not write yet. In many cases we’d simply run out of memory or had to swap data to hard drive.&lt;/P&gt;
&lt;P&gt;To avoid this, SSIS limits the speed of sources by controlling the number of active buffers inside each execution tree. This way you can process fast sources without running out of memory.&lt;/P&gt;
&lt;P&gt;If a source or an async component is too fast (compared to the the transformations or destination down the path), the source is suspended when its execution tree gets too many buffers (currently this is fixed at 5 buffers). If the source is slow (i.e. transforms and destinations can process data faster than sources generate it), the back-pressure mechanism does not get involved and sources can run with full speed.&lt;/P&gt;
&lt;P&gt;Unfortunately, in SQL 2005 we did not have any diagnostics that would tell user what is the slow part of the flow - the source or the transforms/destination. In Katmai (SQL 2008) if the back-pressure kicks in during package execution, at the end of package execution we report the total time that the source had to wait because of this mechanism. &lt;/P&gt;
&lt;P&gt;What would you do with this information? If you run the package and see that the time a particular source was suspended is zero or&amp;nbsp;relatively low (compared to the total execution time), you know the source is the slowest part of the data flow, and you need to focus on optimizing the source. E.g. you may remove unused columns from the query, simplify SQL statements, create indexes, etc.&lt;/P&gt;
&lt;P&gt;But if a source reported&amp;nbsp;that it has been&amp;nbsp;suspected most of the time (considerable part of the total package execution time), you know the source is fast enough and you need to concentrate on performance of transforms and destinations.&lt;/P&gt;
&lt;P&gt;Another implication of back pressure is that the source database connection can be opened longer than it is needed to execute the query otherwise. If you see that a source has been suspended for several minites, and you don't want to hold the appropriate database connection for such a long time, consider staging source data in raw files as suggested by Jamie Thomson at&lt;BR&gt;&lt;A href="http://blogs.conchango.com/jamiethomson/archive/2006/12/12/SSIS_3A00_-Dropping-data-into-a-raw-file.aspx"&gt;http://blogs.conchango.com/jamiethomson/archive/2006/12/12/SSIS_3A00_-Dropping-data-into-a-raw-file.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3260307" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/Perf/default.aspx">Perf</category><category domain="http://blogs.msdn.com/michen/archive/tags/Katmai/default.aspx">Katmai</category></item><item><title>Katmai SSIS data flow task improvements</title><link>http://blogs.msdn.com/michen/archive/2007/06/11/katmai-ssis-data-flow-improvements.aspx</link><pubDate>Mon, 11 Jun 2007 10:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3223657</guid><dc:creator>michen</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/michen/comments/3223657.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=3223657</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=3223657</wfw:comment><description>&lt;P&gt;With first Katmai (SQL Server 2008) CTP out, I think it is time to blog about some performance and scalability improvements in this release.&lt;/P&gt;
&lt;P&gt;I'll assume readers are familiar with SSIS data flow performance concepts, if not make sure you've read these two articles:&lt;BR&gt;&lt;A href="http://www.microsoft.com/technet/prodtechnol/sql/2005/ssisperf.mspx" mce_href="http://www.microsoft.com/technet/prodtechnol/sql/2005/ssisperf.mspx"&gt;http://www.microsoft.com/technet/prodtechnol/sql/2005/ssisperf.mspx&lt;/A&gt;&lt;BR&gt;&lt;A href="http://www.simple-talk.com/sql/sql-server-2005/sql-server-2005-ssis-tuning-the-dataflow-task/" mce_href="http://www.simple-talk.com/sql/sql-server-2005/sql-server-2005-ssis-tuning-the-dataflow-task/"&gt;http://www.simple-talk.com/sql/sql-server-2005/sql-server-2005-ssis-tuning-the-dataflow-task/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The most important concepts for today are:&lt;BR&gt;&lt;STRONG&gt;Asynchronous components&lt;/STRONG&gt; - components that create new rows and thus new data flow buffers (compare to synchronous components that modify data in the incoming buffers, but can't create or remove rows). Both blocking and partially blocking components (in terms of ssisperf whitepaper linked above) are asynchronous.&lt;BR&gt;&lt;STRONG&gt;Execution trees&lt;/STRONG&gt; - the tree describing the path a data buffer takes through the components, from start to end. The tree starts with a source or async component and usually ends with a destination or sometimes with a transform. It is a tree (not a simple list) because some transforms, e.g. Multicast "split" the data flow into multiple logical paths, but avoid buffer duplication - all sub-trees use the same "physical" buffer.&lt;/P&gt;
&lt;P&gt;In SQL 2005 each execution tree was assigned a single OS thread ("worker thread"), and under some conditions (complex packages with&amp;nbsp;small data flow EngineThreads property value) several execution trees could share a thread. One benefit of this approach is that all thread scheduling was done in advance during pre-execution phase, so the data flow did not have to spend any time to assign threads at runtime.&lt;/P&gt;
&lt;P&gt;But there were several drawbacks: since the data flow did not know relative amount of work per execution tree, the scheduling could be suboptimal. Also, if you had simple package with just one or two execution trees, you would only use one or two processors, and the package might not benefit from high-end multiprocessor machine. You may have a lot of synchronous components, but if they share the same execution tree, they used to share the thread too. Even if you logically split the data flow using Multicast (synchronous transform), all output paths of Multicast belong to the same execution tree, and thus are executed serially by Yukon data flow task.&lt;/P&gt;
&lt;P&gt;To achieve high level of parallelism on a multiprocessor machine, you had to split an execution tree, either by splitting the tree into independent paths, or by inserting async transforms to create a new tree. UnionAll could be used for later, as described in the ssisperf whitepaper. If you insert UnionAll with one input, it does not change the outputs, but splits the execution tree into two&amp;nbsp;new trees - each can be executed on its own processor. The drawback is that the UnionAll is async transform, and thus has to copy data, so it might have a noticeable performance overhead.&amp;nbsp;You should only use this trick if you checked that your package benefits from this extra parallelism. Usually packages already have multiple data flows, or multiple execution trees inside single data flow, so they don't need to do this. But if you have a very high-end machine and a pipeline that takes too long and does not use all the processors, you should try it (make a backup copy of original package and compare the performance before commiting to this change).&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now the good news: you don't need to worry about any of this or use the UnionAll trick anymore! In Katmai, the data flow was redesigned to do dynamic scheduling and can now execute multiple components in parallel, even if they belong to the same execution tree. The overhead of dynamic scheduling is very small. We sometimes saw a very small (~1%) performance loss on single processor machines, but on multiprocessor machines you'll usually see performance improvement, especially if you had to use UnionAll trick to introduce more parallelism and remove it when you move to Katmai.&lt;/P&gt;
&lt;P&gt;As most server machines now have two or more processors or at least Hyper Threading, we think most users will see the performance improvements from this change. And you get the best performance automatically, no need to think if you need to introduce more parallelism by adding UnionAll transform, one less bullet to worry about.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3223657" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/Perf/default.aspx">Perf</category><category domain="http://blogs.msdn.com/michen/archive/tags/Katmai/default.aspx">Katmai</category></item><item><title>SqlPerf blog on SSIS performance</title><link>http://blogs.msdn.com/michen/archive/2007/04/24/sqlperf-blog-on-ssis-performance.aspx</link><pubDate>Tue, 24 Apr 2007 21:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2262927</guid><dc:creator>michen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/michen/comments/2262927.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=2262927</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=2262927</wfw:comment><description>&lt;P&gt;Runying Mao and Len Wyatt did a great study of SSIS performance, and posted some results:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Getting Optimal Performance with Integration Services Lookups&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/sqlperf/archive/2007/04/24/getting-optimal-performance-with-integration-services-lookups.aspx" mce_href="http://blogs.msdn.com/sqlperf/archive/2007/04/24/getting-optimal-performance-with-integration-services-lookups.aspx"&gt;http://blogs.msdn.com/sqlperf/archive/2007/04/24/getting-optimal-performance-with-integration-services-lookups.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;OLEDB Source with Views&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/sqlperf/archive/2007/04/29/set-up-ole-db-source-to-read-from-view-efficiently.aspx"&gt;http://blogs.msdn.com/sqlperf/archive/2007/04/29/set-up-ole-db-source-to-read-from-view-efficiently.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BLOB and buffer temporary storage&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/sqlperf/archive/2007/05/01/set-blobtempstoragepath-and-buffertempstoragepath-to-fast-drives.aspx"&gt;http://blogs.msdn.com/sqlperf/archive/2007/05/01/set-blobtempstoragepath-and-buffertempstoragepath-to-fast-drives.aspx&lt;/A&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SSIS Performance Counters&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/sqlperf/archive/2007/05/01/something-about-ssis-performance-counters.aspx"&gt;http://blogs.msdn.com/sqlperf/archive/2007/05/01/something-about-ssis-performance-counters.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Buffer size adjustments&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/sqlperf/archive/2007/05/11/adjust-buffer-size-in-ssis-data-flow-task.aspx"&gt;http://blogs.msdn.com/sqlperf/archive/2007/05/11/adjust-buffer-size-in-ssis-data-flow-task.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Parallel execution&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://blogs.msdn.com/sqlperf/archive/2007/05/11/implement-parallel-execution-in-ssis.aspx"&gt;http://blogs.msdn.com/sqlperf/archive/2007/05/11/implement-parallel-execution-in-ssis.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2262927" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS+Lookup/default.aspx">SSIS Lookup</category><category domain="http://blogs.msdn.com/michen/archive/tags/Perf/default.aspx">Perf</category></item><item><title>COM references within an SSIS Script Component</title><link>http://blogs.msdn.com/michen/archive/2007/04/22/com-references-within-an-ssis-script-component.aspx</link><pubDate>Sun, 22 Apr 2007 12:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2231302</guid><dc:creator>michen</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/michen/comments/2231302.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=2231302</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=2231302</wfw:comment><description>&lt;P&gt;The SSIS Script Task and Script Component editors don't provide&amp;nbsp;functionality (available in full VS)&amp;nbsp;to add a reference to unmanaged COM components. Can this be done at all?&lt;/P&gt;
&lt;P&gt;Well, yes, although lack of GUI option in VSA (which SSIS uses for editing and debugging scripts) makes it a bit complex. We'll need to create an interop assembly using command line tools, install the assembly into &lt;A class="" title="What's GAC?" href="http://msdn2.microsoft.com/en-us/library/yf1d93sz(VS.80).aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/yf1d93sz(VS.80).aspx"&gt;GAC&lt;/A&gt; and .NET Frameworks folder, and then VSA will be able reference it. You'll need &lt;A class="" title=".NET download center" href="http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx"&gt;.NET SDK&lt;/A&gt; or Visual Studio to do this.&lt;/P&gt;
&lt;P&gt;Open .NET SDK command prompt.&amp;nbsp;First, generate a key for creating strong names for your assemblies. You may have already created a key for custom task or transform - then skip this step and use existing key.&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;A class="" title="SN tool documentation" href="http://msdn2.microsoft.com/en-us/library/k5b5tt23(VS.80).aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/k5b5tt23(VS.80).aspx"&gt;sn.exe&lt;/A&gt; -k MyKey.snk&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Now find the COM component and generate interop assembly:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;A class="" title="GACUTIL tool documentation" href="http://msdn2.microsoft.com/en-us/library/tt0cf3sx(VS.80).aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/tt0cf3sx(VS.80).aspx"&gt;tlbimp.exe&lt;/A&gt; "C:\...\MyComObj.dll" /out:Interop.MyComObj.dll /keyfile:MyKey.snk&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Install the assembly into GAC: drag it to &lt;CODE&gt;c:\Windows\Assembly&lt;/CODE&gt; folder or run following command (this step should be repeated on every machine where you'll &lt;STRONG&gt;run&lt;/STRONG&gt; this package):&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;A class="" title="GACUTIL tool documentation" href="http://msdn2.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx"&gt;gacutil.exe&lt;/A&gt; /i Interop.MyComObj.dll&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;and also copy it to &lt;CODE&gt;c:\Windows\Microsoft.NET\Framework\v2.0.50727 folder&lt;/CODE&gt; (this step is only required on machine where you &lt;STRONG&gt;edit&lt;/STRONG&gt; the scripts, except if you turn off the option to precompile scripts - then it is also needed at machines where you run packages).&lt;/P&gt;
&lt;P&gt;Things to be aware of: the code executed by script task or script component always runs on multi-threaded COM apartment (MTA, same as when using&amp;nbsp;&lt;A class="" title="MTA Thread Attribute" href="http://msdn2.microsoft.com/en-us/library/system.mtathreadattribute.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/system.mtathreadattribute.aspx"&gt;[MTAThread]&lt;/A&gt;), so using COM components marked as Free/Both is fine, but using STA components will use marshalling and might be slow or broken (as in case of &lt;A class="" title="Description of SqlXml COM component" href="http://msdn2.microsoft.com/en-us/library/ms171878.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/ms171878.aspx"&gt;SqlXml&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;This blog by Jamie Thomson contains some useful background information as well:&lt;BR&gt;&lt;A href="http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2341.aspx"&gt;http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2341.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2231302" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS+Scripting/default.aspx">SSIS Scripting</category></item><item><title>64-bit references within an SSIS Script Component</title><link>http://blogs.msdn.com/michen/archive/2007/04/19/64-bit-references-within-an-ssis-script-component.aspx</link><pubDate>Fri, 20 Apr 2007 01:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2198343</guid><dc:creator>michen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/michen/comments/2198343.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=2198343</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=2198343</wfw:comment><description>&lt;P&gt;I was forwarded a question about SSIS Script&amp;nbsp;Component on 64-bit, I think the answer may benefit others as well:&lt;/P&gt;
&lt;BLOCKQUOTE class=Q&gt;
&lt;P&gt;Currently we are referencing a 32-bit third party component in a script component and running the SSIS package in 32 bit mode on a X64 bit server.&amp;nbsp;Recently, the third party vendor has made available a 64-bit version of this component and we would like to reference this version in our script task in order to run the package in 64-bit mode.&lt;/P&gt;
&lt;P&gt;What we are experiencing is that script component “Add Reference” dialog only browses to the 32 bit framework folder and not the framework64 folder.&lt;/P&gt;
&lt;P&gt;Is it possible for the script component to reference a 64-bit assembly? &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;First a small explanation for those puzzled by the question. Most .NET assemblies are platform neutral, meaning the same assembly can be run on 32-bit and 64-bit platform. For neutral assemblies the problem does not occur at all. But some assemblies may be created for&amp;nbsp;32-bit or for 64-bit&amp;nbsp;platform only, or a separate version of the assembly is built for each platform. E.g. if some external unmanaged code (usually a COM component) that the assembly uses is available on 32-bit platform only, you should mark your assembly as 32-bit only to prevent attempts to use it on 64-bit.&amp;nbsp;If the interface of dependency is different between the platforms, you might build a separate version for each platform. E.g. Microsoft does this for System.Transactions assembly.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Now back to the question:&amp;nbsp;can one use 64-bit version of external assembly in Script Component?&lt;/P&gt;
&lt;P mce_keep="true"&gt;Well, you can't reference the 64-bit assembly&amp;nbsp;in the Script editor (VSA), because it is 32-bit application. But let's look at how .NET loads depedent assemblies from GAC: it first tries to load &lt;STRONG&gt;current &lt;/STRONG&gt;platform-specific version, if it is not found it tries MSIL (neutral) version. The "current" here means determined by bitness of the current process. It does not matter if the assembly was &lt;STRONG&gt;compiled&lt;/STRONG&gt; with 64-bit or with 32-bit version.&lt;/P&gt;
&lt;P mce_keep="true"&gt;So you should reference the 32-bit version of the assembly during design time. At runtime .NET will choose the appropriate version for the current process from those available in the GAC. 32 process will use 32-bit version of the assembly, and 64-bit process will use 64-bit version. Goal achieved.&lt;/P&gt;
&lt;P mce_keep="true"&gt;This is similar to how SSIS uses OLEDB providers – you reference 32-bit one at design time, and we pick up matching 64-bit OLEDB provider at runtime if the package is executed&amp;nbsp;in 64-bit process.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Note that this is only possible if you have both 32-bit and 64-bit versions of external assembly. Also since the script task keeps only one platform neutral assembly for its own code,&amp;nbsp;the metadata for 32-bit and 64-bit assemblies should be the same. I.e. they should have the same assembly name and version, define the same class names, function prototypes, etc.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2198343" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/64bit/default.aspx">64bit</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS+Scripting/default.aspx">SSIS Scripting</category></item><item><title>Using SSIS object model from C++</title><link>http://blogs.msdn.com/michen/archive/2007/03/29/using-ssis-object-model-from-cpp.aspx</link><pubDate>Fri, 30 Mar 2007 03:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1991697</guid><dc:creator>michen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/michen/comments/1991697.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=1991697</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=1991697</wfw:comment><description>&lt;P&gt;All the samples in MSDN show how use SSIS API from C# or VB.NET code. Is it possible to do this from C++ code? The answer is yes, if you know COM it should be quite easy for you, and the COM API is very close to .NET API (I think .NET API is nicer due to rich type system and properties).&lt;/P&gt;
&lt;P&gt;Note that you still need to install either SSIS (if you want to execute package) or&amp;nbsp;Workstation Components&amp;nbsp;(if you write client tool that does not execute packages) - so you have something that implements the API you will be using :). This of course installs .NET 2.0 - so even if you don't use it, it has to be installed.&lt;/P&gt;
&lt;P&gt;Instead of referencing .NET assemblies you will use COM interfaces, declared in DTS.H (from C:\Program Files\Microsoft SQL Server\90\SDK\Include). Here is a sample how to count the packages in SSIS server from C++. All error checking is removed for clarity, if you use this code in production - add error checking. Alternatively, you can #import &amp;lt;dts.dll&amp;gt; if you like VC com support classes - they provide automatic HRESULT-to-exception translation.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;#include&lt;/FONT&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"dts.h"&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;&lt;FONT size=2&gt; EnumPackages()&lt;BR&gt;{&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;CComPtr&amp;lt;IDTSApplication90&amp;gt; app;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;CComPtr&amp;lt;IDTSPackageInfos90&amp;gt; pkgInfos;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;app.CoCreateInstance(&lt;/FONT&gt;&lt;FONT face="Courier New, Courier, Monospace" color=#0000ff size=2&gt;__uuidof&lt;/FONT&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;&lt;FONT size=2&gt;(Application));&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;app-&amp;gt;GetDtsServerPackageInfos(CComBSTR(L&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"File System"&lt;/FONT&gt;&lt;FONT size=2&gt;), CComBSTR(L&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"."&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;), &amp;amp;pkgInfos);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;LONG count;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;pkgInfos-&amp;gt;get_Count(&amp;amp;count);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New, Courier, Monospace" color=#a31515 size=2&gt;"found %d packages"&lt;/FONT&gt;&lt;FONT face="Courier New, Courier, Monospace" size=2&gt;, count);&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;&lt;FONT size=2&gt; _tmain(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt; argc, _TCHAR* argv[])&lt;BR&gt;{&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;CoInitializeEx(NULL, COINIT_MULTITHREADED);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;EnumPackages();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New, Courier, Monospace"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;CoUninitialize();&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New, Courier, Monospace" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/FONT&gt;&lt;FONT face="Courier New, Courier, Monospace" size=2&gt; 0;&lt;BR&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1991697" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS+Programming/default.aspx">SSIS Programming</category></item><item><title>Running SSIS package programmatically</title><link>http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx</link><pubDate>Fri, 23 Mar 2007 01:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1933562</guid><dc:creator>michen</dc:creator><slash:comments>22</slash:comments><comments>http://blogs.msdn.com/michen/comments/1933562.aspx</comments><wfw:commentRss>http://blogs.msdn.com/michen/commentrss.aspx?PostID=1933562</wfw:commentRss><wfw:comment>http://blogs.msdn.com/michen/rsscomments.aspx?PostID=1933562</wfw:comment><description>&lt;P&gt;I got several questions asking what is the best way to run SSIS packages programmatically.&amp;nbsp;One question is about&amp;nbsp;running SSIS&amp;nbsp;from a .NET 1.1 application (SSIS&amp;nbsp;uses .NET 2.0). Another about running package remotely "Do I really have to write an ASP.net app just to run a package on the server?" There were also questions about running package from ASP.NET page (which second user tries to avoid, but surprisingly many people want).&lt;/P&gt;
&lt;P&gt;Let's review what options are available, and discuss which is most appropriate for each case.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Run package programmatically using SSIS Object Model. This is discussed in details in Books Online here: &lt;A href="http://msdn2.microsoft.com/en-us/library/ms136090.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms136090.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms136090.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Benefits: everything runs in process, it is very easy to set variables or modify package before executing it. You can also get events about package progress or ask it to stop by setting CancelEvent.&lt;/P&gt;
&lt;P&gt;Drawbacks: Obviously this is local execution - you need to install SSIS on same machine where your app runs. This method also can't be used from .NET 1.1 application, unless it is moved&amp;nbsp;to .NET 2.0 (which should be very easy to do, and in my experience improves the performance as well). &lt;/P&gt;
&lt;P&gt;ASP.NET specific: the impersonation context does not get passed to additional threads&amp;nbsp;SSIS package&amp;nbsp;creates, so the data source connections will not be impersonated. Also, ASP.NET can be configured to recycle the worker process in case it consumes too much memory to improve availability of ASP.NET application. Since SSIS is likely to consume a lot of memory if you have lots of data, it can trigger this recycling and lower reliability of your application.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Start DTEXEC.EXE process. DTEXEC is command line utility for executing SSIS packages. See its command line options here: &lt;A href="http://msdn2.microsoft.com/en-us/library/ms162810.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms162810.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms162810.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Benefits: running package out of process gains reliability. Can be used from any programming language (including .NET 1.1 :)). Easy to pass parameters by setting variables values.&lt;/P&gt;
&lt;P&gt;Drawbacks: Also local only.&amp;nbsp;Harder to get information about package progress (but SSIS logging can give you most functionality). Some overhead on starting new process (likely minimal compared to execution time for big packages).&lt;/P&gt;
&lt;P mce_keep="true"&gt;ASP.NET specific: Win32 CreateProcess function ignores the thread impersonation. So if you want DTEXEC to run under account different from ASP.NET process account, you should either make user enter name/password and pass it to Process.Start, or use method described in the following&amp;nbsp;KB to run child process under impersonated account &lt;A class="" title="KB 889251" href="http://support.microsoft.com/kb/889251" target=_blank mce_href="http://support.microsoft.com/kb/889251"&gt;http://support.microsoft.com/kb/889251&lt;/A&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Use SQL Agent. You can configure an Agent&amp;nbsp;job to run your package (either do it manually in advance if the package is static, or programmatically using SMO or using SQL stored procedures just before running the package), and then start it programmatically using SMO or sp_start_job.&lt;/P&gt;
&lt;P&gt;MSDN&amp;nbsp;has sample of calling sp_start_job from managed code: &lt;A href="http://msdn2.microsoft.com/en-us/library/ms403355.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms403355.aspx&lt;/A&gt;.&amp;nbsp;Also make sure you implement logging as described&amp;nbsp;in this KB&amp;nbsp;&lt;A href="http://support.microsoft.com/kb/918760"&gt;http://support.microsoft.com/kb/918760&lt;/A&gt;&amp;nbsp;so if anything goes wrong you could troubleshoot it. This article also describes what can go wrong with the package when scheduled in Agent.&lt;/P&gt;
&lt;P&gt;Benefits: You get remote package execution. You get execution serialization (only one instance of a job runs at a time). You can run the package under any account (use Agent proxy).&lt;/P&gt;
&lt;P&gt;Drawbacks: Agent requires installation of&amp;nbsp;SQL Server engine. You can't pass parameters directly - it requires modification to the job, or some side-channel, e.g. config file or SQL table.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;4. Use some other utility to start DTEXEC for you.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Of course,&amp;nbsp;you can use any other generic task scheduler&amp;nbsp;instead of SQL Agent, if you don't want to use Agent for some reason. If you have some scheduler or remote execution infrastructure already in place - use it. All you need is a tool that can start an executable (DTEXEC) and pass command line arguments.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5.&amp;nbsp;Create a custom application that will run the package (either using OM as described in method #1, or using DTEXEC as in method #2). Expose it as a web service or DCOM class, call&amp;nbsp;this service&amp;nbsp;from your program.&lt;/P&gt;
&lt;P&gt;MSDN&amp;nbsp;has sample code for both the web service and its client: &lt;A href="http://msdn2.microsoft.com/en-us/library/ms403355.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms403355.aspx&lt;/A&gt;&amp;nbsp;(second part of this page).&lt;/P&gt;
&lt;P&gt;Benefits: Easy to add custom logic. You get remote package execution. Easy to pass parameters.&lt;/P&gt;
&lt;P&gt;Drawbacks: Need to write code.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;6. Invent your own - I probably missed several ways. Please post comments with any ideas.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now you should be able to answer the questions in the beginning of this blog:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;.NET 1.1 app - #2 is probably the easiest way to do it.&lt;/LI&gt;
&lt;LI&gt;Running package remotely: Agent (#3) is likely the simplest way.&lt;/LI&gt;
&lt;LI&gt;ASP.NET app - Again, #3 is usually the best and most reliable, as it allows you to configure the package to run as a user different from account of ASP.NET process, and you can install SQL and run SSIS packages on a separate box to isolate it from&amp;nbsp;web server&amp;nbsp;even more.&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1933562" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/michen/archive/tags/SSIS+Programming/default.aspx">SSIS Programming</category></item></channel></rss>