<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.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>Jorg Klein</title><link>http://www2.sqlblog.com/blogs/jorg_klein/default.aspx</link><description>Jorg Klein, Microsoft-only BI consultant from the Netherlands</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Implement SSAS MD cell security using dimension security with blazing performance</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2013/02/18/implement-ssas-md-cell-security-using-dimension-security-with-blazing-performance.aspx</link><pubDate>Mon, 18 Feb 2013 19:42:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47786</guid><dc:creator>jorg</dc:creator><slash:comments>2</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/47786.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=47786</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=47786</wfw:comment><description>&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;SQL Server Analysis Services (SSAS) Multidimensional (MD) is a great product, and in my opinion it’s still the only real option to go for when building complex enterprise BI solutions. It’s still very fast when implemented correctly and it’s mature and therefore very stable. &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;The only real downside is cell security, which, in my opinion, is useless. It makes performance drop dramatically because it evaluates security cell-by-cell. I have seen reports that run in a few seconds without cell security taking 20 minutes with cell security implemented! Try to explain that to your customer.. It’s obvious that you can’t. &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;Quite some workarounds exist for quite a while: &lt;/span&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&amp;nbsp;&lt;ul&gt;&lt;li&gt;&lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;Make your measures invisible and create MDX calculations that either show or hide the measure value based on a dummy dimension. Drawbacks are the measure is hidden and not really secured and you need to create dummy dimensions/attributes and maintain them. &lt;/span&gt;&lt;a href="http://www.sqljason.com/2010/04/implementing-measure-security-in-ssas.html"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;http://www.sqljason.com/2010/04/implementing-measure-security-in-ssas.html&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;SSAS offers us the “Measures Dimension” which give you the possibility to secure measures like dimension members. Great, this is just what we need, but implementing it and creating MDX calculations based on the secured measures will give you errors for SSAS roles that do not have access to these measures. This is caused by the fact that the MDX script is executed after the security has been implemented. So if a user that doesn’t have access to a measure (set by dimension security) tries to connect to the cube while the MDX script contains a reference to this secured measure, this raises an error. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;Create a hidden dimension on which you apply dimension security like described here: &lt;/span&gt;&lt;a href="http://cwebbbi.wordpress.com/2011/12/22/replacing-cell-security-with-dimension-security/"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;http://cwebbbi.wordpress.com/2011/12/22/replacing-cell-security-with-dimension-security/&lt;/span&gt;&lt;/a&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt; Unfortunately this doesn’t work for measures. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;For a few years I’ve always implemented a workaround that uses the measures dimension. To prevent errors in the MDX script as described by option B above, I’ve added IsError() checks around all my calculation parts that could raise an error. For example, a simple calculation like Quantity * Price, where the price measure could be secured, looks like this:&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;CREATE MEMBER CURRENTCUBE &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;.[Measures].[Amount] &lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;AS      &lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:maroon;mso-ansi-language:en-us;"&gt;IIf &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;(      &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsError ( [Measures].[Price] ),       &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;NULL&lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;,      &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Measures].[Quantity] * [Measures].[Price]       &lt;br&gt;&amp;nbsp; ),       &lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;NON_EMPTY_BEHAVIOR &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;=      &lt;br&gt;&amp;nbsp; {       &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:maroon;mso-ansi-language:en-us;"&gt;IIf &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;(      &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsError ( [Measures].[Price] ),       &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;NULL&lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;,      &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Measures].[Price]       &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )       &lt;br&gt;&amp;nbsp; } ;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;This calculation would not raise an error but NULL if a user doesn’t have permission to the Price measure. Quite straightforward, only trick here is the IsError() check in the NON_EMPTY_BEHAVIOR, of course you would have to do this in the script view of your SSAS calculations tab. In the form view this will look a bit strange but it doesn’t cause any errors:&lt;/span&gt;&amp;nbsp; &lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-no-proof:yes;mso-fareast-language:nl;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image001_23B8A002.png"&gt;&lt;img width="554" height="495" title="clip_image001" style="border-width:0px;display:inline;" alt="clip_image001" src="http://sqlblog.com/blogs/jorg_klein/clip_image001_thumb_779BA310.png" border="0"&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;Using this approach you are able to implement measure security using the dimension security while you are still able to create MDX calculations with NON_EMPTY_BEHAVIOR based on these secured measures. This made the report I talked about before to run in 5 seconds instead of the 20 minutes. I’ve used this approach for quite some years now, and it has always been sufficient. &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;At the moment I’m working on a very big enterprise cube that contains almost 100 dimensions, 25 measure groups and millions of records. I’ve also implemented measure security like this and after a while I noticed some really heavy queries (reports) took quite some time, for example 30 seconds or 1 minute. Reason enough to re-think this approach. When I was at the SQL Server Days in Belgium last year, I’ve discussed this approach with &lt;/span&gt;&lt;a href="http://cwebbbi.wordpress.com/"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;Chris Webb&lt;/span&gt;&lt;/a&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;. Of course he could understand what I was doing here and we agreed to email about this approach later on. Chris emailed me about a blogpost of him from some time ago: &lt;/span&gt;&lt;a href="http://cwebbbi.wordpress.com/2008/01/22/dimension-security-tips-tricks-and-problems/"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;http://cwebbbi.wordpress.com/2008/01/22/dimension-security-tips-tricks-and-problems/&lt;/span&gt;&lt;/a&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;. In this post Chris explains how to create secured calculations while using dimension securty by using named sets and scope statements: &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;CREATE MEMBER CURRENTCUBE &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;.Measures.Test &lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;AS      &lt;br&gt;&amp;nbsp; NULL &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;CREATE SET &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;myset1 &lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;AS      &lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:maroon;mso-ansi-language:en-us;"&gt;IIf &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;(      &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsError ( &lt;/span&gt;&lt;span style="color:maroon;mso-ansi-language:en-us;"&gt;StrToMember &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;( &lt;/span&gt;&lt;span style="color:purple;mso-ansi-language:en-us;"&gt;"Measures.[Internet Sales Amount]" &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;) ),      &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { },       &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { Measures.Test }       &lt;br&gt;&amp;nbsp; ) ; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;SCOPE &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;( myset1 ) ;      &lt;br&gt;&lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;This &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;= Measures.[Internet Sales Amount] ;      &lt;br&gt;&lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;END SCOPE &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;CREATE SET &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;myset2 &lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;AS      &lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:maroon;mso-ansi-language:en-us;"&gt;IIf &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;(      &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsError ( &lt;/span&gt;&lt;span style="color:maroon;mso-ansi-language:en-us;"&gt;StrToMember &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;( &lt;/span&gt;&lt;span style="color:purple;mso-ansi-language:en-us;"&gt;"Measures.[Internet Sales Amount]" &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;) ),      &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { Measures.[Internet Tax Amount] },       &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { Measures.[Internet Sales Amount], Measures.[Internet Tax Amount] }       &lt;br&gt;&amp;nbsp; ) ; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;SCOPE &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;( myset2 ) ;      &lt;br&gt;&lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;This &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;= Measures.&lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;CurrentMember &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;* 2 ;      &lt;br&gt;&lt;/span&gt;&lt;span style="color:blue;mso-ansi-language:en-us;"&gt;END SCOPE &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;I did not know about this approach, so I tried it out. To be able to get good test results I used a very heavy query that hopefully nobody would ever try: a calculation over all sales data (millions of records) against all customers, all products and all time. &lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;Unfortunately, the results were not very pleasing yet: &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;1. Calculation with IIF/IsError checks in both the calculation part and the non empty part: ran in 50 seconds. &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;2. Calculation with named set/scope approach: ran longer than 5 minutes, after that I stopped the query. &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;So Chris and I emailed again and I was wondering if the lack of NON_EMPTY_BEHAVIOR (NEB) could be the cause of the slow performance of the named set/scope approach. Chris said that since SSAS 2008 the usage of NEB was not neccesary anymore, something I’ve heard about before. I always had the idea adding NEB did make a difference in some cases so I never stoped using it. So I kinda merged Chris’ and mine approach, adding the NEB using an IsError() function and I replaced the &lt;/span&gt;&lt;span style="color:maroon;mso-ansi-language:en-us;"&gt;StrToMember &lt;/span&gt;&lt;span style="mso-ansi-language:en-us;mso-no-proof:yes;"&gt;check with a direct reference to the measure in the named sets because in my opinion that part was not neccesary:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;IsError ( &lt;/span&gt;&lt;span style="color:maroon;mso-ansi-language:en-us;"&gt;StrToMember &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;( &lt;/span&gt;&lt;span style="color:purple;mso-ansi-language:en-us;"&gt;"Measures.[Internet Sales Amount]" &lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt;) ) &lt;/span&gt;&lt;span style="color:black;font-family:wingdings;mso-ansi-language:en-us;mso-ascii-font-family:calibri;mso-ascii-theme-font:minor-latin;mso-hansi-font-family:calibri;mso-hansi-theme-font:minor-latin;mso-char-type:symbol;mso-symbol-font-family:wingdings;"&gt;&lt;span style="mso-char-type:symbol;mso-symbol-font-family:wingdings;"&gt;à&lt;/span&gt;&lt;/span&gt;&lt;span style="color:black;mso-ansi-language:en-us;"&gt; became: &lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Measures.[Internet Sales Amount]. &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;The result was almost unbelievable, the query now took not 5 minutes, not 50 seconds but only 2 seconds!! So adding NEB still can make a huge difference sometimes! After finding out about this, I contacted Chris again and he was also very surprised by the result. &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;I’ve created an MDX calculation template with some explanation added as comments. The big performance gain is achieved because the IsError() check doesn’t need to be executed every time the calculation is executed because it’s already executed when the static named set is created (one single time), afterwards this value just seems to be reused. I think the same applies for the IsError() check in the NEB, it seems it’s only executed once and is reused. Anyway, the result is, your MDX calculations are just as fast with security applied as without. Something that was not possible for a long time for me and I guess everybody else too. Just use the template below as a standard for creating your calculations and benefit from this solution:&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;--Calculation Template: &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;---------------------------------------- &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;----------1: CHECKED CALCULATION: The secured "end product" used in other calculations---------- &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;CREATE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;MEMBER&lt;/span&gt; &lt;span style="color:blue;"&gt;CURRENTCUBE&lt;/span&gt;.[Measures].[Quantity_CHECKED] &lt;span style="color:blue;"&gt;AS &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;NULL &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;, &lt;span style="color:blue;"&gt;VISIBLE&lt;/span&gt; = 0 ; &lt;/span&gt;&lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;----------2: CHECK NAMED SET: Actual permission check performed here----------&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;CREATE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;SET&lt;/span&gt; [Quantity_CHECK] &lt;span style="color:blue;"&gt;AS &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:maroon;"&gt;IIf&lt;/span&gt; ( &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;IsError ( [Measures].[Quantity] ) &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;, { } &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;, { [Measures].[Quantity_CHECKED] } &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;) ; &lt;/span&gt;    &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;----------3: SCOPE: Assignment of either the measure or "nothing" to CHECKED calculation (1)----------&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;SCOPE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; ( [Quantity_CHECK] ) ; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;This&lt;/span&gt; = [Measures].[Quantity] ; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;END&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;SCOPE&lt;/span&gt; ; &lt;/span&gt;    &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;----------4: Second secure calculation created here----------&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;CREATE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;MEMBER&lt;/span&gt; &lt;span style="color:blue;"&gt;CURRENTCUBE&lt;/span&gt;.[Measures].[Price_CHECKED] &lt;span style="color:blue;"&gt;AS &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;NULL &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;, &lt;span style="color:blue;"&gt;VISIBLE&lt;/span&gt; = 0 ; &lt;/span&gt;    &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;CREATE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;SET&lt;/span&gt; [Price_CHECK] &lt;span style="color:blue;"&gt;AS&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:maroon;"&gt;IIf&lt;/span&gt; ( &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;IsError ( [Measures].[Price] ) &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;, { } &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;, { Measures.[Price_CHECKED] } &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;) ; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;SCOPE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; ( [Price_CHECK] ) ; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;This&lt;/span&gt; = [Measures].[Price] ; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;END&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;SCOPE&lt;/span&gt; ; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;----------5: Calculation based on the secure calculations. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;----------Non_Empty_Behavior set with IIf/IsError on measure. Using calculations inside NEB is not possible---------- &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;CREATE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;MEMBER&lt;/span&gt; &lt;span style="color:blue;"&gt;CURRENTCUBE&lt;/span&gt;.[Measures].[Sales Amount] &lt;span style="color:blue;"&gt;AS &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;[Measures].[Quantity_CHECKED] * [Measures].[Price_CHECKED] &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;, &lt;span style="color:blue;"&gt;NON_EMPTY_BEHAVIOR&lt;/span&gt; = &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:maroon;"&gt;IIf&lt;/span&gt; ( &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;IsError ( [Measures].[Price] ) &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;, &lt;span style="color:blue;"&gt;NULL &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;, { [Measures].[Price] } &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;) &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;, &lt;span style="color:blue;"&gt;VISIBLE&lt;/span&gt; = 1 ; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;-------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Your calculations tab in SSAS will look like:&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;br&gt;&lt;/span&gt;&lt;span style="mso-no-proof:yes;mso-fareast-language:nl;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image003_59BD1F0F.jpg"&gt;&lt;img width="608" height="270" title="clip_image003" style="border-width:0px;display:inline;" alt="clip_image003" src="http://sqlblog.com/blogs/jorg_klein/clip_image003_thumb_7BA88193.jpg" border="0"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="mso-ansi-language:en-us;"&gt;When I was investigating the inner working of the first part of the script I’ve added some comments to make it easy for myself to remember. I guess it’s also useful for anyone that want to know what’s really happening here:&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;CREATE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;MEMBER&lt;/span&gt; &lt;span style="color:blue;"&gt;CURRENTCUBE&lt;/span&gt;.[Measures].[Quantity_CHECKED] &lt;span style="color:green;"&gt;--&amp;gt; Calculation is initially NULL and will be filled based on user rights later on. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;AS&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;NULL&lt;/span&gt;, &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;VISIBLE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; = 0; &lt;span style="color:green;"&gt;--&amp;gt; Make it invisible as this is a pure technical calculation that should not be used by end users. End users can use the measure this calculation is based on, if they have permission (set by dimension security on the Measures dimension). &lt;/span&gt;      &lt;/span&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;CREATE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;SET&lt;/span&gt; [Quantity_CHECK] &lt;span style="color:blue;"&gt;AS&lt;/span&gt; &lt;span style="color:green;"&gt;--&amp;gt; Named Set will be used to perform the actual check for user rights, as this is a static named set this check will only be executed one time, at initialization, and will be reused.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;IIf&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;(IsError([Measures].[Quantity]) &lt;span style="color:green;"&gt;--&amp;gt; An IsError on the measure that needs to be checked will raise an error if a particular user has no rights on it because in that case the measure will simply not exist. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;, {} &lt;span style="color:green;"&gt;--&amp;gt; If an error was raised by the IsError function set the value of this set to nothing: {} &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;, {[Measures].[Quantity_CHECKED]}); &lt;span style="color:green;"&gt;--&amp;gt; If no error was raised the user has rights to access the measure, in this case set the value of the set to the required CHECKED calculation created in the previous step. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;SCOPE&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;([Quantity_CHECK]);&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;--&amp;gt; If in the Scope of the CHECK calculation, either the CHECK calculation can be {} (Nothing) or it can be the CHECKED calculation (based on user rights).&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;This&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;=[Measures].[Quantity]; &lt;span style="color:green;"&gt;--&amp;gt; Assign the measure to This. This can be the CHECK calculation if the user has rights which will pass the measure through to the initial CHECKED calculation or it can be {}/Nothing which will pass the value of the measure to nothing instead of to the CHECKED calculation. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;END&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;SCOPE&lt;/span&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size:10pt;mso-ansi-language:en-us;mso-no-proof:yes;"&gt;-- So this Scope function either passes the measure to the CHECKED calculation or to nothing (the empty set {}) &lt;/span&gt;&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=47786" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSAS/default.aspx">SSAS</category></item><item><title>SSIS Denali CTP3 – What’s new?</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2011/07/22/ssis-denali-ctp3-what-s-new.aspx</link><pubDate>Fri, 22 Jul 2011 16:44:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37252</guid><dc:creator>jorg</dc:creator><slash:comments>5</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/37252.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=37252</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=37252</wfw:comment><description>&lt;p&gt;Last week Microsoft released CTP3 of SQL Server Integration Services (SSIS), code name: Denali. In this blog post I will look into the new key features and some of the minor improvements in SSIS Denali. &lt;/p&gt;  &lt;h5&gt;&lt;font size="4"&gt;1. Development&lt;/font&gt;&lt;/h5&gt;  &lt;p&gt;&lt;b&gt;Shared Connection Managers&lt;/b&gt;     &lt;br&gt;Connection Managers can now be shared on SSIS project level.     &lt;br&gt;You can create them in the solution explorer, in the folder Connection Managers:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image001_75A35743.png"&gt;&lt;img style="border-width:0px;display:inline;" title="clip_image001" border="0" alt="clip_image001" src="http://sqlblog.com/blogs/jorg_klein/clip_image001_thumb_18F04BE9.png" width="217" height="117"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once created, they will appear automatically in all your SSIS packages. The names are in bold so you can recognize them between your package-level connection managers:    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image002_4D24752F.png"&gt;&lt;img style="border-width:0px;display:inline;" title="clip_image002" border="0" alt="clip_image002" src="http://sqlblog.com/blogs/jorg_klein/clip_image002_thumb_7386587A.png" width="169" height="94"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can also create Shared Cache Connection Managers for your cached lookups. This will be very useful for lookups that are performed multiple times, for example when you look up dimension tables multiple times from your fact table ETL. You can just convert the local cache connection manager by right clicking it:    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image003_3E0D9655.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image003" border="0" alt="clip_image003" src="http://sqlblog.com/blogs/jorg_klein/clip_image003_thumb_190FD5DC.png" width="449" height="369"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What happened to the Shared Data Sources we knew from prior SSIS versions? Well they are no more. Shared Data Sources only lived at design time and not at runtime so they were not really useful anyway. Shared Connection Managers do live at runtime and offer even more possibilities as I will show later on, so they replace the old Shared Data Sources.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Data Flow - Column mappings&lt;/b&gt;     &lt;br&gt;SSIS always mapped columns from source to transformations or destinations with the help of lineage ids. Every column had a unique metadata ID that was known by all components in the data flow. If something changed in the source this would break the lineage ids and raised error messages like: The external metadata column collection is out of synchronization with the data source columns.     &lt;br&gt;To fix this error you would re-map all broken lineage ids with the “Restore Invalid Column References Editor”.     &lt;br&gt;In Denali lineage-ids are no longer used. Mappings are done on column names, which is great because you can now use auto map on column names and even copy/paste pieces of another data flow and connect them by mapping the corresponding column names.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Data Flow - Flexible order of authoring&lt;/b&gt;     &lt;br&gt;This improvement helps you edit data flow components even when they don’t have an input attached. Theoretically you can build your data flow backwards; start with the destination and track back to the source.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Data Flow - Groupings&lt;/b&gt;     &lt;br&gt;You can now group data flow components. Select the components you wish to group, &lt;i&gt;right click&lt;/i&gt; and select &lt;i&gt;Group&lt;/i&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image004_31334037.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image004" border="0" alt="clip_image004" src="http://sqlblog.com/blogs/jorg_klein/clip_image004_thumb_7743FD4A.png" width="386" height="232"&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt;&lt;p&gt;   &lt;br&gt;The result is some sort of a data flow sequence container:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image005_7A75E532.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image005" border="0" alt="clip_image005" src="http://sqlblog.com/blogs/jorg_klein/clip_image005_thumb_557824B9.png" width="292" height="320"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;By clicking the arrow it will collapse:    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image006_58AA0CA1.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image006" border="0" alt="clip_image006" src="http://sqlblog.com/blogs/jorg_klein/clip_image006_thumb_13FD7260.png" width="299" height="109"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Data flow groups are 100% eye candy; you can’t set any properties on them.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Data Flow - Data Quality Services Cleansing transformation&lt;/b&gt;     &lt;br&gt;With this transformation you can apply data quality rules in the data flow. This is done by using a Knowledge Base which can be created by yourself or downloaded from the Windows Azure Marketplace. For example you could apply a rule that checks if a given postal code column is valid for a particular town column in your record.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Data Flow - Data Tap      &lt;br&gt;&lt;/b&gt;In Denali, we have the possibility to attach a “tap” at a data flow path (arrow). This tap captures all data coming through and dumps it in CSV files.&lt;/p&gt;  &lt;h5&gt;&lt;font size="4"&gt;2. Configuration&lt;/font&gt;&lt;/h5&gt;  &lt;p&gt;SSIS Denali is fundamentally different to its predecessors when it comes to the concept and usage of configurations. SSIS package configurations are obsolete (they will still be available if you really want to use them ;-)) and parameters and environments are in the new kids in town.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Parameters&lt;/b&gt;     &lt;br&gt;SSIS Parameters look a lot like SSIS variables but there are some differences. There are two types of these parameters:     &lt;br&gt;1. Package Parameters:     &lt;br&gt;Look at Package parameters as C# parameters, which are passed as input to a C# function(=your package). You can set them when executing (call) a package and the lifecycle of the parameters are limited to the SSIS package itself. &lt;/p&gt;  &lt;p&gt;The difference with SSIS variables? You can set the parameters while executing a package with SSMS or an Execute Package Task.&lt;/p&gt;  &lt;p&gt;Define your Package Parameters at the Package &lt;b&gt;Parameters&lt;/b&gt; tab:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image007_0552C67B.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image007" border="0" alt="clip_image007" src="http://sqlblog.com/blogs/jorg_klein/clip_image007_thumb_24956D4E.png" width="567" height="115"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;2. Project Parameters:    &lt;br&gt;Identical to Package Parameters, except for the scope, these Parameters exist on project level and can be referenced throughout all SSIS packages in your project. Package Parameters only live inside a single SSIS package.&lt;/p&gt;  &lt;p&gt;You can define Project Parameters in the &lt;b&gt;solution explorer&lt;/b&gt; within your SSIS project:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image008_15EAC169.png"&gt;&lt;img style="border-width:0px;display:inline;" title="clip_image008" border="0" alt="clip_image008" src="http://sqlblog.com/blogs/jorg_klein/clip_image008_thumb_4A1EEAAF.png" width="218" height="169"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Both Package and Project Parameters can be referenced from your SSIS packages, you recognize them by their prefix, &lt;b&gt;$Package&lt;/b&gt; or &lt;b&gt;$Project&lt;/b&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image009_69619182.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image009" border="0" alt="clip_image009" src="http://sqlblog.com/blogs/jorg_klein/clip_image009_thumb_5AB6E59D.png" width="573" height="155"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Setting parameters in a &lt;b&gt;Execute Package Task&lt;/b&gt; is achieved by the new &lt;b&gt;Parameter bindings&lt;/b&gt; tab:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image010_72DA4FF8.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image010" border="0" alt="clip_image010" src="http://sqlblog.com/blogs/jorg_klein/clip_image010_thumb_1FEF3CC7.png" width="585" height="187"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It’s also possible to parameterize SSIS tasks on the Control Flow by &lt;i&gt;right clicking&lt;/i&gt; them and choose &lt;i&gt;Parameterize&lt;/i&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image011_65FFF9DA.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image011" border="0" alt="clip_image011" src="http://sqlblog.com/blogs/jorg_klein/clip_image011_thumb_2C10B6EE.png" width="418" height="484"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Loads of capabilities here! I now realize that I have created a workaround for Package Parameters with my &lt;a href="http://sqlblog.com/blogs/jorg_klein/archive/2010/01/04/ssis-package-design-pattern-for-loading-a-data-warehouse.aspx"&gt;SSIS Package design pattern for loading a data warehouse&lt;/a&gt; where I (mis)used Package Configurations as Package Parameters. Creating a new package design pattern for Denali definitely goes on my TODO list!&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Environments      &lt;br&gt;&lt;/b&gt;Environments are a collection of SSIS package settings that can be define on the SSIS Server. At runtime, the environment will override these settings in the SSIS packages. You can create multiple environments and when you run your SSIS packages you can select which environment it should use. It’s also possible to let multiple SSIS projects run under one environment, so flexibility all around the clock.&lt;/p&gt;  &lt;p&gt;To make you understand the principle of Environments right away I have created a simple example that you will commonly use: Create two Environments, one with development settings and one with production settings.&lt;/p&gt;  &lt;p&gt;I have deployed a Test SSIS project to SSMS which contains one SSIS package with one Shared Connection Manager. Notice the new &lt;b&gt;Integration Services&lt;/b&gt; folder structure:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image012_1646CE91.png"&gt;&lt;img style="border-width:0px;display:inline;" title="clip_image012" border="0" alt="clip_image012" src="http://sqlblog.com/blogs/jorg_klein/clip_image012_thumb_23ACE197.png" width="226" height="133"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next &lt;i&gt;right click&lt;/i&gt; Environments and choose &lt;i&gt;Create Environment&lt;/i&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image013_74E728F4.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image013" border="0" alt="clip_image013" src="http://sqlblog.com/blogs/jorg_klein/clip_image013_thumb_291B523B.png" width="338" height="162"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;Type&lt;/i&gt; &lt;i&gt;Development&lt;/i&gt; as name for the Environment and &lt;i&gt;click&lt;/i&gt; OK:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image014_1A70A656.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image014" border="0" alt="clip_image014" src="http://sqlblog.com/blogs/jorg_klein/clip_image014_thumb_725DF736.png" width="756" height="194"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now &lt;i&gt;double click&lt;/i&gt; the Development Environment:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image015_516A848F.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image015" border="0" alt="clip_image015" src="http://sqlblog.com/blogs/jorg_klein/clip_image015_thumb_77CC67DA.png" width="250" height="118"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;Click&lt;/i&gt; on the Variables tab and create an Environment Variable which will overwrite the Shared Connection Manager. &lt;i&gt;Type in&lt;/i&gt; the connection string for the development server as the Value and &lt;i&gt;click&lt;/i&gt; &lt;i&gt;OK&lt;/i&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image017_44FC6166.jpg"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image017" border="0" alt="clip_image017" src="http://sqlblog.com/blogs/jorg_klein/clip_image017_thumb_56008F49.jpg" width="761" height="126"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next create another Environment with the name &lt;i&gt;Production&lt;/i&gt; and also create an Environment Variable with the name &lt;i&gt;SCM_EnvironmentVar&lt;/i&gt;. The only difference between these two variables should be the value of the variable; it contains the production server connection string instead of the development value.     &lt;br&gt;You now have &lt;b&gt;two Environments&lt;/b&gt; with one Environment Variable for the Shared Connection Manager each:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image018_42DF629D.png"&gt;&lt;img style="border-width:0px;display:inline;" title="clip_image018" border="0" alt="clip_image018" src="http://sqlblog.com/blogs/jorg_klein/clip_image018_thumb_3B53F330.png" width="188" height="134"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We now need to reference the &lt;b&gt;Development&lt;/b&gt; and &lt;b&gt;Production&lt;/b&gt; Environments in the Test project so they can be used. &lt;i&gt;Right click&lt;/i&gt; the Test project and choose &lt;i&gt;Configure&lt;/i&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image019_2CA9474B.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image019" border="0" alt="clip_image019" src="http://sqlblog.com/blogs/jorg_klein/clip_image019_thumb_3A0F5A51.png" width="296" height="101"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Go to the references page and &lt;i&gt;click&lt;/i&gt; &lt;i&gt;Add..&lt;/i&gt;     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image021_2B64AE6C.jpg"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image021" border="0" alt="clip_image021" src="http://sqlblog.com/blogs/jorg_klein/clip_image021_thumb_7F47B17A.jpg" width="760" height="144"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Add both Environments:    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image023_3E393216.jpg"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image023" border="0" alt="clip_image023" src="http://sqlblog.com/blogs/jorg_klein/clip_image023_thumb_7D2AB2B1.jpg" width="760" height="160"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Both environment are now referenced from the Test SSIS project and are available. Let’s configure the Shared Connection Manager so it will use the value specified in one of the environments. &lt;i&gt;Click&lt;/i&gt; on the &lt;b&gt;Parameters&lt;/b&gt; page, the &lt;b&gt;Connection Managers&lt;/b&gt; tab and the &lt;b&gt;…&lt;/b&gt; next to the &lt;b&gt;ConnectionString&lt;/b&gt; property of the &lt;b&gt;Shared Connection Manager&lt;/b&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image025_4026811F.jpg"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image025" border="0" alt="clip_image025" src="http://sqlblog.com/blogs/jorg_klein/clip_image025_thumb_1409842E.jpg" width="760" height="135"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now &lt;i&gt;select&lt;/i&gt; &lt;b&gt;Use Environment Variable&lt;/b&gt; and select &lt;b&gt;SCM_EnvironmentVar&lt;/b&gt;. &lt;i&gt;Click&lt;/i&gt; &lt;i&gt;OK&lt;/i&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image026_6BF6D50E.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image026" border="0" alt="clip_image026" src="http://sqlblog.com/blogs/jorg_klein/clip_image026_thumb_041A3F6A.png" width="470" height="318"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The name of our Environment Variable is shown in the &lt;b&gt;Value&lt;/b&gt; box of the &lt;b&gt;ConnectionString&lt;/b&gt; property:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image028_1C3DA9C5.jpg"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image028" border="0" alt="clip_image028" src="http://sqlblog.com/blogs/jorg_klein/clip_image028_thumb_5B2F2A60.jpg" width="760" height="136"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We have now succesfully attached the Environment Variable to override the &lt;b&gt;ConnectionString&lt;/b&gt; property with a value from either the &lt;b&gt;Development&lt;/b&gt; or the &lt;b&gt;Production&lt;/b&gt; Environment. Executing the package under one of both Environments is very easy. To do so, &lt;i&gt;right click&lt;/i&gt; the package and choose &lt;b&gt;Run&lt;/b&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image029_2F122D6F.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image029" border="0" alt="clip_image029" src="http://sqlblog.com/blogs/jorg_klein/clip_image029_thumb_2067818A.png" width="361" height="154"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The &lt;b&gt;Run Package&lt;/b&gt; dialog box appears and you instantly see a message that reminds you to assign a value to the &lt;b&gt;ConnectionString&lt;/b&gt; property of connection manager &lt;b&gt;SharedConnectionManager&lt;/b&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image030_3FAA285D.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image030" border="0" alt="clip_image030" src="http://sqlblog.com/blogs/jorg_klein/clip_image030_thumb_2B4462D2.png" width="793" height="150"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At the bottom of the dialog box you can select the Environment your package should use. Select the &lt;b&gt;.\Development Environment&lt;/b&gt; and &lt;i&gt;click&lt;/i&gt; &lt;i&gt;OK&lt;/i&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image031_71551FE5.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image031" border="0" alt="clip_image031" src="http://sqlblog.com/blogs/jorg_klein/clip_image031_thumb_748707CD.png" width="788" height="143"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the overview report you see the package has succesfully ran under the &lt;b&gt;Development&lt;/b&gt; Environment:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image032_28BB3114.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image032" border="0" alt="clip_image032" src="http://sqlblog.com/blogs/jorg_klein/clip_image032_thumb_4F1D145F.png" width="340" height="133"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you change the package to use the &lt;b&gt;Production&lt;/b&gt; Environment and you run the package again, you’ll get the following execution information:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image033_5563EAED.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image033" border="0" alt="clip_image033" src="http://sqlblog.com/blogs/jorg_klein/clip_image033_thumb_1FEB28C8.png" width="323" height="136"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Pretty straightforward and easy to use. The big difference? All the configuration work has been done in SQL Server Management Studio! Exactly the place where it should be done. In the current SSIS versions most of this work was done within Visual Studio and the configuration was done by editing tables. So unfriendly! Big improvement, great work MS!    &lt;br&gt;In this example I have set a property of a Shared Connection Manager but of course it is possible to set Package or Project Parameters with Environment Variables.&lt;/p&gt;  &lt;h5&gt;&lt;font size="4"&gt;3. Deployment&lt;/font&gt;&lt;/h5&gt;  &lt;p&gt;We have had the option to deploy SSIS packages from Visual Studio for a long time thanks to BIDS Helper. Microsoft finally added this functionality out of the box in Denali. They even did more: you can now also build your projects from within Visual Studio! &lt;/p&gt;  &lt;p&gt;There are two ways to deploy (push) your projects to the new SSIS server, directly from Visual Studio or by using an Integration Services Project Deployment File. They both use the new Integration Services Deployment Wizard.    &lt;br&gt;Deployments directly from Visual Studio can be done by &lt;i&gt;right clicking&lt;/i&gt; your project and then choose &lt;b&gt;Deploy&lt;/b&gt;. Now, the &lt;b&gt;Deployment Wizard&lt;/b&gt; will pop straight up:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image034_3F2DCF9B.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image034" border="0" alt="clip_image034" src="http://sqlblog.com/blogs/jorg_klein/clip_image034_thumb_5E70766E.png" width="507" height="109"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The other way is building your project first. This was already possible in SSIS version(s) prior to Denali but did not really have useful meanings. &lt;/p&gt;  &lt;p&gt;In Denali this is different. Building your project will generate an &lt;b&gt;.ispac&lt;/b&gt; file which contains your entire project and this can be used by the &lt;b&gt;Deployment Wizard&lt;/b&gt;. Again a very nice new feature. &lt;/p&gt;  &lt;p&gt;Handing over a new release of a SSIS solution to a customer’s IT department for deployment can now be done in a very nice, professional, manner. Ispac files can also be opened by Visual Studio to import your SSIS project.    &lt;br&gt;Building your project can be done by &lt;i&gt;right clicking&lt;/i&gt; your project and choosing &lt;b&gt;Build&lt;/b&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image035_12A49FB5.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image035" border="0" alt="clip_image035" src="http://sqlblog.com/blogs/jorg_klein/clip_image035_thumb_31E74688.png" width="518" height="161"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The &lt;b&gt;output window&lt;/b&gt; displays the following:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image036_4A0AB0E3.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image036" border="0" alt="clip_image036" src="http://sqlblog.com/blogs/jorg_klein/clip_image036_thumb_7B29EB83.png" width="550" height="187"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When looking at the bin\Development folder we see the new Test.aspac file:    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image037_413AA897.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image037" border="0" alt="clip_image037" src="http://sqlblog.com/blogs/jorg_klein/clip_image037_thumb_1927F978.png" width="673" height="149"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image038_314B63D3.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image038" border="0" alt="clip_image038" src="http://sqlblog.com/blogs/jorg_klein/clip_image038_thumb_170AFAAF.png" width="725" height="670"&gt;&lt;/a&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;Double clicking&lt;/i&gt; (or choosing &lt;b&gt;Deploy in Visual Studio&lt;/b&gt;) this file will start the new &lt;b&gt;Integration Services Deployment Wizard&lt;/b&gt;:&lt;/p&gt;  &lt;p&gt;You can now select the project that you wish to deploy. You can either select to use the .ispac &lt;b&gt;Project&lt;/b&gt; &lt;b&gt;deployment file&lt;/b&gt; or choose to deploy an existing project located in any &lt;b&gt;Integration Services catalog&lt;/b&gt;. The last option is useful when you wish to deploy from, for example, a TEST SSIS solution that is already located in a catalog to an ACCEPTATION environment in another catalog.     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image039_03E9CE03.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image039" border="0" alt="clip_image039" src="http://sqlblog.com/blogs/jorg_klein/clip_image039_thumb_69A964DE.png" width="726" height="279"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The project is loaded and validated:    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image040_6CDB4CC6.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image040" border="0" alt="clip_image040" src="http://sqlblog.com/blogs/jorg_klein/clip_image040_thumb_07A772D3.png" width="723" height="232"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next, you now need to &lt;i&gt;select&lt;/i&gt; the destination, which has to be a SSIS Server:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image041_0AD95ABB.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image041" border="0" alt="clip_image041" src="http://sqlblog.com/blogs/jorg_klein/clip_image041_thumb_0994C1DC.png" width="724" height="266"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;Review&lt;/i&gt; your selections and &lt;i&gt;click &lt;/i&gt;on Deploy to start the actual deployment:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image042_528ABDD5.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image042" border="0" alt="clip_image042" src="http://sqlblog.com/blogs/jorg_klein/clip_image042_thumb_73DA3DA4.png" width="723" height="278"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The results show a successful deployment. Notice the &lt;b&gt;protection level&lt;/b&gt; has been changed. What happened here?     &lt;br&gt;The wizard clears the protection level, as we know from Visual Studio, to prevent “cannot decrypt password” errors. &lt;/p&gt;  &lt;p&gt;Instead of using protection levels, passwords will be stored in clear text. The entire package (with the passwords in it) will be stored encrypted in the SSIS Server tables you are deploying to.    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image043_3D891595.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image043" border="0" alt="clip_image043" src="http://sqlblog.com/blogs/jorg_klein/clip_image043_thumb_577CD5B7.png" width="725" height="276"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The &lt;b&gt;project&lt;/b&gt; has now been deployed to the server:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image044_79F16472.png"&gt;&lt;img style="border-width:0px;display:inline;" title="clip_image044" border="0" alt="clip_image044" src="http://sqlblog.com/blogs/jorg_klein/clip_image044_thumb_7918FE88.png" width="189" height="97"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When you &lt;i&gt;right click&lt;/i&gt; the Test project and choose for &lt;b&gt;Versions&lt;/b&gt; you are able to see the current version of your project:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image046_2D4D27CF.jpg"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image046" border="0" alt="clip_image046" src="http://sqlblog.com/blogs/jorg_klein/clip_image046_thumb_574D25F7.jpg" width="760" height="163"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you deploy a newer version later on, the existing version(s) stay on the server and you can easily role back to a previous version if you’ve made a bad deployment.&lt;/p&gt;  &lt;p&gt;The diagram below shows the entire deployment life cycle (source: TechNet):    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image048_442BF94B.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image048" border="0" alt="clip_image048" src="http://sqlblog.com/blogs/jorg_klein/clip_image048_thumb_34A8E77C.png" width="669" height="580"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h5&gt;&lt;font size="4"&gt;4. Management&lt;/font&gt;&lt;/h5&gt;  &lt;p&gt;The new &lt;b&gt;SSIS Server&lt;/b&gt; is the central storage and administration point of your SSIS solutions. No longer is this a standalone server that you’ll need to manage. Basically it is a database with Stored Procedures.&lt;/p&gt;  &lt;p&gt;You now have an &lt;b&gt;Integration Services&lt;/b&gt; node available in &lt;b&gt;SSMS&lt;/b&gt; when you connect to the database engine:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image049_60E56E60.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image049" border="0" alt="clip_image049" src="http://sqlblog.com/blogs/jorg_klein/clip_image049_thumb_26F62B74.png" width="329" height="272"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Under the Integration Services node you will find your &lt;b&gt;SSISDB&lt;/b&gt; catalog which holds all your SSIS solutions with its packages, environments, etc. The physical storage of these objects will be conducted in a &lt;b&gt;SQL Server database&lt;/b&gt; with the same name as the catalog:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image050_65E7AC0F.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image050" border="0" alt="clip_image050" src="http://sqlblog.com/blogs/jorg_klein/clip_image050_thumb_0C498F5B.png" width="257" height="135"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This database also contains all the &lt;b&gt;stored procedures&lt;/b&gt; containing all the programming code for the SSIS Server:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image051_7D9EE375.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image051" border="0" alt="clip_image051" src="http://sqlblog.com/blogs/jorg_klein/clip_image051_thumb_1CE18A49.png" width="296" height="241"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;With the help of these stored procedures you can manage your SSIS Server: e.g. your parameter values, connection managers, and override properties by using environments.    &lt;br&gt;Next to the configuration functionalities I have discussed earlier you can also implement security to control access to the catalog, both on folder level and package level. When you &lt;i&gt;right click&lt;/i&gt; a &lt;b&gt;folder/package&lt;/b&gt; in the &lt;b&gt;catalog&lt;/b&gt; and choose the &lt;b&gt;properties&lt;/b&gt; you’ll get the following window where you can manage security access:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image052_3504F4A4.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image052" border="0" alt="clip_image052" src="http://sqlblog.com/blogs/jorg_klein/clip_image052_thumb_48B1DE38.png" width="753" height="496"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Finally you’ll get an out of the box &lt;b&gt;reporting dashboard&lt;/b&gt; which is built on the out of the box logging functionality that SSIS offers. On this dashboard you’ll get information about the execution history of your package and its sub packages, view which parameters were used, view specific messages and get a performance report over time.     &lt;br&gt;All the information is logged automatically if any package runs on the server. The information is very detailed; you can even get the row counts between SSIS data flow transformations! &lt;/p&gt;  &lt;p&gt;When running a package you are able to &lt;i&gt;select&lt;/i&gt; a &lt;b&gt;logging level&lt;/b&gt; on the &lt;b&gt;Advanced tab&lt;/b&gt;:     &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image053_209F2F19.png"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image053" border="0" alt="clip_image053" src="http://sqlblog.com/blogs/jorg_klein/clip_image053_thumb_716D4381.png" width="783" height="568"&gt;&lt;/a&gt;     &lt;br&gt;You can choose for:     &lt;br&gt;- &lt;b&gt;None&lt;/b&gt;: turn logging of for performance reasons     &lt;br&gt;- &lt;b&gt;Basic&lt;/b&gt;: error and warning logging     &lt;br&gt;- &lt;b&gt;Performance&lt;/b&gt;: detailed trace information     &lt;br&gt;- &lt;b&gt;Verbose&lt;/b&gt;: diagnostics and fault debugging&lt;/p&gt;  &lt;p&gt;When I run my Test package I’ll get the following execution dashboard. There are some hyperlinks that navigate to more detailed reports.    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image055_0C39698E.jpg"&gt;&lt;img style="border:0px currentColor;display:inline;" title="clip_image055" border="0" alt="clip_image055" src="http://sqlblog.com/blogs/jorg_klein/clip_image055_thumb_440BADB1.jpg" width="760" height="555"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So no need for creating your own logging framework anymore, it’s all out of the box! &lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=37252" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SSIS - Connect to Oracle on a 64-bit machine (Updated for SSIS 2008 R2)</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2011/06/09/ssis-connect-to-oracle-on-a-64-bit-machine.aspx</link><pubDate>Thu, 09 Jun 2011 09:26:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:19804</guid><dc:creator>jorg</dc:creator><slash:comments>43</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/19804.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=19804</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=19804</wfw:comment><description>&lt;p align="left"&gt;&lt;font size="2"&gt;We recently had a few customers where a connection to Oracle on a 64 bit machine was necessary. A quick search on the internet showed that this could be a big problem. I found all kind of blog and forum posts of developers complaining about this. A lot of developers will recognize the following error message:      &lt;br /&gt;&lt;/font&gt;&lt;font color="#191970"&gt;     &lt;br /&gt;&lt;font size="2"&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;Test connection failed because of an error in initializing provider. Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.            &lt;br /&gt;Provider is unable to function until these components are installed.&lt;/font&gt;&lt;/em&gt;         &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;    &lt;br /&gt;&lt;font size="2"&gt;After a lot of searching, trying and debugging I think I found the right way to do it!&lt;/font&gt;&lt;/p&gt;  &lt;h2 align="left"&gt;&lt;font size="2"&gt;&lt;strong&gt;Problems&lt;/strong&gt;&lt;/font&gt;&lt;/h2&gt;  &lt;p align="left"&gt;&lt;font size="2"&gt;Because BIDS is a 32 bit application, as well on 32 as on 64 bit machines, it cannot see the 64 bit driver for Oracle. Because of this, connecting to Oracle from BIDS on a 64 bit machine will never work when you install the 64 bit Oracle client.      &lt;br /&gt;      &lt;br /&gt;Another problem is the &amp;quot;Microsoft Provider for Oracle&amp;quot;, this driver only exists in a 32 bit version and Microsoft has no plans to create a 64 bit one in the near future.&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="2"&gt;The last problem I know of is in the Oracle client itself, it seems that a connection will never work with the instant client, so always use the full client.      &lt;br /&gt;There are also a lot of problems with the 10G client, one of it is the fact that this driver can't handle the &amp;quot;(x86)&amp;quot; in the path of SQL Server. So using the 10G client is no option!&lt;/font&gt;&lt;/p&gt;  &lt;h2 align="left"&gt;&lt;font size="2"&gt;&lt;strong&gt;Solution&lt;/strong&gt;&lt;/font&gt;&lt;/h2&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;Download the Oracle &lt;b&gt;11G full&lt;/b&gt; client.&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;Install the &lt;b&gt;32 AND the 64 bit&lt;/b&gt; version of the &lt;b&gt;11G full&lt;/b&gt; client (Installation Type: Administrator) and reboot the server afterwards. The 32 bit version is needed for development from BIDS with is 32 bit, the 64 bit version is needed for production with the SQLAgent, which is 64 bit. &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;Configure the Oracle clients (both 32 and 64 bits) by editing&amp;#160; the files &lt;a href="http://www.orafaq.com/wiki/Tnsnames.ora"&gt;tnsnames.ora&lt;/a&gt; and &lt;a href="http://www.orafaq.com/wiki/Sqlnet.ora"&gt;sqlnet.ora&lt;/a&gt;. Try to do this with an Oracle DBA or, even better, let him/her do this.&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;Use the &amp;quot;&lt;b&gt;Oracle provider for OLE DB&lt;/b&gt;&amp;quot; from SSIS, don't use the &amp;quot;Microsoft Provider for Oracle&amp;quot; because a 64 bit version of it does not exist. &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;Schedule your packages with the SQLAgent.&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;h2 align="left"&gt;&lt;font size="2"&gt;&lt;strong&gt;Background information&lt;/strong&gt;&lt;/font&gt;&lt;/h2&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;Visual Studio (BI Dev Studio)is a 32bit application. &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;SQL Server Management Studio is a 32bit application. &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;dtexecui.exe is a 32bit application. &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;dtexec.exe has both 32bit and 64bit versions. &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;There are x64 and x86 versions of the Oracle provider available. &lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;font size="2"&gt;SQLAgent is a 64bit process.&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="left"&gt;&lt;font size="2"&gt;My advice to BI consultants is to get an Oracle DBA or professional for the installation and configuration of the 2 full clients (32 and 64 bit). Tell the DBA to download the biggest client available, this way you are sure that they pick the right one ;-)&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="2"&gt;Testing if the clients have been installed and configured in the right way can be done with Windows ODBC Data Source Administrator:      &lt;br /&gt;Start...       &lt;br /&gt;Programs...       &lt;br /&gt;Administrative tools...       &lt;br /&gt;Data Sources (ODBC)&lt;/font&gt;&lt;/p&gt; &lt;strong&gt;   &lt;p&gt;     &lt;br /&gt;&lt;font size="2"&gt;ADITIONAL STEPS FOR SSIS 2008 R2&lt;/font&gt;&lt;/p&gt; &lt;/strong&gt;  &lt;p align="left"&gt;&lt;font size="2"&gt;It seems that, unfortunately, some additional steps are necessary for SQL Server 2008 R2 installations:&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="2"&gt;1. Open REGEDIT (Start… Run… REGEDIT) on the server and search for the following entry (for the 32 bits driver): &lt;em&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\MSDTC\MTxOCI&lt;/em&gt;       &lt;br /&gt;Make sure the following values are entered:&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/image_32C24854.png"&gt;&lt;font size="2"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/jorg_klein/image_thumb_3FBC2865.png" width="399" height="68" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="2"&gt;2. Next, search for (for the 64 bits driver): &lt;/font&gt;&lt;font size="2"&gt;&lt;em&gt;HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\MSDTC\MTxOCI        &lt;br /&gt;&lt;/em&gt;Make sure the same values as above are entered.&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="2"&gt;3. Reboot your server.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=19804" width="1" height="1"&gt;</description></item><item><title>Replication Services as ETL extraction tool</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2011/03/12/replication-services-as-etl-extraction-tool.aspx</link><pubDate>Sat, 12 Mar 2011 09:42:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:33869</guid><dc:creator>jorg</dc:creator><slash:comments>6</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/33869.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=33869</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=33869</wfw:comment><description>&lt;p&gt;In my &lt;a href="http://sqlblog.com/blogs/jorg_klein/archive/2011/02/24/replication-services-in-a-bi-environment.aspx"&gt;last blog post&lt;/a&gt; I explained the principles of Replication Services and the possibilities it offers in a BI environment. One of the possibilities I described was the use of snapshot replication as an ETL extraction tool:     &lt;br /&gt;&lt;em&gt;“Snapshot Replication can also be useful in BI environments, if you don’t need a near real-time copy of the database, you can choose to use this form of replication. Next to an alternative for Transactional Replication it can be used to stage data so it can be transformed and moved into the data warehousing environment afterwards.      &lt;br /&gt;In many solutions I have seen developers create multiple SSIS packages that simply copies data from one or more source systems to a staging database that figures as source for the ETL process. The creation of these packages takes a lot of (boring) time, while Replication Services can do the same in minutes. It is possible to filter out columns and/or records and it can even apply schema changes automatically so I think it offers enough features here. I don’t know how the performance will be and if it really works as good for this purpose as I expect, but I want to try this out soon!”       &lt;br /&gt;      &lt;br /&gt;&lt;/em&gt;Well I have tried it out and I must say it worked well. I was able to let replication services do work in a fraction of the time it would cost me to do the same in SSIS.     &lt;br /&gt;What I did was the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Configure snapshot replication for some Adventure Works tables, this was quite simple and straightforward. &lt;/li&gt;    &lt;li&gt;Create an SSIS package that executes the snapshot replication on demand and waits for its completion.      &lt;br /&gt;This is something that you can’t do with out of the box functionality. While configuring the snapshot replication two SQL Agent Jobs are created, one for the creation of the snapshot and one for the distribution of the snapshot. Unfortunately these jobs are&amp;#160; asynchronous which means that if you execute them they immediately report back if the job started successfully or not, they do not wait for completion and report its result afterwards. So I had to create an SSIS package that executes the jobs and waits for their completion before the rest of the ETL process continues. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Fortunately I was able to create the SSIS package with the desired functionality. I have made a step-by-step guide that will help you configure the snapshot replication and I have uploaded the SSIS package you need to execute it.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Configure snapshot replication&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/0_2444B1B0.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="0" border="0" alt="0" src="http://sqlblog.com/blogs/jorg_klein/0_thumb_340446B4.png" width="244" height="115" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;The first step is to create a publication on the database you want to replicate.     &lt;br /&gt;Connect to SQL Server Management Studio and right-click Replication, choose for New.. Publication…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/1_1310D40D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="1" border="0" alt="1" src="http://sqlblog.com/blogs/jorg_klein/1_thumb_78D06AE8.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;The New Publication Wizard appears, click Next&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/2_629A4F96.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="2" border="0" alt="2" src="http://sqlblog.com/blogs/jorg_klein/2_thumb_28AB0CAA.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Choose your “source” database and click Next&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/3_6EBBC9BD.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="3" border="0" alt="3" src="http://sqlblog.com/blogs/jorg_klein/3_thumb_1AF850A2.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Choose Snapshot publication and click Next&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/4_59E9D13D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="4" border="0" alt="4" src="http://sqlblog.com/blogs/jorg_klein/4_thumb_59116B53.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;You can now select tables and other objects that you want to publish&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/5_1802EBEF.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="5" border="0" alt="5" src="http://sqlblog.com/blogs/jorg_klein/5_thumb_08EC0D15.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Expand Tables and select the tables that are needed in your ETL process&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/6_55AFD3AB.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="6" border="0" alt="6" src="http://sqlblog.com/blogs/jorg_klein/6_thumb_6DD33E06.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;In the next screen you can add filters on the selected tables which can be very useful. Think about selecting only the last x days of data for example.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/7_2CC4BEA2.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="7" border="0" alt="7" src="http://sqlblog.com/blogs/jorg_klein/7_thumb_72D57BB5.png" width="244" height="204" /&gt;&lt;/a&gt;     &lt;br /&gt;Its possible to filter out rows and/or columns. In this example I did not apply any filters.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/8_5D0B9358.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="8" border="0" alt="8" src="http://sqlblog.com/blogs/jorg_klein/8_thumb_1BFD13F4.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Schedule the Snapshot Agent to run at a desired time, by doing this a SQL Agent Job is created which we need to execute from a SSIS package later on.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/9_53CF5817.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="9" border="0" alt="9" src="http://sqlblog.com/blogs/jorg_klein/9_thumb_00E444E6.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Next you need to set the Security Settings for the Snapshot Agent. Click on the Security Settings button.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/10_11E872C9.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="10" border="0" alt="10" src="http://sqlblog.com/blogs/jorg_klein/10_thumb_6CEAB24F.png" width="244" height="210" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;In this example I ran the Agent under the SQL Server Agent service account. This is not recommended as a security best practice. Fortunately there is an excellent article on TechNet which tells you exactly how to set up the security for replication services. Read it &lt;a href="http://technet.microsoft.com/en-us/library/ms151868.aspx"&gt;here&lt;/a&gt; and make sure you follow the guidelines!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/11_2BDC32EB.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="11" border="0" alt="11" src="http://sqlblog.com/blogs/jorg_klein/11_thumb_2B03CD01.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;On the next screen choose to create the publication at the end of the wizard&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/12_1539E4A4.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="12" border="0" alt="12" src="http://sqlblog.com/blogs/jorg_klein/12_thumb_691CE7B2.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Give the publication a name (SnapshotTest) and complete the wizard&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/13_7A211595.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="13" border="0" alt="13" src="http://sqlblog.com/blogs/jorg_klein/13_thumb_27360264.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;The publication is created and the articles (tables in this case) are added&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Now the publication is created successfully its time to create a new subscription for this publication.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/14_383A3047.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="14" border="0" alt="14" src="http://sqlblog.com/blogs/jorg_klein/14_thumb_654F1D15.png" width="244" height="156" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;Expand the Replication folder in SSMS and right click Local Subscriptions, choose New Subscriptions&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/15_0B44CD6C.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="15" border="0" alt="15" src="http://sqlblog.com/blogs/jorg_klein/15_thumb_1529BED7.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;The New Subscription Wizard appears&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/16_13E525F8.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="16" border="0" alt="16" src="http://sqlblog.com/blogs/jorg_klein/16_thumb_40FA12C6.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;Select the publisher on which you just created your publication and select the database and publication (SnapshotTest)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/17_51FE40A9.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="17" border="0" alt="17" src="http://sqlblog.com/blogs/jorg_klein/17_thumb_45FC5075.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;You can now choose where the Distribution Agent should run. If it runs at the distributor (push subscriptions) it causes extra processing overhead. If you use a separate server for your ETL process and databases choose to run each agent at its subscriber (pull subscriptions) to reduce the processing overhead at the distributor.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/18_04EDD111.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="18" border="0" alt="18" src="http://sqlblog.com/blogs/jorg_klein/18_thumb_43DF51AC.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Of course we need a database for the subscription and fortunately the Wizard can create it for you. Choose for New database&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/19_02D0D248.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="19" border="0" alt="19" src="http://sqlblog.com/blogs/jorg_klein/19_thumb_3AA3166B.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;Give the database the desired name, set the desired options and click OK&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/20_79949706.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="20" border="0" alt="20" src="http://sqlblog.com/blogs/jorg_klein/20_thumb_3FA5541A.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;You can now add multiple SQL Server Subscribers which is not necessary in this case but can be very useful.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/21_69A55242.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="21" border="0" alt="21" src="http://sqlblog.com/blogs/jorg_klein/21_thumb_3D885551.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;You now need to set the security settings for the Distribution Agent. Click on the …. button&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/22_4E8C8334.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="22" border="0" alt="22" src="http://sqlblog.com/blogs/jorg_klein/22_thumb_5F247E22.png" width="199" height="244" /&gt;&lt;/a&gt;     &lt;br /&gt;Again, in this example I ran the Agent under the SQL Server Agent service account. Read the security best practices &lt;a href="http://technet.microsoft.com/en-us/library/ms151868.aspx"&gt;here&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/23_1E15FEBE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="23" border="0" alt="23" src="http://sqlblog.com/blogs/jorg_klein/23_thumb_79183E44.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;Click Next&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/24_3809BEE0.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="24" border="0" alt="24" src="http://sqlblog.com/blogs/jorg_klein/24_thumb_7B058D4D.png" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;Make sure you create a synchronization job schedule again. This job is also necessary in the SSIS package later on. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/25_4EE8905C.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="25" border="0" alt="25" src="http://sqlblog.com/blogs/jorg_klein/25_thumb_26D5E13D.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Initialize the subscription at first synchronization&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/26_13B4B491.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="26" border="0" alt="26" src="http://sqlblog.com/blogs/jorg_klein/26_thumb_2BD81EEC.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Select the first box to create the subscription when finishing this wizard&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/27_160E368F.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="27" border="0" alt="27" src="http://sqlblog.com/blogs/jorg_klein/27_thumb_54FFB72A.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;Complete the wizard by clicking Finish&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/28_28E2BA39.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="28" border="0" alt="28" src="http://sqlblog.com/blogs/jorg_klein/28_thumb_41062494.png" width="244" height="219" /&gt;&lt;/a&gt;     &lt;br /&gt;The subscription will be created&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/29_520A5277.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="29" border="0" alt="29" src="http://sqlblog.com/blogs/jorg_klein/29_thumb_2D0C91FE.png" width="220" height="244" /&gt;&lt;/a&gt;     &lt;br /&gt;In SSMS you see a new database is created, the subscriber. There are no tables or other objects in the database available yet because the replication jobs did not ran yet.&lt;/p&gt;  &lt;p&gt;Now expand the SQL Server Agent, go to Jobs and search for the job that creates the snapshot:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://sqlblog.com/blogs/jorg_klein/30_3E10BFE1.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="30" border="0" alt="30" src="http://sqlblog.com/blogs/jorg_klein/30_thumb_6EC3C78C.png" width="582" height="442" /&gt;&lt;/a&gt;     &lt;br /&gt;Rename this job to “CreateSnapshot”&lt;/p&gt;  &lt;p&gt;Now search for the job that distributes the snapshot:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://sqlblog.com/blogs/jorg_klein/31_2D491533.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="31" border="0" alt="31" src="http://sqlblog.com/blogs/jorg_klein/31_thumb_07DF21C5.png" width="583" height="443" /&gt;&lt;/a&gt;     &lt;br /&gt;Rename this job to “DistributeSnapshot”     &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Create an SSIS package that executes the snapshot replication&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We now need an SSIS package that will take care of the execution of both jobs. The CreateSnapshot job needs to execute &lt;strong&gt;and finish&lt;/strong&gt; before the DistributeSnapshot job runs. After the DistributeSnapshot job has started the package needs to wait until its finished before the package execution finishes.     &lt;br /&gt;The Execute SQL Server Agent Job Task is designed to execute SQL Agent Jobs from SSIS. Unfortunately this SSIS task only executes the job and reports back if the job started succesfully or not, it does not report if the job actually completed with success or failure. This is because these jobs are asynchronous.&lt;/p&gt;  &lt;p&gt;The SSIS package I’ve created does the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;It runs the CreateSnapshot job &lt;/li&gt;    &lt;li&gt;It checks every 5 seconds if the job is completed with a for loop &lt;/li&gt;    &lt;li&gt;When the CreateSnapshot job is completed it starts the DistributeSnapshot job &lt;/li&gt;    &lt;li&gt;And again it waits until the snapshot is delivered before the package will finish successfully &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/33_2ABFE375.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="33" border="0" alt="33" src="http://sqlblog.com/blogs/jorg_klein/33_thumb_179EB6C9.png" width="584" height="446" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Quite simple and the package is ready to use as standalone extract mechanism. After executing the package the replicated tables are added to the subscriber database and are filled with data:    &lt;br /&gt;    &lt;br /&gt;&amp;#160;&lt;a href="http://sqlblog.com/blogs/jorg_klein/32_2EE9BB3A.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="32" border="0" alt="32" src="http://sqlblog.com/blogs/jorg_klein/32_thumb_09EBFAC1.png" width="253" height="309" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Download the SSIS package &lt;a href="http://cid-46de2d1eb81e0b5d.office.live.com/self.aspx/Blog/SSISExtractPackage.zip"&gt;here&lt;/a&gt; (SSIS 2008)&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In this example I only replicated 5 tables, I could create a SSIS package that does the same in approximately the same amount of time. But if I replicated all the 70+ AdventureWorks tables I would save a lot of time and boring work! With replication services you also benefit from the feature that schema changes are applied automatically which means your entire extract phase wont break. Because a snapshot is created using the bcp utility (bulk copy) it’s also quite fast, so the performance will be quite good.&lt;/p&gt;  &lt;p&gt;Disadvantages of using snapshot replication as extraction tool is the limitation on source systems. You can only choose SQL Server or Oracle databases to act as a publisher.&lt;/p&gt;  &lt;p&gt;So if you plan to build an extract phase for your ETL process that will invoke a lot of tables think about replication services, it would save you a lot of time and thanks to the Extract SSIS package I’ve created you can perfectly fit it in your usual SSIS ETL process.&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=33869" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/Replication+Services/default.aspx">Replication Services</category></item><item><title>Replication Services in a BI environment</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2011/02/24/replication-services-in-a-bi-environment.aspx</link><pubDate>Thu, 24 Feb 2011 14:13:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:33752</guid><dc:creator>jorg</dc:creator><slash:comments>2</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/33752.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=33752</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=33752</wfw:comment><description>&lt;p&gt;In this blog post I will explain the principles of SQL Server Replication Services without too much detail and I will take a look on the BI capabilities that Replication Services could offer in my opinion.&lt;/p&gt;  &lt;p&gt;SQL Server Replication Services provides tools to copy and distribute database objects from one database system to another and maintain consistency afterwards. These tools basically copy or synchronize data with little or no transformations, they do not offer capabilities to transform data or apply business rules, like ETL tools do.    &lt;br /&gt;The only “transformations” Replication Services offers is to filter records or columns out of your data set. You can achieve this by selecting the desired columns of a table and/or by using WHERE statements like this:     &lt;br /&gt;SELECT &amp;lt;published_columns&amp;gt; FROM [Table] WHERE [DateTime] &amp;gt;= getdate() - 60&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;There are three types of replication:     &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;Transactional Replication      &lt;br /&gt;      &lt;br /&gt;&lt;img title="Transactional replication components and data flow" alt="Transactional replication components and data flow" src="http://msdn.microsoft.com/dynimg/IC145887.gif" /&gt;&lt;/strong&gt;     &lt;br /&gt;This type replicates data on a transactional level. The Log Reader Agent reads directly on the transaction log of the source database (Publisher) and clones the transactions to the Distribution Database (Distributor), this database acts as a queue for the destination database (Subscriber). Next, the Distribution Agent moves the cloned transactions that are stored in the Distribution Database to the Subscriber.     &lt;br /&gt;The Distribution Agent can either run at scheduled intervals or continuously which offers near real-time replication of data!     &lt;br /&gt;    &lt;br /&gt;So for example when a user executes an UPDATE statement on one or multiple records in the publisher database, this &lt;strong&gt;transaction&lt;/strong&gt; (not the data itself) is copied to the distribution database and is then also executed on the subscriber. When the Distribution Agent is set to run continuously this process runs all the time and transactions on the publisher are replicated in small batches (near real-time), when it runs on scheduled intervals it executes larger batches of transactions, but the idea is the same.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;Snapshot Replication     &lt;br /&gt;&lt;/strong&gt;    &lt;br /&gt;&lt;strong&gt;&lt;img title="Snapshot replication components and data flow" alt="Snapshot replication components and data flow" src="http://msdn.microsoft.com/dynimg/IC171003.gif" /&gt;       &lt;br /&gt;&lt;/strong&gt;This type of replication makes an initial copy of database objects that need to be replicated, this includes the schemas and the data itself. All types of replication must start with a snapshot of the database objects from the Publisher to initialize the Subscriber. Transactional replication need an initial snapshot of the replicated publisher tables/objects to run its cloned transactions on and maintain consistency.     &lt;br /&gt;    &lt;br /&gt;The Snapshot Agent copies the schemas of the tables that will be replicated to files that will be stored in the Snapshot Folder which is a normal folder on the file system. When all the schemas are ready, the data itself will be copied from the Publisher to the snapshot folder. The snapshot is generated as a set of bulk copy program (BCP) files. Next, the Distribution Agent moves the snapshot to the Subscriber, if necessary it applies schema changes first and copies the data itself afterwards. The application of schema changes to the Subscriber is a nice feature, when you change the schema of the Publisher with, for example, an ALTER TABLE statement, that change is propagated by default to the Subscriber(s). &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;Merge Replication      &lt;br /&gt;&lt;/strong&gt;Merge replication is typically used in server-to-client environments, for example when subscribers need to receive data, make changes offline, and later synchronize changes with the Publisher and other Subscribers, like with mobile devices that need to synchronize one in a while. Because I don’t really see BI capabilities here, I will not explain this type of replication any further.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;Replication Services in a BI environment      &lt;br /&gt;&lt;/strong&gt;Transactional Replication can be very useful in BI environments. In my opinion you never want to see users to run custom (SSRS) reports or PowerPivot solutions directly on your production database, it can slow down the system and can cause deadlocks in the database which can cause errors. Transactional Replication can offer a read-only, near real-time database for reporting purposes with minimal overhead on the source system.&lt;/p&gt;  &lt;p&gt;Snapshot Replication can also be useful in BI environments, if you don’t need a near real-time copy of the database, you can choose to use this form of replication. Next to an alternative for Transactional Replication it can be used to stage data so it can be transformed and moved into the data warehousing environment afterwards.    &lt;br /&gt;In many solutions I have seen developers create multiple SSIS packages that simply copies data from one or more source systems to a staging database that figures as source for the ETL process. The creation of these packages takes a lot of (boring) time, while Replication Services can do the same in minutes. It is possible to filter out columns and/or records and it can even apply schema changes automatically so I think it offers enough features here. I don’t know how the performance will be and if it really works as good for this purpose as I expect, but I want to try this out soon!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update:     &lt;br /&gt;&lt;/strong&gt;I got a questing regarding the supported Replication Services features in the different versions of SQL Server (Standard,Enterprise,etc). There is a nice &lt;a href="http://msdn.microsoft.com/en-us/library/cc645993.aspx#Replication"&gt;table on MSDN&lt;/a&gt; that shows this!&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=33752" width="1" height="1"&gt;</description></item><item><title>SSIS Denali as part of “Enterprise Information Management”</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/12/01/ssis-denali-as-part-of-enterprise-information-management.aspx</link><pubDate>Wed, 01 Dec 2010 19:12:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:31284</guid><dc:creator>jorg</dc:creator><slash:comments>1</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/31284.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=31284</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=31284</wfw:comment><description>&lt;p&gt;When watching the SQL PASS session “What’s Coming Next in SSIS?” of Steve Swartz, the Group Program Manager for the SSIS team, an interesting question came up:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Why is SSIS thought of to be BI, when we use it so frequently for other sorts of data problems?&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The answer of Steve was that he breaks the world of data work into three parts:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;i&gt;Process of inputs        &lt;br /&gt;        &lt;br /&gt;&lt;/i&gt;&lt;/li&gt;    &lt;li&gt;&lt;i&gt;BI        &lt;br /&gt;&amp;#160; &lt;br /&gt;&lt;/i&gt;&lt;/li&gt;    &lt;li&gt;&lt;em&gt;Enterprise Information Management        &lt;br /&gt;&lt;/em&gt;All the work you have to do when you have a lot of data to make it useful and clean and get it to the right place. This covers master data management, data quality work, data integration and lineage analysis to keep track of where the data came from. All of these are part of Enterprise Information Management.       &lt;br /&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/image_10C9680B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/jorg_klein/image_thumb_40A409CC.png" width="558" height="281" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;   &lt;br /&gt;Next, Steve told Microsoft is developing SSIS as part of a large push in all of these areas in the next release of SQL. So SSIS will be, next to a BI tool, part of Enterprise Information Management in the next release of SQL Server. &lt;/p&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;I'm interested in the different ways people use SSIS, I've basically used it for ETL, data migrations and processing inputs. In which ways did you use SSIS?&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=31284" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>Analysis Services Roadmap for SQL Server “Denali” and Beyond</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/11/15/analysis-services-roadmap-for-sql-server-denali-and-beyond.aspx</link><pubDate>Mon, 15 Nov 2010 12:03:17 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:30584</guid><dc:creator>jorg</dc:creator><slash:comments>0</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/30584.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=30584</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=30584</wfw:comment><description>&lt;p&gt;Last week Microsoft announced the “BI Semantic Model” (BISM). I wrote a &lt;a href="http://sqlblog.com/blogs/jorg_klein/archive/2010/11/12/will-ssas-cubes-and-mdx-be-abandoned-because-of-the-bi-semantic-model.aspx"&gt;blog post&lt;/a&gt; about this and now the Analysis Services team wrote an article named: &lt;a href="http://blogs.technet.com/b/dataplatforminsider/archive/2010/11/12/analysis-services-roadmap-for-sql-server-denali-and-beyond.aspx"&gt;Analysis Services – Roadmap for SQL Server “Denali” and Beyond&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/BiSemanticModel_4C0BE529.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="BiSemanticModel" border="0" alt="BiSemanticModel" src="http://sqlblog.com/blogs/jorg_klein/BiSemanticModel_thumb_368DE427.png" width="716" height="538" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=30584" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSAS/default.aspx">SSAS</category></item><item><title>Will SSAS, Cubes and MDX be abandoned because of the BI Semantic Model?</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/11/12/will-ssas-cubes-and-mdx-be-abandoned-because-of-the-bi-semantic-model.aspx</link><pubDate>Fri, 12 Nov 2010 14:51:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:30462</guid><dc:creator>jorg</dc:creator><slash:comments>1</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/30462.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=30462</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=30462</wfw:comment><description>&lt;p&gt;At the PASS Summit that is happening in Seattle at the moment Microsoft announced the “BI Semantic Model” (BISM).&lt;/p&gt;  &lt;p&gt;It looks like BISM is something like the UDM that we now know from SSAS. While the UDM was the bridge between relational data to multidimensional data, BISM is the bridge between relational data to the column-based Vertipaq engine. Some compare BISM to Business Objects universes.   &lt;br /&gt;    &lt;br /&gt;The next version of SSAS will be able to either run in the old “UDM” mode or in “BISM” mode, a combination is not possible. Of course this will have some radical consequences, because there are a few major differences between the two modes:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The switch from multidimensional cubes to the in-memory Vertipaq engine&lt;/li&gt;    &lt;li&gt;The switch from MDX to DAX&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So multidimensional cubes and MDX will be deprecated? No, not really, SSAS as we know it now will be a product in the future and will remain supported. But it looks like Microsoft will concentrate on BISM, mainly because multidimensional cubes and MDX are very difficult to learn. Microsoft wants to make BI more approachable and less difficult, just like with Self Service BI.    &lt;br /&gt;I would say that it’s really time to start learning PowerPivot and DAX right now, if you have not already started learning it. If Microsoft will focus on the new BISM/Vertipaq technology that will be the future if you ask me.&lt;/p&gt;  &lt;p&gt;Chris Webb wrote an interesting article about BISM and it looks like he is not very enthusiastic about the strategy Microsoft takes here because this could be the end of SSAS cubes within a few years: “&lt;em&gt;while it’s not true to say that Analysis Services cubes as we know them today and MDX are dead, they have a terminal illness. I’d give them two, maybe three more releases before they’re properly dead, based on the roadmap that was announced yesterday.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;What’s also very interesting is the comprehensive comment on this article from &lt;a href="http://www.microsoft.com/presspass/exec/de/netz/default.mspx"&gt;Amir Netz&lt;/a&gt;. He explains BISM and UDM will live together in Analysis Services in the future and MOLAP is here to stay: &lt;em&gt;“Make no mistake about it – MOLAP is still the bread and butter basis of SSAS, now and for a very long time. MDX is mature, functional and will stay with us forever.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Read the article from Chris Webb &lt;a href="http://cwebbbi.wordpress.com/2010/11/11/pass-summit-day-2/"&gt;here&lt;/a&gt; and make sure you don’t miss the &lt;a href="http://cwebbbi.wordpress.com/2010/11/11/pass-summit-day-2/#comments"&gt;comment&lt;/a&gt; from Amir!&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=30462" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSAS/default.aspx">SSAS</category></item><item><title>SQL Server code-named 'Denali' - Community Technology Preview 1 (CTP1)</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/11/09/sql-server-code-named-denali-community-technology-preview-1-ctp1.aspx</link><pubDate>Tue, 09 Nov 2010 15:12:17 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:30298</guid><dc:creator>jorg</dc:creator><slash:comments>0</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/30298.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=30298</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=30298</wfw:comment><description>&lt;p&gt;SQL Server Denali (SQL Server 2011) CTP1 has been released!&lt;/p&gt;  &lt;p&gt;Download it &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9"&gt;here&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SQL 2011 is expected to be ready in the third quarter in 2011! I’ve already blogged about a few new SSIS features &lt;a href="http://sqlblog.com/blogs/jorg_klein/archive/2010/10/25/the-next-version-of-ssis-is-coming.aspx"&gt;here&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I will keep you posted!&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=30298" width="1" height="1"&gt;</description></item><item><title>SQL Azure Reporting is announced!</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/11/04/sql-azure-reporting-is-announced.aspx</link><pubDate>Thu, 04 Nov 2010 14:54:27 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:30165</guid><dc:creator>jorg</dc:creator><slash:comments>2</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/30165.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=30165</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=30165</wfw:comment><description>&lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/sqlazurelogolg_36D64ECA.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="sql-azure-logo-lg" border="0" alt="sql-azure-logo-lg" src="http://sqlblog.com/blogs/jorg_klein/sqlazurelogolg_thumb_63EB3B98.jpg" width="240" height="66" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;With SQL Azure Reporting Services you can use SSRS as a service on the Azure platform with all the benefits of Azure and the most features and capabilities of premise. It’s also possible to embed your reports in your Windows or Azure applications. &lt;/p&gt;  &lt;p&gt;Benefits of the Azure platform for Azure Reporting Services are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Highly available, the cloud services platform has built-in high availability and fault tolerance &lt;/li&gt;    &lt;li&gt;Scalable, the cloud services platform automatically scales up and down &lt;/li&gt;    &lt;li&gt;Secure, your reports and SQL Azure databases are on a safe place in the cloud &lt;/li&gt;    &lt;li&gt;Cost effective, you don’t have to set up servers and you don’t have to invest in managing servers &lt;/li&gt;    &lt;li&gt;Use the same tools you use today to develop your solutions. Just develop your reports in BIDS or Report Builder and deploy to Azure &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Disadvantages are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;SQL Azure databases are the only supported data sources in the first version, more data sources are expected to come &lt;/li&gt;    &lt;li&gt;No developer extensibility in the first version, so no custom data sources, assemblies, report items or authentication &lt;/li&gt;    &lt;li&gt;No subscriptions or scheduled delivery &lt;/li&gt;    &lt;li&gt;No Windows Authentication, only SQL Azure username/password is supported in the first version, similar to SQL Azure database. When SQL Azure database gets Windows Authentication, Azure Reporting will follow &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Despite the disadvantages of the first version I think SQL Azure Reporting Services offers great capabilities and can be extremely useful for a lot of organizations.    &lt;br /&gt;I’m really curious about the CTP, which will be available before the end of this year. You can sign up for the SQL Azure Reporting CTP &lt;a href="https://connect.microsoft.com/sqlazurectps?wa=wsignin1.0"&gt;here&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Read more about SQL Azure Reporting &lt;a href="http://www.microsoft.com/en-us/sqlazure/reporting.aspx"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=30165" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSRS/default.aspx">SSRS</category><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/Azure/default.aspx">Azure</category></item><item><title>MCITP – I passed the 70-455 “Upgrade: Transition Your MCITP SQL Server 2005 BI Developer to MCITP SQL Server 2008 BI Developer” exam!</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/11/02/mcitp-i-passed-the-70-455-upgrade-transition-your-mcitp-sql-server-2005-bi-developer-to-mcitp-sql-server-2008-bi-developer-exam.aspx</link><pubDate>Tue, 02 Nov 2010 08:37:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:29845</guid><dc:creator>jorg</dc:creator><slash:comments>7</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/29845.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=29845</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=29845</wfw:comment><description>&lt;p&gt;Recently I passed the &lt;a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-455&amp;amp;Locale=en-us"&gt;70-455&lt;/a&gt; exam. This exam upgrades your SQL 2005 MCTS and MCITP certifications to SQL 2008.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/image_7D0D1A1F.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/jorg_klein/image_thumb_6E626E3A.png" width="160" height="84" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The exam contains 2 sections(basically separate exams), each with 25 questions:    &lt;br /&gt;- A part which covers exam &lt;a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-448"&gt;70-448&lt;/a&gt;: TS: Microsoft SQL Server 2008, Business Intelligence Development and Maintenance     &lt;br /&gt;- A part which covers exam &lt;a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-452"&gt;70-452&lt;/a&gt;: PRO: Designing a Business Intelligence Infrastructure Using Microsoft SQL Server 2008&lt;/p&gt;  &lt;p&gt;You need to pass on both of the sections with a score that’s at least 700. If you fail one section, you fail on the entire exam. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How did I study&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I searched the internet and the conclusion was that there is &lt;a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-455&amp;amp;Locale=en-us#tab3"&gt;no preparation material available&lt;/a&gt; for the 70-452 exam but fortunately there was a &lt;a href="http://www.microsoft.com/learning/en/us/Book.aspx?ID=13112&amp;amp;locale=en-us"&gt;self-paced training kit&lt;/a&gt; for the 70-448 exam, which also covers this exam. So i bought the book, scanned it for subjects that needed attention and fortunately that was enough to pass the exam for me.&lt;/p&gt;  &lt;p&gt;For the entire list of preparation materials for the 70-448 and 70-452 exams follow the links below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-448#tab3"&gt;70-448 preparation materials&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-452#tab3"&gt;70-452 preparation materials&lt;/a&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;My Current Transcript&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/image_47282505.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/jorg_klein/image_thumb_5198D358.png" width="748" height="309" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=29845" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/MS+BI+Exams/default.aspx">MS BI Exams</category></item><item><title>The next version of SSIS is coming!</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/10/25/the-next-version-of-ssis-is-coming.aspx</link><pubDate>Mon, 25 Oct 2010 14:04:08 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:29781</guid><dc:creator>jorg</dc:creator><slash:comments>6</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/29781.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=29781</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=29781</wfw:comment><description>&lt;p&gt;The latest releases of SQL Server contained (almost) no new SSIS features. With the release of SSIS 2008 the ability to use C# scripts, the improved data flow and the cached lookup were most thrilling new features. The release of SQL 2008 R2 only gave us the ability to use a bulk insert mode for the ADO.NET destination, which was a bit disappointing.&lt;/p&gt;  &lt;p&gt;Fortunately Matt Mason from the SSIS team announced that the next version of SQL Server (SQL 11) contain quite some exiting new functionality for SSIS!&lt;/p&gt;  &lt;p&gt;- Undo/Redo support. Finally, this should have been added a long time ago ;-)&lt;/p&gt;  &lt;p&gt;- Improved copy/paste mechanism. Let’s hope we keep the formatting of components after copy/pasting them!&lt;/p&gt;  &lt;p&gt;- Data flow sequence container&lt;/p&gt;  &lt;p&gt;- New icons and rounded corners for tasks and transformations&lt;/p&gt;  &lt;p&gt;- Improved backpressure for data flow transformations with multiple inputs (for example a Merge Join). When one of the inputs get to much data compared to the other, the component that receives the data can tell the data flow that it needs more data on the other input&lt;/p&gt;  &lt;p&gt;- The Toolbox window will automatically locate and show newly installed custom tasks&lt;/p&gt;  &lt;p&gt;I’m Curious about the first CTP!&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=29781" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SSIS – Delete all files except for the most recent one</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/05/28/ssis-delete-all-files-except-for-the-most-recent-one.aspx</link><pubDate>Fri, 28 May 2010 11:53:57 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:25669</guid><dc:creator>jorg</dc:creator><slash:comments>6</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/25669.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=25669</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=25669</wfw:comment><description>&lt;p&gt;Quite often one or more sources for a data warehouse consist of flat files. Most of the times these files are delivered as a zip file with a date in the file name, for example &lt;em&gt;FinanceDataExport_20100528.zip&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Currently I work at a project that does a full load into the data warehouse every night. A zip file with some flat files in it is dropped in a directory on a daily basis. Sometimes there are multiple zip files in the directory, this can happen because the ETL failed or somebody puts a new zip file in the directory manually. Because the ETL isn’t incremental only the most recent file needs to be loaded. To implement this I used the simple code below; it checks which file is the most recent and deletes all other files.&lt;/p&gt;  &lt;p&gt;Usage is quite simple, just copy/paste the code in your script task and create two SSIS variables:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;SourceFolder (type String): The folder that contains the (zip) files&lt;/li&gt;    &lt;li&gt;DateInFilename (type Boolean): A flag, set it to True if your filename ends with the date YYYYMMDD, set it to false if creation date of the files should be used&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Note: In a previous blog post I wrote about unzipping zip files within SSIS, you might also find this useful: &lt;em&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/archive/2009/08/27/ssis-unpack-a-zip-file-with-the-script-task.aspx"&gt;SSIS – Unpack a ZIP file with the Script Task&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;Public Sub &lt;/span&gt;Main()

    &lt;span style="color:green;"&gt;'Use this piece of code to loop through a set of files in a directory
    'and delete all files except for the most recent one based on a date in the filename.

    'File name example:
    'DataExport_20100413.zip

    &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim &lt;/span&gt;rootDirectory &lt;span style="color:blue;"&gt;As New &lt;/span&gt;DirectoryInfo(Dts.Variables(&lt;span style="color:#a31515;"&gt;&amp;quot;SourceFolder&amp;quot;&lt;/span&gt;).Value.ToString) &lt;span style="color:green;"&gt;'Set the directory in SSIS variable SourceFolder. For example: D:\Export\
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim &lt;/span&gt;mostRecentFile &lt;span style="color:blue;"&gt;As String &lt;/span&gt;= &lt;span style="color:#a31515;"&gt;&amp;quot;&amp;quot;
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim &lt;/span&gt;currentFileDate &lt;span style="color:blue;"&gt;As Integer
    Dim &lt;/span&gt;mostRecentFileDate &lt;span style="color:blue;"&gt;As Integer
    Dim &lt;/span&gt;currentFileCreationDate &lt;span style="color:blue;"&gt;As Date
    Dim &lt;/span&gt;mostRecentFileCreationDate &lt;span style="color:blue;"&gt;As Date

    Dim &lt;/span&gt;dateInFilename &lt;span style="color:blue;"&gt;As Boolean &lt;/span&gt;= Dts.Variables(&lt;span style="color:#a31515;"&gt;&amp;quot;DateInFilename&amp;quot;&lt;/span&gt;).Value &lt;span style="color:green;"&gt;'If your filename ends with the date YYYYMMDD set SSIS variable DateInFilename to True. If not set to False.


    &lt;/span&gt;&lt;span style="color:blue;"&gt;If &lt;/span&gt;dateInFilename &lt;span style="color:blue;"&gt;Then

        &lt;/span&gt;&lt;span style="color:green;"&gt;'Check which file is the most recent
        &lt;/span&gt;&lt;span style="color:blue;"&gt;For Each &lt;/span&gt;fi &lt;span style="color:blue;"&gt;As &lt;/span&gt;FileInfo &lt;span style="color:blue;"&gt;In &lt;/span&gt;rootDirectory.GetFiles(&lt;span style="color:#a31515;"&gt;&amp;quot;*.zip&amp;quot;&lt;/span&gt;)

            currentFileDate = &lt;span style="color:blue;"&gt;CInt&lt;/span&gt;(Left(Right(fi.Name, 12), 8)) &lt;span style="color:green;"&gt;'Get date from current filename (based on a file that ends with: YYYYMMDD.zip)

            &lt;/span&gt;&lt;span style="color:blue;"&gt;If &lt;/span&gt;currentFileDate &amp;gt; mostRecentFileDate &lt;span style="color:blue;"&gt;Then

                &lt;/span&gt;mostRecentFileDate = currentFileDate
                mostRecentFile = fi.Name

            &lt;span style="color:blue;"&gt;End If

        Next

    Else &lt;/span&gt;&lt;span style="color:green;"&gt;'Date is not in filename, use creation date

        'Check which file is the most recent
        &lt;/span&gt;&lt;span style="color:blue;"&gt;For Each &lt;/span&gt;fi &lt;span style="color:blue;"&gt;As &lt;/span&gt;FileInfo &lt;span style="color:blue;"&gt;In &lt;/span&gt;rootDirectory.GetFiles(&lt;span style="color:#a31515;"&gt;&amp;quot;*.zip&amp;quot;&lt;/span&gt;)

            currentFileCreationDate = fi.CreationTime &lt;span style="color:green;"&gt;'Get creation date of current file

            &lt;/span&gt;&lt;span style="color:blue;"&gt;If &lt;/span&gt;currentFileCreationDate &amp;gt; mostRecentFileCreationDate &lt;span style="color:blue;"&gt;Then

                &lt;/span&gt;mostRecentFileCreationDate = currentFileCreationDate
                mostRecentFile = fi.Name

            &lt;span style="color:blue;"&gt;End If

        Next

    End If


    &lt;/span&gt;&lt;span style="color:green;"&gt;'Delete all files except the most recent one
    &lt;/span&gt;&lt;span style="color:blue;"&gt;For Each &lt;/span&gt;fi &lt;span style="color:blue;"&gt;As &lt;/span&gt;FileInfo &lt;span style="color:blue;"&gt;In &lt;/span&gt;rootDirectory.GetFiles(&lt;span style="color:#a31515;"&gt;&amp;quot;*.zip&amp;quot;&lt;/span&gt;)

        &lt;span style="color:blue;"&gt;If &lt;/span&gt;fi.Name &amp;lt;&amp;gt; mostRecentFile &lt;span style="color:blue;"&gt;Then

            &lt;/span&gt;File.Delete(rootDirectory.ToString + &lt;span style="color:#a31515;"&gt;&amp;quot;\&amp;quot; &lt;/span&gt;+ fi.Name)

        &lt;span style="color:blue;"&gt;End If

    Next

    &lt;/span&gt;Dts.TaskResult = ScriptResults.Success
