<?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>SSIS Team Blog : SSIS</title><link>http://blogs.msdn.com/mattm/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>Something new for SSIS in SQL Server 2008 R2 November CTP</title><link>http://blogs.msdn.com/mattm/archive/2009/11/12/something-new-for-ssis-in-sql-server-2008-r2-november-ctp.aspx</link><pubDate>Thu, 12 Nov 2009 19:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9921536</guid><dc:creator>mmasson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mattm/comments/9921536.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=9921536</wfw:commentRss><description>&lt;P&gt;Ok, so it turns my &lt;A href="http://blogs.msdn.com/mattm/archive/2009/08/14/no-new-features-in-for-integration-services-in-sql-server-2008-r2.aspx" mce_href="http://blogs.msdn.com/mattm/archive/2009/08/14/no-new-features-in-for-integration-services-in-sql-server-2008-r2.aspx"&gt;previous post about R2&lt;/A&gt; wasn’t entirely correct. &lt;/P&gt;
&lt;P&gt;SSIS does have one new feature which appears in the &lt;A href="http://www.microsoft.com/sqlserver/2008/en/us/R2.aspx" mce_href="http://www.microsoft.com/sqlserver/2008/en/us/R2.aspx"&gt;latest SQL Server 2008 R2 CTP&lt;/A&gt;. If you open up the ADO.NET Destination UI, you’ll notice a new “Use Bulk Insert when Possible” check box.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/SomethingnewforSSISinSQLServer2008R2Nove_956B/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/SomethingnewforSSISinSQLServer2008R2Nove_956B/image_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/SomethingnewforSSISinSQLServer2008R2Nove_956B/image_thumb_1.png" width=556 height=480 mce_src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/SomethingnewforSSISinSQLServer2008R2Nove_956B/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Previously, the ADO.NET Destination did all of its inserts row by row (we do some batching internally, which is why the component has a BatchSize property, but the underlying ADO.NET provider will always do single row inserts). With this new feature enabled, SSIS will use a bulk insert interface (like enabling “FastLoad” for OLEDB Destination). Unfortunately, there isn’t a generic Bulk Load interface for ADO.NET, so this functionality is currently only supported by SQL Server (through the &lt;A href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx"&gt;SqlBulkCopy&lt;/A&gt; API). Hopefully we can extend support to other ADO.NET providers in the future.&lt;/P&gt;
&lt;P&gt;The main reason for implementing this functionality was to improve our support for &lt;A href="http://www.microsoft.com/windowsazure/sqlazure/" mce_href="http://www.microsoft.com/windowsazure/sqlazure/"&gt;SQL Azure&lt;/A&gt;. As you might already know, ADO.NET is the primary way to communicate with SQL Azure, and adding support for SqlBulkCopy greatly increased the transfer speed. It also speeds up things when you’re working with regular SQL Server systems -- although OLEDB with FastLoad is still the preferred way of doing SQL data loads. &lt;/P&gt;
&lt;P&gt;Be sure to try it out and &lt;A href="http://connect.microsoft.com/" mce_href="http://connect.microsoft.com/"&gt;provide feedback&lt;/A&gt; before the final release.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921536" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Connectivity/default.aspx">Connectivity</category><category domain="http://blogs.msdn.com/mattm/archive/tags/ADO.Net/default.aspx">ADO.Net</category></item><item><title>SSIS Team Blog – Now in Chinese</title><link>http://blogs.msdn.com/mattm/archive/2009/03/10/ssis-team-blog-now-in-chinese.aspx</link><pubDate>Tue, 10 Mar 2009 19:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9469271</guid><dc:creator>mmasson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mattm/comments/9469271.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=9469271</wfw:commentRss><description>&lt;p&gt;Xiaochen Wu, a member of our Shanghai team, has started a &lt;a href="http://blogs.msdn.com/xiwu/"&gt;Chinese SSIS blog&lt;/a&gt;. He’s started it off by translating some of the posts I’ve done, and I’m sure he’ll find plenty of content in the future. &lt;/p&gt;  &lt;p&gt;I don’t know what the following text means, but I assume it’s the title of the blog :)&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/xiwu/default.aspx"&gt;SSIS 技术博客&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;分享SSIS使用心得和技巧&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9469271" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>Matthew Roche on RunAs Radio</title><link>http://blogs.msdn.com/mattm/archive/2008/05/28/matthew-roche-on-runas-radio.aspx</link><pubDate>Wed, 28 May 2008 21:08:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8556820</guid><dc:creator>mmasson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mattm/comments/8556820.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=8556820</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://bi-polar23.blogspot.com/2008/05/ssis-on-runas-radio.html"&gt;Matthew&lt;/a&gt; recently did an interview for &lt;a href="http://www.runasradio.com/"&gt;RunAs radio&lt;/a&gt; where he gives a really good overview of SSIS, DTS, and ETL in general. It's great if you're just getting started with SSIS, or need to sell someone else on the idea of using it! &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8556820" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SSIS sets an ETL world record</title><link>http://blogs.msdn.com/mattm/archive/2008/02/27/ssis-sets-an-etl-world-record.aspx</link><pubDate>Thu, 28 Feb 2008 00:58:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7922965</guid><dc:creator>mmasson</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/mattm/comments/7922965.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=7922965</wfw:commentRss><description>&lt;p&gt;They mentioned the &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/benchmarks.aspx"&gt;TPC benchmark results&lt;/a&gt; at the &lt;a href="http://www.microsoft.com/heroeshappenhere/default.mspx"&gt;SQL Server 2008 launch&lt;/a&gt; today. The final paragraph mentions a world record for ETL load performance. The fine folks who maintain the &lt;a href="http://blogs.msdn.com/sqlperf"&gt;SQLPerf blog&lt;/a&gt; have &lt;a href="http://blogs.msdn.com/sqlperf/archive/2008/02/27/etl-world-record.aspx"&gt;posted details about the result&lt;/a&gt;, explaining how they were able to load over 1 TB of TPC-H data in under 30 minutes. It makes for a very interesting read! &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7922965" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Performance/default.aspx">Performance</category></item><item><title>What's new in SQL Server 2008 for SSIS - Part two</title><link>http://blogs.msdn.com/mattm/archive/2008/01/22/what-s-new-in-sql-server-2008-for-ssis-part-two.aspx</link><pubDate>Wed, 23 Jan 2008 04:03:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7203606</guid><dc:creator>mmasson</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/mattm/comments/7203606.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=7203606</wfw:commentRss><description>&lt;h3&gt;Change Data Capture (CDC)&lt;/h3&gt;  &lt;p&gt;While not a direct SSIS feature, the new &lt;a href="http://msdn2.microsoft.com/en-us/library/bb522489(SQL.100).aspx"&gt;Change Data Capture&lt;/a&gt; functionality in 2008 can be taken advantage of in SSIS to do incremental loads. CDC captures changes to SQL Server tables (inserts, updates, deletes), and makes them available in an &amp;quot;easily-consumed, relational format&amp;quot;. &lt;/p&gt;  &lt;p&gt;&lt;img alt="" src="http://msdn2.microsoft.com/Bb895315.01302301-40c5-4827-9510-a55ff5718345(en-us,SQL.100).gif" /&gt;&lt;/p&gt;  &lt;p&gt;CDC was added to Katmai in one of the earlier CTPs, and I've heard that the most recent CTP added some new stored procedures to make using it in SSIS even easier. I've heard that the CDC team is working on posting some samples on &lt;a href="http://www.codeplex.com/"&gt;Codeplex&lt;/a&gt;, and I'll post more details once I get a chance to try them out.&lt;/p&gt;  &lt;p&gt;BOL - &lt;a href="http://msdn2.microsoft.com/en-us/library/bb895315(SQL.100).aspx"&gt;Improving Incremental Loads with Change Data Capture&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Merge&lt;/h3&gt;  &lt;p&gt;Another engine feature you can take advantage of in SSIS is the &lt;a href="http://msdn2.microsoft.com/en-us/library/bb510625(SQL.100).aspx"&gt;merge statement&lt;/a&gt;, which allows you to perform insert, update or delete operations on a target table based on the results of a join with a source table. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://agilebi.com/CS/blogs/jwelch/"&gt;John Welch&lt;/a&gt; had a couple of good posts on &lt;a href="http://agilebi.com/cs/blogs/jwelch/archive/2007/06/16/using-the-merge-statement-in-sql-server-2008.aspx"&gt;Merge&lt;/a&gt;, and &lt;a href="http://agilebi.com/cs/blogs/jwelch/archive/2007/07/04/sql-server-2008-using-merge-from-ssis.aspx"&gt;how to use it from SSIS&lt;/a&gt; awhile back that are definitely work checking out. &lt;/p&gt;  &lt;p&gt;I've also seen some samples in the works that I'll post about once they are up on Codeplex.&lt;/p&gt;  &lt;h3&gt;Data Profiling&lt;/h3&gt;  &lt;p&gt;The new &lt;a href="http://msdn2.microsoft.com/en-us/library/bb934048(SQL.100).aspx"&gt;Data Profiling Task&lt;/a&gt; let's you analyze SQL tables to determine (and maintain) data quality. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="69" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_3.png" width="160" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;The way it works is you configure the task to do a set of analysis on columns/tables, such as:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Candidate keys &lt;/li&gt;    &lt;li&gt;Column length distribution &lt;/li&gt;    &lt;li&gt;Null ratio &lt;/li&gt;    &lt;li&gt;Pattern detection &lt;/li&gt;    &lt;li&gt;Value distributions and stats &lt;/li&gt;    &lt;li&gt;Functional dependencies &lt;/li&gt;    &lt;li&gt;Value inclusion&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The results are dumped out to an XML file, which you can then load using a special Viewer application. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_7.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="220" alt="Value distribution" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_thumb_2.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_9.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="Null ratio" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_thumb_3.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_11.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="Pattern detection" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_thumb_4.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Combined with a script task, you can use the profiling task to do a quality check on your data before passing it off to your regular data flow ETL.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_13.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="310" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_thumb_5.png" width="529" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;BOL - &lt;a href="http://msdn2.microsoft.com/en-us/library/bb895310(SQL.100).aspx"&gt;Profiling Data with the Data Profiling Task and Viewer&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Visual Studio 2008 - Orcas&lt;/h3&gt;  &lt;p&gt;The next Katmai CTP will introduce &lt;a href="http://msdn2.microsoft.com/en-us/vs2008/products/default.aspx"&gt;Visual Studio 2008&lt;/a&gt; as our Business Intelligence Design Studio. This doesn't change much functionally, but does allow for side by side installations of BIDS - meaning you can edit Yukon packages (with Visual Studio 2005) and Katmai packages (with Visual Studio 2008) on the same machine. &lt;/p&gt;  &lt;h3&gt;Package Upgrade Wizard&lt;/h3&gt;  &lt;p&gt;The next CTP will also introduce the bulk of our upgrade work, including our Package Upgrade Wizard. While a 2005 package is automatically upgraded when opened in BIDS in 2008, this wizard lets you upgrade a set of packages all at once. It can read packages from a file share, SQL Server database, or Katmai SSIS service, upgrade them, and dump them to a location of your choosing. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_15.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="236" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSISParttwo_9D70/image_thumb_6.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The wizard can be launched from the command line (SSISUpgrade.exe), from BIDS, and from the menu in Management Studio. It will also launch automatically in BIDS when you open up a project which contains Yukon packages. &lt;/p&gt;  &lt;h3&gt;Improved Memory Dumps&lt;/h3&gt;  &lt;p&gt;A lot of work has gone into improving our supportability, and part of this was enhancing our memory dump capability for debugging crashes and hung packages. &lt;/p&gt;  &lt;p&gt;When a dump is created (the directory is configurable, but defaults to %ProgramFiles%\Microsoft SQL Server\100\Shared\ErrorDumps), we also generate a text file which contains useful debugging information that SSIS developers and support can make use of. We've been using the dumps internally to debug tough pipeline deadlocks and crashes, and so far it's been really helpful.&lt;/p&gt;  &lt;p&gt;These dumps will be created automatically during a crash, but can also be triggered by the user. &lt;/p&gt;  &lt;h5&gt;Dumping with DTExec&lt;/h5&gt;  &lt;p&gt;Two dumping options have been added to DTExec - /Dump, which takes a semi-colon separated list of error codes (HResults) to dump on, and /DumpOnError, which will trigger a memory dump anytime an error is encountered.&lt;/p&gt;  &lt;h5&gt;Dumping with DTUtil&lt;/h5&gt;  &lt;p&gt;The /Dump option added to DTUtil allows you to create a memory dump for a running package without disrupting its execution (at least not for very long). This is very useful if you suspect your package has hung. &lt;/p&gt;  &lt;p&gt;[ EDIT: &lt;a href="http://msdn2.microsoft.com/en-us/library/cc280548(SQL.100).aspx"&gt;adding a link to the BOL content&lt;/a&gt; ]&lt;/p&gt;  &lt;p&gt;----&lt;/p&gt;  &lt;p&gt;If I've missed something, I'll follow up with a Part 3, but I think I've covered all of the main features. On top of this, there have been many bug fixes and minor improvements. I'll continue covering some of the more important ones later on.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7203606" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Katmai/default.aspx">Katmai</category></item><item><title>What's new in SQL Server 2008 for SSIS - Part one</title><link>http://blogs.msdn.com/mattm/archive/2008/01/10/what-s-new-in-sql-server-2008-for-ssis-part-one.aspx</link><pubDate>Fri, 11 Jan 2008 04:04:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7065072</guid><dc:creator>mmasson</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.msdn.com/mattm/comments/7065072.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=7065072</wfw:commentRss><description>&lt;h3&gt;Improved Scripting&lt;/h3&gt; &lt;p&gt;SQL Server 2008 (Katmai) introduces VSTA as our new scripting engine, which &lt;a href="http://blogs.msdn.com/vsta/archive/2006/02/03/524676.aspx"&gt;replaces the old VSA engine&lt;/a&gt; used in SQL Server 2005 (Yukon). There are a number of advantages to the new engine, but I think the feature users are most excited about is that it allows you to use C# as a scripting language (as well as VB.NET). It also makes it easier to reference all .Net assemblies, which enables a number of common scenarios (such as easier web service integration). &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="190" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_thumb_2.png" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;h3&gt;Data Flow Task Improvements&lt;/h3&gt; &lt;p&gt;Michael Entin provided a great write-up for the &lt;a href="http://blogs.msdn.com/michen/archive/2007/06/11/katmai-ssis-data-flow-improvements.aspx"&gt;enhancements to our data flow engine&lt;/a&gt;. It essentially boils down to smarter thread allocation and processing of our execution trees. Long chains of synchronous transforms are optimized, and most packages will see a performance increase on multi-processor machines. &lt;/p&gt; &lt;p&gt;One CPU usage graph I really like is the one shown at PASS this year:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_8.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="55" alt="Yukon CPU graph" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_thumb_3.png" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;This shows Yukon package execution on a quad CPU machine. You can see CPU #4 is used steadily, while two others spike occasionally. It also looks like usage goes down on #2 when it goes up on #3, and vice versa. &lt;/p&gt; &lt;p&gt;Running the same package using the Katmai engine looks like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_10.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="56" alt="Katmai CPU graph" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_thumb_4.png" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;This graph shows much better CPU usage distribution. In this case, the package received an 80% performance increase, but your mileage may vary. &lt;/p&gt; &lt;h3&gt;Enhanced ADO.Net Support&lt;/h3&gt; &lt;p&gt;Katmai now has an ADO.Net source (replacing the DataReader source) and destination adapters. They function a lot like the OLEDB ones, supporting a custom UI, drop down list of tables/views, and query builder. Its properties are also expression-able. This means we now support ODBC as a destination, as well. &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_12.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="195" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_thumb_5.png" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;h3&gt;Import/Export Wizard&lt;/h3&gt; &lt;p&gt;The SQL Server Import/Export Wizard (which generates SSIS packages) has been improved as well. &lt;/p&gt; &lt;ul&gt; &lt;li&gt;ADO.Net support (which gives you ODBC)&lt;/li&gt; &lt;li&gt;Data type conversion - mappings are read from customizable (xml) files, and data convert transforms will be inserted into the data flow if required&lt;/li&gt; &lt;li&gt;Scales better - large numbers of tables will be split across multiple data flows (up to five sources per data flow)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Here is an example of the data conversion page:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_14.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="Import/Export Wizard data conversion mapping" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_thumb_6.png" width="233" border="0"&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_16.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_thumb_7.png" width="166" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;h3&gt;Cached Lookup&lt;/h3&gt; &lt;p&gt;As I mentioned in an &lt;a href="http://blogs.msdn.com/mattm/archive/2008/01/08/no-more-implicit-lookup-cache-sharing-in-katmai.aspx"&gt;earlier post&lt;/a&gt;, Jamie Thompson provided a very good &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2007/11/16/Katmai_3A00_-SSIS_3A00_-Lookup-component-gets-a-makeover.aspx"&gt;write up&lt;/a&gt; of the new lookup component. The main feature is that you can now create a lookup cache in a separate data flow using the new Lookup Cache Transform and Cache Connection Manager, and persist it to disk. This cache can be created from any data source supported by SSIS, which removes the need to stage your lookup table in a database. &lt;/p&gt; &lt;p&gt;This persisted cache is especially useful in scenarios where reference data is updated periodically - say, once a week. You can run a package to generate your cache when the update comes in, and re-use it in the rest of your packages until it needs to be updated again. &lt;/p&gt; &lt;p&gt;Another scenario is managing large lookup tables, where a small number of keys are used a large percentage of the time. For example, 5% of your customer IDs show up in 80% of your rows. Instead of caching the entire lookup table, you can use a cached lookup for the top 5%, and cascade another lookup in partial / no-cache mode for the infrequent rows. &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_18.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/WhatsnewinSQLServer2008forSSIS_DF83/image_thumb_8.png" width="210" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;As you can see from the screen shot, Lookup also has a new "No Match" output - rows with no matches aren't directly sent to the error output anymore. We also maintain a "Miss Cache" internally, so missing keys aren't constantly re-queried. &lt;/p&gt; &lt;p&gt;More to follow...&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7065072" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Katmai/default.aspx">Katmai</category></item><item><title>SSIS Survey</title><link>http://blogs.msdn.com/mattm/archive/2007/11/20/ssis-survey.aspx</link><pubDate>Wed, 21 Nov 2007 01:43:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6445411</guid><dc:creator>mmasson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mattm/comments/6445411.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=6445411</wfw:commentRss><description>&lt;p&gt;The SQL User Experience (SQLUX) and Integration Services team are currently &lt;a href="https://mscuillume.smdisp.net/Collector/Survey.ashx?Name=SqlETLSurvey2"&gt;conducting a survey&lt;/a&gt; on ETL practices. We hope to use this feedback in our planning for the Katmai end game, and follow up releases. &lt;/p&gt; &lt;p&gt;If you fill out the survey before December 15th, 2007, you'll be entered in a draw to win one of five Zunes. &lt;/p&gt; &lt;p&gt;More info here: &lt;a title="https://mscuillume.smdisp.net/Collector/Survey.ashx?Name=SqlETLSurvey2" href="https://mscuillume.smdisp.net/Collector/Survey.ashx?Name=SqlETLSurvey2"&gt;https://mscuillume.smdisp.net/Collector/Survey.ashx?Name=SqlETLSurvey2&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6445411" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>Running packages from custom applications</title><link>http://blogs.msdn.com/mattm/archive/2007/09/14/running-packages-from-custom-applications.aspx</link><pubDate>Sat, 15 Sep 2007 03:33:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4920493</guid><dc:creator>mmasson</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mattm/comments/4920493.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=4920493</wfw:commentRss><description>&lt;p&gt;There are a lot of &lt;a href="http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx"&gt;different ways to run SSIS packages&lt;/a&gt;, and many situations call for a custom package launcher application. If you're coding your own launcher, one thing to keep in mind is that certain SSIS functionality (such as the Script task / component) requires a multithreaded apartment (MTA), and can fail or behave incorrectly when run in a single threaded apartment (STA). By default, VB.NET console applications run in STA.&lt;/p&gt; &lt;p&gt;I worked on a customer issue where their custom package launcher started failing on parent/child packages after they changed their loading mechanism. The parent package was failing with an obscure E_NOTIMPLEMENTED error code when trying to retrieve a child package from SQL Server. We also noticed the issue only occurred when both packages were loaded from SQL using a username and password - loading either one from file, or using windows integrated authentication made the problem disappear.&lt;/p&gt; &lt;p&gt;The issue turned out to be related to the threading apartment. When loading packages from SQL using a username/password, the Execute Package Task attempts to reuse the parent package's connection managers. When this is done, the runtime also tries to reuse any open recordset objects as an optimization. The underlying OLEDB code we use to retrieve the package requires the thread apartment to be MTA, and was returning the obscure error code when it failed. &lt;/p&gt; &lt;p&gt;Once we modified the app to run in MTA, everything starting working again! Doing this for a VB.NET app is really simple - just prefix your Main() function with MTAThread.&lt;/p&gt; &lt;div&gt; &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &amp;lt;MTAThread()&amp;gt; _&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; Main()&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     Console.WriteLine(&lt;span style="color: #006080"&gt;"Running..."&lt;/span&gt;)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     ....&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; Sub&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4920493" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>First public Katmai CTP</title><link>http://blogs.msdn.com/mattm/archive/2007/06/05/first-public-katmai-ctp.aspx</link><pubDate>Tue, 05 Jun 2007 18:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3098632</guid><dc:creator>mmasson</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mattm/comments/3098632.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=3098632</wfw:commentRss><description>&lt;P&gt;The first public community technology preview for &lt;A class="" href="http://www.microsoft.com/sql/prodinfo/futureversion/default.mspx" mce_href="http://www.microsoft.com/sql/prodinfo/futureversion/default.mspx "&gt;SQL Server 2008&lt;/A&gt; (code named Katmai) was announced at TechEd yesterday, and is now available for download. You can &lt;A href="https://connect.microsoft.com/programdetails.aspx?ProgramDetailsID=1384" mce_href="https://connect.microsoft.com/programdetails.aspx?ProgramDetailsID=1384"&gt;register here&lt;/A&gt;&amp;nbsp;to download the developer editions, and post questions / comments / concerns in the special &lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1622&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1622&amp;amp;SiteID=1"&gt;Katmai MSDN forums&lt;/A&gt; they have setup. &lt;/P&gt;
&lt;P&gt;You'll see a number of bug&amp;nbsp;fixes and minor improvements&amp;nbsp;to SSIS in this first CTP...&amp;nbsp;mostly stuff that we weren't able to fit into the&amp;nbsp;2005 SP2 release. For major improvements, the old VSA script engine was replaced with VSTA, which allows you to use C# in your script tasks and script components. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/FirstpublicKatmaiCTP_71E7/image.png" atomicselection="true" mce_href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/FirstpublicKatmaiCTP_71E7/image.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=173 alt=image src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/FirstpublicKatmaiCTP_71E7/image_thumb.png" width=500 border=0 mce_src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/FirstpublicKatmaiCTP_71E7/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;There was also a pretty major rewrite to the way we schedule threads in the pipeline which should give a pretty big performance boost to certain types of data flows. I'm&amp;nbsp;hoping we can post more details about this soon (specifically what types of packages are affected, and how you can take advantage of the new threading model), either here or on &lt;A href="http://blogs.msdn.com/michen/" mce_href="http://blogs.msdn.com/michen/"&gt;Michael Entin's&lt;/A&gt; blog. &lt;/P&gt;
&lt;P&gt;I'll continue posting new information about Katmai throughout the CTP period. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3098632" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Katmai/default.aspx">Katmai</category></item><item><title>Real world scenarios</title><link>http://blogs.msdn.com/mattm/archive/2007/06/01/real-world-scenarios.aspx</link><pubDate>Fri, 01 Jun 2007 20:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3027689</guid><dc:creator>mmasson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mattm/comments/3027689.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=3027689</wfw:commentRss><description>&lt;P&gt;May has been a busy month!&lt;/P&gt;
&lt;P&gt;The first Microsoft Business Intelligence conference was earlier in the month, and it seemed to be a big success. I was amazed at how many people were there, and I met a lot of interesting people when I was manning the demo booth and Ask The Experts table we had setup in one of the pavilions. I got to see some interesting talks, and&amp;nbsp;previews&amp;nbsp;of the new BI offerings&amp;nbsp;MS has in the works (&lt;A href="http://office.microsoft.com/en-us/performancepoint/FX101680481033.aspx" mce_href="http://office.microsoft.com/en-us/performancepoint/FX101680481033.aspx"&gt;PerformancePoint Server 2007&lt;/A&gt; looks very slick).&lt;/P&gt;
&lt;P&gt;The SSIS team has been really busy working on Katmai, and we're now approaching our first public CTP. Typically before each release we hold an internal "Bug Bash", where the whole team spends the day running through user scenarios trying to find any last minute issues. This time we decided to do something a bit more involved...&lt;/P&gt;
&lt;P&gt;The group was split up into various teams, and each team was given a real world scenario that we had to solve using SSIS. The idea was to give the product&amp;nbsp;a workout, as well as give us a better point of view on some of the customer pain points. We were given a limited amount of time, so most solutions probably won't have full error handling, logging or other fail safe mechanisms, such as transactions and checkpoints. We hope to publish the scenarios and packages to Codeplex however,&amp;nbsp;and continue adding to them until they can be used as "Best Practice" type examples for common problems. &lt;/P&gt;
&lt;P&gt;Over the next little while I'll post some of the projects and go over the thought process behind the solutions. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3027689" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Samples/default.aspx">Samples</category></item><item><title>SQL Server SP2 – What’s new for SSIS</title><link>http://blogs.msdn.com/mattm/archive/2007/02/27/sql-server-sp2-what-s-new-for-ssis.aspx</link><pubDate>Wed, 28 Feb 2007 06:47:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1772143</guid><dc:creator>mmasson</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mattm/comments/1772143.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=1772143</wfw:commentRss><description>&lt;p&gt;You can see all of this information on &lt;a href="http://msdn2.microsoft.com/en-us/library/bb283536.aspx"&gt;MSDN in the SP2 Readme&lt;/a&gt;, but I thought I'd highlight a couple of things. 
&lt;/p&gt;&lt;h3&gt;Diagnostic Logging
&lt;/h3&gt;&lt;p&gt;A lot of trace logging was added in SP2 to help with debugging connectivity issues. These messages are logged using the "Diagnostic" event. A side effect of this is that if you had Diagnostic level logging enabled before, you are now getting &lt;strong&gt;a lot&lt;/strong&gt; more messages. In SP1 there was one Diagnostic message per run – a package level event about the max concurrent threads. In SP2, you typically get two messages per database API call (pre and post call messages). If you're seeing any performance decrease in package execution after upgrading to SP2, you should check your logging settings to make sure that you don't have Diagnostics enabled. 
&lt;/p&gt;&lt;p&gt;It is recommended you only enable Diagnostic logging for debugging purposes – specifically when you're hitting connectivity issues.
&lt;/p&gt;&lt;h3&gt;BypassPrepare
&lt;/h3&gt;&lt;p&gt;This property in the Execute SQL Task is now set to True by default, which should prevent a lot of confusion when using parameterized queries. Preparing the statement can give a minor performance increase for certain statements, but should only be set to false when you're executing a statement without any parameters. 
&lt;/p&gt;&lt;h3&gt;ParameterSize
&lt;/h3&gt;&lt;p&gt;A new column was added to the Parameter Mapping tab of the Execute SQL Task for the new ParameterSize field.
&lt;/p&gt;&lt;p&gt;This was a fairly big change to address a number of issues with variable length output parameters (the main issue being they didn't work). I had &lt;a href="http://blogs.msdn.com/mattm/archive/2006/11/08/stored-procedures-with-output-parameters.aspx"&gt;previously posted&lt;/a&gt; about using output parameters as an alternative to a result set, and provider syntax issues aside, they work fairly well with certain types. However, differences in the way each provider handles output parameters led to a number of problems with the original implementation when dealing with variable length types (strings, mostly). 
&lt;/p&gt;&lt;p&gt;With this change you are able to specify a length, or use the default value (-1) to let SSIS guess at the correct size. When the default is used, we retrieve the size information directly from the provider if supported; otherwise we use a reasonable default. In most cases the default value should be good enough, but there are some situations where you might want to use a specific value – 1) our "reasonable default" isn't reasonable enough, 2) you want to truncate the returned value to a certain size/length. It should be noted that some providers (ADO for example) don't support truncation, and will fail if the parameter size isn't large enough.
&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1772143" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SSIS connectivity white paper</title><link>http://blogs.msdn.com/mattm/archive/2007/01/31/ssis-connectivity-white-paper.aspx</link><pubDate>Wed, 31 Jan 2007 21:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1566654</guid><dc:creator>mmasson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mattm/comments/1566654.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=1566654</wfw:commentRss><description>A &lt;A class="" href="http://ssis.wik.is/Connectivity_White_Paper" mce_href="http://ssis.wik.is/Connectivity_White_Paper"&gt;connectivity white paper&lt;/A&gt; writen by Bob Beauchemin has been added to the &lt;A class="" href="http://ssis.wik.is/" mce_href="http://ssis.wik.is/"&gt;connectivity wiki site&lt;/A&gt;. Definitely worth checking out.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1566654" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Connectivity/default.aspx">Connectivity</category></item><item><title>Stored procedures with output parameters</title><link>http://blogs.msdn.com/mattm/archive/2006/11/08/stored-procedures-with-output-parameters.aspx</link><pubDate>Thu, 09 Nov 2006 03:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1041572</guid><dc:creator>mmasson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mattm/comments/1041572.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=1041572</wfw:commentRss><description>&lt;P&gt;When executing Stored Procedures with the Execute SQL Task, SSIS passes the statement to the underlying provider without parsing it. While efficient, the different ways of handling the input between the various providers can be a little frustrating. I was working on a couple of issues found in SP1, and realized that when dealing with stored procedures with output parameters, each provider wanted the SQL in a different format. &lt;/P&gt;
&lt;P&gt;I'll stick with a simple stored procedure example that returns a single value. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;CREATE&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;PROC&lt;/SPAN&gt; intoutput &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;@value &lt;SPAN style="COLOR: blue"&gt;INT&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;OUTPUT &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;AS &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;SELECT&lt;/SPAN&gt; @value &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; 10 &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I want my Execute SQL Task to run the stored procedure, and store the result in a package variable (varInt). For different providers, you'll need to change two main fields – the SQL Statement, and the Parameter Name value on the Parameter Mapping page. &lt;/P&gt;
&lt;H3&gt;OLE DB &lt;/H3&gt;
&lt;P&gt;SQL Statement: exec intoutput ? output&lt;BR&gt;Parameter Name: 0 &lt;/P&gt;
&lt;P&gt;You should also set BypassPrepare to True, as the SQL can't be properly parsed if it contains a parameter marker. &lt;/P&gt;
&lt;P&gt;&lt;IMG height=331 alt="" src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc1.png" width=519 mce_src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc1.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;1 – OLE DB General &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG height=55 alt="" src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc2.png" width=430 mce_src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc2.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;2 – OLE DB Parameter Mapping &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;ODBC &lt;/H3&gt;
&lt;P&gt;SQL Statement: {call intoutput (?)}&lt;BR&gt;Parameter Name: 1 &lt;/P&gt;
&lt;P&gt;The SQL statement for ODBC is very different than the others. You need to use "call" instead of "exec", and wrap the whole thing with curly braces. Also, the parameter numbering starts at 1 instead of 0. &lt;/P&gt;
&lt;P&gt;&lt;IMG height=331 alt="" src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc3.png" width=519 mce_src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc3.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;3 - ODBC General &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG height=50 alt="" src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc4.png" width=447 mce_src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc4.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;4 - ODBC Parameter Mapping &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;ADO &lt;/H3&gt;
&lt;P&gt;SQL Statement: intoutput&lt;BR&gt;Parameter Name:&amp;lt;parameter name&amp;gt; &lt;/P&gt;
&lt;P&gt;For ADO, you can use the stored procedure name by itself, and set the IsQueryStoredProcedure attribute to True. For parameter name, you use the name you gave the parameter in the stored procedure (in this case, "value"). &lt;/P&gt;
&lt;P&gt;&lt;IMG height=331 alt="" src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc5.png" width=519 mce_src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc5.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;5 - ADO General &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG height=58 alt="" src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc6.png" width=446 mce_src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc6.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;6 - ADO Parameter Mapping &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;ADO.NET &lt;/H3&gt;
&lt;P&gt;SQL Statement: intoutput&lt;BR&gt;Parameter Name:@&amp;lt;parameter name&amp;gt; &lt;/P&gt;
&lt;P&gt;ADO.NET is similar to ADO. Set IsQueryStoredProcedure to True, and set your statement to the name of the SP you want to execute. Like ADO, you need to use the name of the parameter in the stored procedure for the Parameter Name column, prefixed with @ (in this case, "@value"). Note: The parameter mapping seems to work without the use of the @ sign, but I'm not sure if that works for all providers. &lt;/P&gt;
&lt;P&gt;&lt;IMG height=331 alt="" src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc7.png" width=519 mce_src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc7.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;7 - ADO.NET General &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG height=58 alt="" src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc8.png" width=422 mce_src="http://mattmasson.members.winisp.net/img/110906_0007_Stored%20proc8.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;8 - ADO.NET Parameter Mapping &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;Summary &lt;/H3&gt;
&lt;P&gt;Running stored procedures with the Execute SQL Task is tricky due to the differences in the way the providers handle the input SQL. The main differences are with the SQL Statement, and the Parameter Name value. The following table summarizes the differences (assumes a stored procedure of name StoredProc with a single output parameter named Param): &lt;/P&gt;
&lt;DIV&gt;
&lt;TABLE class="" style="BORDER-COLLAPSE: collapse" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 87px"&gt;
&lt;COL style="WIDTH: 208px"&gt;
&lt;COL style="WIDTH: 147px"&gt;
&lt;COL style="WIDTH: 292px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR style="BACKGROUND: #4f81bd"&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; BORDER-TOP: #4f81bd 1pt solid; PADDING-LEFT: 7px; BORDER-LEFT: #4f81bd 1pt solid; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&lt;SPAN style="COLOR: white"&gt;&lt;STRONG&gt;Provider&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; BORDER-TOP: #4f81bd 1pt solid; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&lt;SPAN style="COLOR: white"&gt;&lt;STRONG&gt;SQL Statement&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; BORDER-TOP: #4f81bd 1pt solid; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&lt;SPAN style="COLOR: white"&gt;&lt;STRONG&gt;Parameter Name&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #4f81bd 1pt solid; PADDING-RIGHT: 7px; BORDER-TOP: #4f81bd 1pt solid; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&lt;SPAN style="COLOR: white"&gt;&lt;STRONG&gt;Notes&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: #4f81bd 1pt solid; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&lt;STRONG&gt;OLE DB&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;exec StoredProc ? output&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;0&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #4f81bd 1pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;Set BypassPrepare to True&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; BORDER-LEFT: #4f81bd 1pt solid; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&lt;STRONG&gt;ODBC&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;{call StoredProc (?)}&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;1&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #4f81bd 1pt solid; PADDING-RIGHT: 7px; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: #4f81bd 1pt solid; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&lt;STRONG&gt;ADO&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;StoredProc&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;Param&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #4f81bd 1pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;Set IsQueryStoredProcedure to True&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; BORDER-LEFT: #4f81bd 1pt solid; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&lt;STRONG&gt;ADO.NET&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;StoredProc&lt;/TD&gt;
&lt;TD class="" style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;@Param&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #4f81bd 1pt solid; PADDING-RIGHT: 7px; PADDING-LEFT: 7px; BORDER-BOTTOM: #4f81bd 1pt solid"&gt;&amp;nbsp;Set IsQueryStoredProcedure to True&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P&gt;For more info about the Execute SQL Task, you can check out the &lt;A href="http://msdn2.microsoft.com/en-us/library/ms141003.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms141003.aspx"&gt;books online entry&lt;/A&gt;, and the nice &lt;A href="http://www.sqlis.com/default.aspx?58" mce_href="http://www.sqlis.com/default.aspx?58"&gt;overview of the task&lt;/A&gt; on SQLIS.com. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1041572" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Stored+Procedures/default.aspx">Stored Procedures</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Execute+SQL+Task/default.aspx">Execute SQL Task</category></item><item><title>Conditional Constraints</title><link>http://blogs.msdn.com/mattm/archive/2006/11/01/conditional-constraints.aspx</link><pubDate>Thu, 02 Nov 2006 03:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:927742</guid><dc:creator>mmasson</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/mattm/comments/927742.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=927742</wfw:commentRss><description>&lt;P&gt;Here's a more practical example of using constraints based on variables. &lt;/P&gt;
&lt;P&gt;I have a package that requires an existing database file to be attached to the local SQL Server. The package is synced out to multiple machines from a source control system and run frequently. I don't want to manually setup the database on each machine, nor do I want to store the large database file in our source control system… so I decided to make the setup steps part of the package. &lt;/P&gt;
&lt;P&gt;My first attempt looked something like this: &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 361px; HEIGHT: 352px" height=352 src="http://blogs.msdn.com/photos/mattm/images/927751/original.aspx" width=361 mce_src="http://blogs.msdn.com/photos/mattm/images/927751/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;1 - Initial attempt &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I created a package with a Script task, two File System tasks, and an Execute SQL task. The Script task branches the execution path based on whether or not the DB file exists on the local file system. This sort of worked – the file was copied, but the "Attach Database" task failed to run. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 344px; HEIGHT: 350px" height=350 src="http://blogs.msdn.com/photos/mattm/images/927756/original.aspx" width=344 mce_src="http://blogs.msdn.com/photos/mattm/images/927756/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;2 - Execute SQL Task does not execute &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I soon realized that if you branch your logic like this, you need to set the constraints on the task where your execution merges again (in this case, "Attach Database") to OR's instead of AND's. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.msdn.com/photos/mattm/images/927757/original.aspx" mce_src="http://blogs.msdn.com/photos/mattm/images/927757/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;3 - Change constraint to logical OR &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Now when I run, the file is copied, and the database task is executed. On subsequent runs, the file copying tasks are skipped and "Attach Database" is called immediately. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 332px; HEIGHT: 339px" height=339 src="http://blogs.msdn.com/photos/mattm/images/927758/original.aspx" width=332 mce_src="http://blogs.msdn.com/photos/mattm/images/927758/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;4 - It works... kind of &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Although I could live with an error appearing the first time the script is run, it threw off some of our scripts, and people who weren't familiar with the package would always freak out the first time they saw it. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier New"&gt;Error: 0x4 at Check if DB Files Exist: The Script returned a failure result. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier New"&gt;Task failed: Check if DB Files Exist&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;While my initial solution (have my Script task print out the message "You can safely ignore the following error" when the file didn't exist) calmed the masses, it was still a problem for the execution scripts (not to mention just bad form!). This is how I discovered how to create constraints with conditional expressions. &lt;/P&gt;
&lt;P&gt;I added a new Boolean variable to the package, and modified my script to set its value instead of setting success or failure. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 304px; HEIGHT: 185px" height=185 src="http://blogs.msdn.com/photos/mattm/images/927761/original.aspx" width=304 mce_src="http://blogs.msdn.com/photos/mattm/images/927761/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;5 - Package variables &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;My script: &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Sub&lt;/SPAN&gt; Main() &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Dim&lt;/SPAN&gt; strFile &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;String&lt;/SPAN&gt; = Dts.Variables(&lt;SPAN style="COLOR: maroon"&gt;"dbFile"&lt;/SPAN&gt;).Value.ToString() &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;Dts.Variables(&lt;SPAN style="COLOR: maroon"&gt;"varFileExists"&lt;/SPAN&gt;).Value = File.Exists(strFile) &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;Dts.TaskResult = Dts.Results.Success &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Sub&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;(Be sure to add the variables you use to the script task to the "ReadOnlyVariables" and "ReadWriteVariables" property of the script task. Also note that you'll need to import System.IO for the File.Exists() method) &lt;/P&gt;
&lt;P&gt;I edited the constraints connected to the script task, set "Evaluation operation" to "Expression", and added an expression based on the varFileExists variable. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 508px; HEIGHT: 378px" height=378 src="http://blogs.msdn.com/photos/mattm/images/927764/original.aspx" width=508 mce_src="http://blogs.msdn.com/photos/mattm/images/927764/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #4f81bd"&gt;&lt;STRONG&gt;6 - Setting expressions &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This gives us a much cleaner solution! Now we don't see any errors the first time the package is run, and our files are copied only once. We're good to go! &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 334px; HEIGHT: 362px" height=362 src="http://blogs.msdn.com/photos/mattm/images/927765/original.aspx" width=334 mce_src="http://blogs.msdn.com/photos/mattm/images/927765/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;NOTE: After I finished writing this up, I stopped by the SSIS forums and &lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=859001&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=859001&amp;amp;SiteID=1"&gt;noticed a post&lt;/A&gt; where someone had encountered a similar problem, and &lt;A href="http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/" mce_href="http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/"&gt;wrote a blog entry&lt;/A&gt; about it. I thought I'd link it here. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=927742" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Constraints/default.aspx">Constraints</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Expressions/default.aspx">Expressions</category></item><item><title>Using Constraints and Expressions</title><link>http://blogs.msdn.com/mattm/archive/2006/10/30/using-expression-based-constraints.aspx</link><pubDate>Tue, 31 Oct 2006 01:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:904816</guid><dc:creator>mmasson</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mattm/comments/904816.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=904816</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Besides the regular Success and Failure constraints, you can create precedence constraints that are linked to an expression. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;In this example, I have a Script Task that determines the course for the workflow. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /&gt;&lt;v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"&gt;&lt;v:stroke joinstyle="miter"&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 1 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum 0 0 @1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @2 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 0 1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @6 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @8 21600 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @10 21600 0"&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"&gt;&lt;/v:path&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;IMG style="WIDTH: 425px; HEIGHT: 250px" height=250 src="http://blogs.msdn.com/photos/mattm/images/904755/425x250.aspx" width=425 mce_src="http://blogs.msdn.com/photos/mattm/images/904755/425x250.aspx"&gt;&lt;/o:lock&gt;&lt;/v:shapetype&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Besides the pass and fail, I also want to handle a third case that will be executed whenever a special condition is met in the Script Task. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;IMG style="WIDTH: 408px; HEIGHT: 243px" height=243 src="http://blogs.msdn.com/photos/mattm/images/904757/original.aspx" width=408 mce_src="http://blogs.msdn.com/photos/mattm/images/904757/original.aspx"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;To set this up, I create a new Boolean variable (&lt;I style="mso-bidi-font-style: normal"&gt;varSpecialCase&lt;/I&gt;), and set the value in my Script Task. Double clicking the “Handle Special Case” constraint brings up the Precedence Constraint Editor, where I can change the way the constraint is evaluated.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;IMG style="WIDTH: 476px; HEIGHT: 354px" height=354 src="http://blogs.msdn.com/photos/mattm/images/904768/original.aspx" width=476 mce_src="http://blogs.msdn.com/photos/mattm/images/904768/original.aspx"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Here I’ve set “Evaluation operation” to “Expression”, and used my variable in the expression text. If &lt;I style="mso-bidi-font-style: normal"&gt;varSpecialCase&lt;/I&gt; has been set to true by the Script Task, the “Handle Special Case” script task will be executed. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;One thing to keep in mind: &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;= &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;!= &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;==&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;(The equals sign is not the same as double equals in the constraint expression!)&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I had originally set my expression up using a single equal sign. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;IMG style="WIDTH: 476px; HEIGHT: 354px" height=354 src="http://blogs.msdn.com/photos/mattm/images/904758/original.aspx" width=476 mce_src="http://blogs.msdn.com/photos/mattm/images/904758/original.aspx"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face=Calibri&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;As this is still a valid expression, it will validate successfully when you click the Test button.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;IMG style="WIDTH: 534px; HEIGHT: 93px" height=93 src="http://blogs.msdn.com/photos/mattm/images/904763/original.aspx" width=534 mce_src="http://blogs.msdn.com/photos/mattm/images/904763/original.aspx"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;When you run however, it always fails. After spending a while trying to figure out why my task wasn’t being executed, I finally looked it up the operators in the &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms141232.aspx"&gt;&lt;FONT color=#800080 size=3&gt;Integration Services Expression Reference&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;. I’ll definitely look there first, next time!&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=904816" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Constraints/default.aspx">Constraints</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Expressions/default.aspx">Expressions</category></item></channel></rss>