&lt;span style="color:blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=25669" width="1" height="1"&gt;</description></item><item><title>SSIS - Package design pattern for loading a data warehouse - Part 2</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/02/28/ssis-package-design-pattern-for-loading-a-data-warehouse-part-2.aspx</link><pubDate>Sun, 28 Feb 2010 16:36:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22656</guid><dc:creator>jorg</dc:creator><slash:comments>11</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/22656.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=22656</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=22656</wfw:comment><description>&lt;P&gt;Since my last blog post about a SSIS package design pattern I’ve received quite some positive reactions and feedback. Microsoft also added a link to the post on the &lt;A href="http://msdn.microsoft.com/en-us/sqlserver/cc511477.aspx"&gt;SSIS portal&lt;/A&gt; which made it clear to me that there is quite some attention for this subject.&lt;/P&gt;
&lt;P&gt;The feedback I received was mainly about two things: &lt;BR&gt;1. Can you visualize the process or make it clearer without the whole technical story so it's easier to understand. &lt;BR&gt;2. How should the Extract phase of the ETL process be implemented when source tables are used by multiple dimensions and/or fact tables.&lt;/P&gt;
&lt;P&gt;In this post I will try to answer these questions. By doing so I hope to offer a complete design pattern that is usable for most data warehouse ETL solutions developed using SSIS.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;BR&gt;SSIS package design pattern for loading a data warehouse&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Using one SSIS package per dimension / fact table gives developers and administrators of ETL systems quite some benefits and is advised by Kimball since SSIS has been released. I have mentioned these benefits in my &lt;A href="http://sqlblog.com/blogs/jorg_klein/archive/2010/01/04/ssis-package-design-pattern-for-loading-a-data-warehouse.aspx"&gt;previous post&lt;/A&gt; and will not repeat them here.&lt;/P&gt;
&lt;P&gt;When using a single modular package approach, developers sometimes face problems concerning flexibility or a difficult debugging experience. Therefore, they sometimes choose to spread the logic of a single dimension or fact table in multiple packages. I have thought about a design pattern with the benefits of a single modular package approach and still having all the flexibility and debugging functionalities developers need.&lt;/P&gt;
&lt;P&gt;If you have a little bit of programming knowledge you must have heard about classes and functions. Now think about your SSIS package as a class or object that exists within code. These classes contain functions that you can call separately from other classes (packages). That would be some nice functionality to have, but unfortunately this is not possible within SSIS by default. &lt;BR&gt;To realize this functionality in SSIS I thought about SSIS Sequence Containers as functions and SSIS packages as classes. &lt;BR&gt;I personally always use four Sequence Containers in my SSIS packages: &lt;BR&gt;- SEQ Extract (extract the necessary source tables to a staging database) &lt;BR&gt;- SEQ Transform (transform these source tables to a dimension or fact table) &lt;BR&gt;- SEQ Load (load this table into the data warehouse) &lt;BR&gt;- SEQ Process (process the data warehouse table to the cube)&lt;/P&gt;
&lt;P&gt;The technical trick that I performed - you can read about the inner working in my previous post - makes it possible to execute only a single Sequence Container within a package, just like with functions in classes when programming code. &lt;BR&gt;The execution of a single dimension or fact table can now be performed from a master SSIS package like this:&lt;/P&gt;
&lt;P&gt;1 - [Execute Package Task] DimCustomer.Extract &lt;BR&gt;2 - [Execute Package Task] DimCustomer.Transform &lt;BR&gt;3 - [Execute Package Task] DimCustomer.Load &lt;BR&gt;4 - [Execute Package Task] DimCustomer.Process&lt;/P&gt;
&lt;P&gt;The package is executed 4 times with an Execute Package Task, but each time only the desired function (Sequence Container) will run.&lt;/P&gt;
&lt;P&gt;If we look at this in a UML sequence diagram we see the following: &lt;BR&gt;&lt;A href="http://sqlblog.com/blogs/jorg_klein/ETL_Example1_27B37C25.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title=ETL_Example1 border=0 alt=ETL_Example1 src="http://sqlblog.com/blogs/jorg_klein/ETL_Example1_thumb_34412941.jpg" width=567 height=587&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;I think this sequence diagram gives you a good overview of how this design pattern is organized. For the technical solution and the download of a template package you should check my &lt;A href="http://sqlblog.com/blogs/jorg_klein/archive/2010/01/04/ssis-package-design-pattern-for-loading-a-data-warehouse.aspx"&gt;previous post&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;BR&gt;How should the Extract phase of the ETL process be implemented when a single source table is used by multiple dimensions and/or fact tables?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;One of the questions that came up with using this design pattern is how to handle the extraction of source tables that are used in multiple dimensions and/or fact tables. The problem here is that a single table would be extracted multiple times which is, of course, undesirable.&lt;/P&gt;
&lt;P&gt;On coincidence I was reading the book &lt;A href="http://www.wrox.com/WileyCDA/WroxTitle/Microsoft-SQL-Server-2008-Integration-Services-Problem-Design-Solution.productCd-0470525762.html"&gt;“SQL Server 2008 Integration Services: Problem – Design - Solution”&lt;/A&gt; (which is a great book!) and one of the data extraction best practices (Chapter 5) is to use one package for the extraction of each source table. Each of these packages would have a very simple dataflow from the source table to the destination table within the staging area. &lt;BR&gt;Of course this approach will be more time consuming than using one big extract package with all table extracts in it but fortunately it also gives you some benefits: &lt;BR&gt;- Debugging, sometimes a source has changed, i.e. a column’s name could have been changed or completely deleted. The error that SSIS will log when this occurs will point the administrators straight to the right package and source table. Another benefit here is that only one package will fail and needs to be edited, while the others can still execute and remain unharmed. &lt;BR&gt;- Flexibility, you can execute a single table extract from anywhere (master package or dim/fact package).&lt;/P&gt;
&lt;P&gt;I recently created some solutions using this extract approach and really liked it. I used 2 SSIS projects: &lt;BR&gt;- one with the dimension and fact table packages &lt;BR&gt;- one with only the extract packages &lt;BR&gt;I have used the following naming conventions on the extract packages: &lt;I&gt;Source_Table.dtsx&lt;/I&gt; and deployed them to a separate SSIS folder. This way the packages won’t bother the overview during development. &lt;BR&gt;A tip here is to use &lt;A href="http://www.codeplex.com/bidshelper"&gt;BIDS Helper&lt;/A&gt;; it has a great functionality to deploy one or more packages from BIDS.&lt;/P&gt;
&lt;P&gt;Merging this approach in the design pattern will give the following result: &lt;BR&gt;- The dimension and fact table extract Sequence Containers will no longer have data flow tasks in it but execute package tasks which point to the extract packages. &lt;BR&gt;- The Extract Sequence Container of the master package will execute all the necessary extract packages at once.&lt;/P&gt;
&lt;P&gt;This way a single source table will always get extracted only one time when executing your ETL from the master package and you still have the possibility to unit test your entire dimension or fact table packages. &lt;BR&gt;Drawing this approach again in a sequence diagram gives us the following example with a run from the master package (only the green Sequence Containers are executed): &lt;BR&gt;&lt;A href="http://sqlblog.com/blogs/jorg_klein/ETL_Example2_2BDD53EA.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title=ETL_Example2 border=0 alt=ETL_Example2 src="http://sqlblog.com/blogs/jorg_klein/ETL_Example2_thumb_58860DC3.jpg" width=781 height=544&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;And like this with a run of a single Dimension package: &lt;BR&gt;&lt;A href="http://sqlblog.com/blogs/jorg_klein/ETL_Example2_Customer_5022386C.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title=ETL_Example2_Customer border=0 alt=ETL_Example2_Customer src="http://sqlblog.com/blogs/jorg_klein/ETL_Example2_Customer_thumb_1632F580.jpg" width=144 height=538&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Overall, the design pattern will now always look like this when executed from a master package: &lt;BR&gt;&lt;A href="http://sqlblog.com/blogs/jorg_klein/ETL_Overview_753F82D8.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title=ETL_Overview border=0 alt=ETL_Overview src="http://sqlblog.com/blogs/jorg_klein/ETL_Overview_thumb_5F096786.jpg" width=597 height=623&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Conclusion &lt;BR&gt;&lt;/B&gt;I think this design pattern is now good enough to be used as a standard approach for the most data warehouse ETL projects using SSIS. Thanks for all the feedback! New feedback is of course more than welcome! &lt;/P&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=22656" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SSIS – Package design pattern for loading a data warehouse</title><link>http://www2.sqlblog.com/blogs/jorg_klein/archive/2010/01/04/ssis-package-design-pattern-for-loading-a-data-warehouse.aspx</link><pubDate>Mon, 04 Jan 2010 13:41:14 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:20482</guid><dc:creator>jorg</dc:creator><slash:comments>26</slash:comments><comments>http://www2.sqlblog.com/blogs/jorg_klein/comments/20482.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/jorg_klein/commentrss.aspx?PostID=20482</wfw:commentRss><wfw:comment>http://www2.sqlblog.com/blogs/jorg_klein/rsscomments.aspx?PostID=20482</wfw:comment><description>&lt;p&gt;I recently had a chat with some BI developers about the design patterns they’re using in SSIS when building an ETL system. We all agreed in creating multiple packages for the dimensions and fact tables and one master package for the execution of all these packages. &lt;/p&gt;  &lt;p&gt;These developers even created multiple packages per single dimension/fact table:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;span style="mso-ansi-language:en-us;"&gt;One extract package where the extract(E) logic of all dim/fact tables is stored&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;One dim/fact package with the transform(T) logic of a single dim/fact table&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;One dim/fact package with the load(L) logic of a single dim/fact table        &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;I like the idea of building the Extract, Transform and Load logic separately, but I do not like the way the logic was spread over multiple packages.      &lt;br /&gt;I asked them why they chose for this solution and there were multiple reasons:&lt;/span&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Enable running the E/T/L parts separately, for example: run only the entire T phase of all dim/fact tables. &lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Run the extracts of all dimensions and fact tables simultaneously to keep the loading window on the source system as short as possible.          &lt;p&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;To me these are good reasons, running the E/T/L phases separately is a thing a developer often wants during the development and testing of an ETL system.      &lt;br /&gt;Keeping the loading window on the source system as short as possible is something that’s critical in some projects. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Despite the good arguments to design their ETL system like this, I still prefer the idea of having one package per dimension / fact table, with complete E/T/L logic, for the following reasons:&lt;/span&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;All the logic is in one place&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Increase understandability&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Perform unit testing&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;If there is an issue with a dimension or fact table, you only have to make changes in one place, which is safer and ore efficient&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;You can see your packages as separate ETL “puzzle pieces” that are reusable&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;It’s good from a project manager point of view; let your customer accept dimensions and fact tables one by one and freeze the appropriate package afterwards&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;The overview in BIDS, having an enormous amount of packages does not make it clearer ;-)&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Simplifies deployment after changes have been made&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Changes are easier to track in source control systems&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Team development will be easier; multiple developers can work on different dim/fact tables without bothering each other.&lt;/span&gt;&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;So basically my goal was clear: to build a solution that has all the possibilities the aforesaid developers asked for, but in one package per dimension / fact table; the best of both worlds.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Solution: &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;The solution I’ve created is based on a parent-child package structure. One parent (master) package will execute multiple child (dim/fact) packages. This solution is based on a single (child) package for each dimension and fact table. Each of these packages contains the following Sequence Containers in the Control Flow:&amp;#160; &lt;br /&gt;&amp;#160;&lt;a href="http://sqlblog.com/blogs/jorg_klein/ChildControlFlow_6A417260.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="ChildControlFlow" border="0" alt="ChildControlFlow" src="http://sqlblog.com/blogs/jorg_klein/ChildControlFlow_thumb_16EA2C3A.jpg" width="173" height="366" /&gt;&lt;/a&gt;&amp;#160; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Normally it would not be possible to execute only the Extract, Transform, Load or (cube) Process Sequence Containers of the child (dim/fact) packages simultaneously.      &lt;br /&gt;      &lt;br /&gt;To make this possible I have created four Parent package variable configurations, one for each ETL phase Sequence Container in the child package:&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;mso-fareast-language:nl;mso-no-proof:yes;"&gt;      &lt;br /&gt;&lt;/span&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image003_0EF289D8.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image003" border="0" alt="clip_image003" src="http://sqlblog.com/blogs/jorg_klein/clip_image003_thumb_068EB481.jpg" width="527" height="377" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p&gt;&lt;/p&gt; &lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image005_1E45EBE7.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image005" border="0" alt="clip_image005" src="http://sqlblog.com/blogs/jorg_klein/clip_image005_thumb_71BCBC00.jpg" width="575" height="468" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p&gt;&lt;/p&gt; &lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Each of these configurations is set on the Disable property of one of the Sequence Containers:      &lt;br /&gt;&lt;/span&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image007_3761461F.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image007" border="0" alt="clip_image007" src="http://sqlblog.com/blogs/jorg_klein/clip_image007_thumb_2EFD70C8.jpg" width="600" height="488" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p&gt;&lt;/p&gt; &lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Using this technique makes it possible to run separate Sequence Containers of the child package from the master package, simply by dis- or enabling the appropriate sequence containers with parent package variables.      &lt;br /&gt;Because the default value of the Disable property of the Sequence Containers is False, you can still run an entire standalone child package, without the need to change anything. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Ok, so far, so good. But, how do I execute only one phase of all the dimension and fact packages simultaneously? Well quite simple: &lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p class="MsoNormal"&gt;     &lt;br /&gt;&lt;/p&gt;   &lt;span style="mso-ansi-language:en-us;"&gt;First add 4 Sequence Containers to the Master package. One for each phase of the ETL, just like in the child packages &lt;/span&gt;&lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;     &lt;br /&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Add Execute Package Tasks for all your packages in every Sequence Container&lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p style="text-indent:-18pt;mso-list:l1 level1 lfo4;" class="MsoListParagraphCxSpLast"&gt;     &lt;br /&gt;&lt;/p&gt;   &lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image008_53AE883F.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image008" border="0" alt="clip_image008" src="http://sqlblog.com/blogs/jorg_klein/clip_image008_thumb_1D5D6030.jpg" width="521" height="543" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;   &lt;p style="text-indent:-18pt;mso-list:l1 level1 lfo4;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;     &lt;br /&gt;If you would execute this master package now, every child package would run 4 times as there are 4 Execute Package Tasks that run the same package in every sequence container.       &lt;br /&gt;To get the required functionality I have created 4 variables inside each Sequence Container (Scope). These will be used as parent variable to set the Disable properties in the child packages. So basically I’ve created 4 variables x 4 Sequence Containers = 16 variables for the entire master package. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Variables for the EXTRACT Sequence Container (vDisableExtract False):      &lt;br /&gt;&lt;/span&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image009_37BD5347.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image009" border="0" alt="clip_image009" src="http://sqlblog.com/blogs/jorg_klein/clip_image009_thumb_6FFBCA5F.png" width="345" height="183" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p&gt;&lt;/p&gt; &lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Variables for the TRANSFORM Sequence Container (vDisableTransform False):      &lt;br /&gt;&lt;/span&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image010_4DC3BED9.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image010" border="0" alt="clip_image010" src="http://sqlblog.com/blogs/jorg_klein/clip_image010_thumb_060235F2.png" width="349" height="175" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p&gt;&lt;/p&gt; &lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;The LOAD and PROCESS Sequence Containers contain variables are based on the same technique.      &lt;br /&gt;      &lt;br /&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;Results:        &lt;br /&gt;&lt;/b&gt;      &lt;br /&gt;Run all phases of a standalone package: Just execute the package:       &lt;br /&gt;&lt;/span&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/clip_image011_3DD47A15.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image011" border="0" alt="clip_image011" src="http://sqlblog.com/blogs/jorg_klein/clip_image011_thumb_6A7D33EE.jpg" width="179" height="407" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p&gt;&lt;/p&gt; &lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Run a single phase of the ETL system (Extract/Transform/Load/Process): Execute the desired sequence container in the main package: &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/RunAllTransforms_3B4B4857.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="RunAllTransforms" border="0" alt="RunAllTransforms" src="http://sqlblog.com/blogs/jorg_klein/RunAllTransforms_thumb_6787CF3B.jpg" width="736" height="391" /&gt;&lt;/a&gt;&amp;#160;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Run a single phase of a single package from the master package:      &lt;br /&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/RunSinglePhaseOfOnePackage_05F21025.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="RunSinglePhaseOfOnePackage" border="0" alt="RunSinglePhaseOfOnePackage" src="http://sqlblog.com/blogs/jorg_klein/RunSinglePhaseOfOnePackage_thumb_6F4FC1DD.jpg" width="590" height="475" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p class="MsoNormal"&gt;     &lt;br /&gt;Run multiple phases of the ETL system, for example only the T and L: Disable the Sequence Containers of the phases that need to be excluded in the master package:       &lt;br /&gt;&lt;/p&gt; &lt;/span&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/RunMultiplePhasesAndExcludeOthers_09AFB4F5.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="RunMultiplePhasesAndExcludeOthers" border="0" alt="RunMultiplePhasesAndExcludeOthers" src="http://sqlblog.com/blogs/jorg_klein/RunMultiplePhasesAndExcludeOthers_thumb_7A2CA325.jpg" width="734" height="384" /&gt;&lt;/a&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="mso-fareast-language:nl;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p&gt;&lt;/p&gt; &lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Run all the child packages in the right order from the master package:      &lt;br /&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;When you add a breakpoint on, for example, the LOAD Sequence Container you see that all the child packages are at the same ETL phase as their parent:&amp;#160; &lt;br /&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/RunCompleteMasterPackageBreakPoint_1177A797.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="RunCompleteMasterPackageBreakPoint" border="0" alt="RunCompleteMasterPackageBreakPoint" src="http://sqlblog.com/blogs/jorg_klein/RunCompleteMasterPackageBreakPoint_thumb_76CB0B7D.jpg" width="745" height="396" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;     &lt;br /&gt;When pressing Continue the package completes:&amp;#160; &lt;br /&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;a href="http://sqlblog.com/blogs/jorg_klein/RunCompleteMasterPackageBreakPointCompleted_2E311CAC.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="RunCompleteMasterPackageBreakPointCompleted" border="0" alt="RunCompleteMasterPackageBreakPointCompleted" src="http://sqlblog.com/blogs/jorg_klein/RunCompleteMasterPackageBreakPointCompleted_thumb_1AA3BD0B.jpg" width="752" height="400" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;       &lt;br /&gt;Conclusion: &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;This parent/child package design pattern for loading a Data Warehouse gives you all the flexibility and functionality you need. It’s ready and easy to use during development and production without the need to change anything.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;With only a single SSIS package for each dimension and fact table you now have the functionality that separate packages would offer. You will be able to, for example, run all the Extracts for all dimensions and fact tables simultaneously like the developers asked for and still have the benefits that come with the one package per dimension/fact table approach.&lt;/span&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;Of course having a single package per dimension or fact table will not be the right choice in all cases but I think it is a good standard approach.    &lt;br /&gt;Same applies to the ETL phases (Sequence Containers). I use E/T/L/P, but if you have different phases, which will be fine, you can still use the same technique. &lt;/span&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;Download the solution with template packages from the URL’s below. Only thing you need to do is change the connection managers to the child packages (to your location on disk) and run the master package! &lt;/span&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;   &lt;p class="MsoNormal"&gt;     &lt;br /&gt;&lt;/p&gt;   &lt;span style="mso-ansi-language:en-us;"&gt;&lt;a href="http://cid-46de2d1eb81e0b5d.skydrive.live.com/self.aspx/Blog/EtlDesignPattern%5E_SSIS2008.zip" target="_blank"&gt;Download for SSIS 2008&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;a href="http://cid-46de2d1eb81e0b5d.skydrive.live.com/self.aspx/Blog/EtlDesignPattern%5E_SSIS2005.zip" target="_blank"&gt;Download for SSIS 2005&lt;/a&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;/span&gt; &lt;/p&gt;  &lt;p class="MsoNormal"&gt;   &lt;br style="mso-special-character:line-break;" /&gt;&lt;/p&gt; &lt;span style="mso-ansi-language:en-us;"&gt;If you have any suggestions, please leave them as a comment. I would like to know what your design pattern is as well!    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;strong&gt;ATTENTION:&lt;/strong&gt; See &lt;a href="http://sqlblog.com/blogs/jorg_klein/archive/2010/02/28/ssis-package-design-pattern-for-loading-a-data-warehouse-part-2.aspx"&gt;Part-2 on this subject&lt;/a&gt; for more background information!&lt;/span&gt;    &lt;p class="MsoNormal"&gt;     &lt;br /&gt;&lt;strong&gt;Backgrounds:&lt;/strong&gt; &lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;mso-fareast-language:nl;"&gt;How to: Use the Values of Parent Variables in a Child Package: &lt;/span&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ms345179.aspx"&gt;&lt;span style="mso-ansi-language:en-us;mso-fareast-language:nl;"&gt;http://technet.microsoft.com/en-us/library/ms345179.aspx&lt;/span&gt;&lt;/a&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="mso-ansi-language:en-us;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=20482" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/jorg_klein/archive/tags/SSIS/default.aspx">SSIS</category></item></channel></rss>