<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-583448162611849186</id><updated>2012-01-04T12:03:42.576Z</updated><category term='install'/><category term='Madison'/><category term='custom logging'/><category term='Denali'/><category term='VMWare'/><category term='Master Data Services'/><category term='SQL 2008'/><category term='general BI'/><category term='Connect'/><category term='Regular Expressions'/><category term='SQL 2005'/><category term='SQLBits'/><category term='data warehouse'/><category term='Oracle'/><category term='Reporting Services'/><category term='SQL Jobs'/><category term='Visual Studio 2010'/><category term='SSMS'/><category term='Analysis Services'/><category term='sparkline'/><category term='data modeling'/><category term='custom task'/><category term='Visual Studio 2008'/><category term='Conferences'/><category term='configuration'/><category term='SQL 2000'/><category term='Performance Point'/><category term='SSAS'/><category term='SSRS'/><category term='Expressions'/><category term='Networking'/><category term='SQL 2008 R2'/><category term='custom rollup problem'/><category term='Parallel Data Warehouse'/><category term='SQL11'/><category term='SSIS'/><category term='MDS'/><category term='DBPro'/><category term='blogs'/><category term='Data dude'/><category term='the Register'/><title type='text'>Phil's fairly useful blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://phil-austin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>58</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-6384085957692990261</id><published>2011-11-28T16:40:00.000Z</published><updated>2011-11-28T16:40:41.391Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reporting Services'/><category scheme='http://www.blogger.com/atom/ns#' term='sparkline'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>Reporting Services Win/Lose Sparkline - Setting the Axis Line</title><content type='html'>Win/lose sparklines are a useful way of displaying performance over time, providing you can boil-down performance to a binary 'win or lose' result. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-TcbrzPT4Cyw/TtOyzSV6ekI/AAAAAAAAAFk/qGBp2Y2nzxw/s1600/WinLoseExmpl.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="31" width="385" src="http://1.bp.blogspot.com/-TcbrzPT4Cyw/TtOyzSV6ekI/AAAAAAAAAFk/qGBp2Y2nzxw/s400/WinLoseExmpl.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Sean Boon has a good example of doing this &lt;a href="http://blogs.msdn.com/b/seanboon/archive/2009/11/16/building-win-loss-sparklines-in-sql-server-reporting-services-2008-r2.aspx"&gt;here&lt;/a&gt; but I struggled to get the Axis line to display in the right place. I thought I'd share what worked for me.&lt;br /&gt;&lt;br /&gt;What I found was after setting the axis to visible, as per Seans blog post, that initially the Axis is drawn at the bottom like so:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-hOCGo4zcNes/TtO4m8yhIFI/AAAAAAAAAGg/FJyQA3Gtm9U/s1600/WinLoseAxisBtm.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="31" width="215" src="http://2.bp.blogspot.com/-hOCGo4zcNes/TtO4m8yhIFI/AAAAAAAAAGg/FJyQA3Gtm9U/s400/WinLoseAxisBtm.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This just looks daft and gives the incorrect or at least confusing impression of where '0' is.&lt;br /&gt;&lt;br /&gt;The answer to this is buried well within the SSRS interface. &lt;br /&gt;&lt;br /&gt;1. First select the sparkline chart. Then press 'F4' to see the Properties grid.&lt;br /&gt;&lt;br /&gt;3. Find the ChartAreas property and select the tilde to the right:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-cY-8BI7q0Ys/TtO2UpA-S0I/AAAAAAAAAF8/nslP6CTby3s/s1600/WinLoseChartData.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="70" width="400" src="http://2.bp.blogspot.com/-cY-8BI7q0Ys/TtO2UpA-S0I/AAAAAAAAAF8/nslP6CTby3s/s400/WinLoseChartData.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;4. Within the 'ChartArea Collection Editor' select the 'CategoryAxes' property and click the tilde to the right of that:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-1UrxPmPzlKI/TtO1yMjVynI/AAAAAAAAAFw/7lMeruCpm-k/s1600/WinLoseChartArea.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="289" width="400" src="http://3.bp.blogspot.com/-1UrxPmPzlKI/TtO1yMjVynI/AAAAAAAAAFw/7lMeruCpm-k/s400/WinLoseChartArea.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;5. Within the 'ChartAxis Collection Editor' make sure that the 'CrossAt' property is set to '0':&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-OqeqN1hxAD4/TtO2tP0qeII/AAAAAAAAAGI/qAycW90jPLU/s1600/WinLoseCrossAt.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="289" width="400" src="http://4.bp.blogspot.com/-OqeqN1hxAD4/TtO2tP0qeII/AAAAAAAAAGI/qAycW90jPLU/s400/WinLoseCrossAt.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;6. Click OK to get back to the 'ChartArea Collectino Editor' and then click the tilde on the right of 'ValueAxes' and repeat step 5.&lt;br /&gt;&lt;br /&gt;7. You should now find that the Axis for your win/lose sparkline goes through the middle of your chart where you'd expect. You'll probably also want to remove the tick marks from the Axis by ticking the 'Hide major tick marks' box in the horizontal axis properties.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-NY2GQLA2d2I/TtO4JJuzR2I/AAAAAAAAAGU/e96ehPSEtIU/s1600/WinLoseFinal.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="31" width="215" src="http://1.bp.blogspot.com/-NY2GQLA2d2I/TtO4JJuzR2I/AAAAAAAAAGU/e96ehPSEtIU/s400/WinLoseFinal.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-6384085957692990261?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=6384085957692990261' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6384085957692990261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6384085957692990261'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2011/11/reporting-services-winlose-sparkline.html' title='Reporting Services Win/Lose Sparkline - Setting the Axis Line'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-TcbrzPT4Cyw/TtOyzSV6ekI/AAAAAAAAAFk/qGBp2Y2nzxw/s72-c/WinLoseExmpl.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-6811645673017896531</id><published>2011-08-08T10:00:00.000+01:00</published><updated>2011-08-08T01:01:25.073+01:00</updated><title type='text'>Splitting dates over monthly periods using a 'numbers table'</title><content type='html'>One of the things you may find yourself having to do is to take a single record with a start and end date and subdivide it into monthly or weekly periods. Typically this is so that you can create a record for each month or week in a data warehouse, and have a data structure thats easy to report from. There are many ways of doing this of course, but an elegant set-based solution involves using a 'numbers table'. &lt;br /&gt;&lt;br /&gt;Numbers tables are well documented &lt;a href="http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/you-require-a-numbers-table.aspx"&gt;elsewhere&lt;/a&gt;, however they can now be created in a trivial fashion in Denali using a &lt;a href="http://msdn.microsoft.com/en-us/library/ff878058%28v=SQL.110%29.aspx"&gt;Sequence&lt;/a&gt;, with the following script.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Courier New;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;USE&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;adventureworks2008r2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;nocount&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;ON&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;IF&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;EXISTS&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;information_schema&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;tables&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;table_name&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'Numbers'&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;DROP&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;numbers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;CREATE&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;numbers&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;NUMBER&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;&lt;i&gt;INT&lt;/i&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;NULL&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;CONSTRAINT&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;pk_numbers&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;PRIMARY&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;KEY&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;CLUSTERED&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;NUMBER&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;WITH&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;FILLFACTOR&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;100&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;IF&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;EXISTS&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;sys&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;objects&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;name&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'SeqNumbers'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;AND&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;type_desc&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'SEQUENCE_OBJECT'&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;DROP&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;sequence&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;dbo&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;seqnumbers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;CREATE&lt;/span&gt;&amp;nbsp;SEQUENCE&amp;nbsp;SeqNumbers&lt;br /&gt;&lt;span style="color: blue;"&gt;AS&amp;nbsp;INT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;MINVALUE&amp;nbsp;0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;INSERT&amp;nbsp;Numbers(Number)&amp;nbsp;VALUES(NEXT&amp;nbsp;VALUE&amp;nbsp;FOR&amp;nbsp;SeqNumbers)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;GO&lt;/span&gt;&amp;nbsp;10000&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;This will give you a table of numbers from 0-10000.&lt;br /&gt;&lt;br /&gt;Then a simple query will split a table into monthly records - or any other time period - by joining to the numbers table using the difference between the start and end dates of the rows you want to split. An example will probably make it clearer - we'll use the Production.BillOfMaterials in the &lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/55330"&gt;AdventureWorks2008R2 database&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Firstly lets make the dates a little less uniform:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Courier New;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;[Production]&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;[BillOfMaterials]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;EndDate&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'20040405'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;BillOfMaterialsID&lt;/span&gt;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;271&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;[Production]&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;[BillOfMaterials]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;StartDate&lt;/span&gt;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;'20040731'&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;EndDate&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'20040801'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;BillOfMaterialsID&lt;/span&gt;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;1950&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;[Production]&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;[BillOfMaterials]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;StartDate&lt;/span&gt;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;'20041031'&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;EndDate&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'20051130'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;BillOfMaterialsID&lt;/span&gt;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;2899&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Querying the Production.BillOfMaterials for an Id and start and end dates and quantity looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-ZYMLExiPgFU/Tj8i4mkIIXI/AAAAAAAAAE0/bhXJ0124j_E/s1600/BoM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-ZYMLExiPgFU/Tj8i4mkIIXI/AAAAAAAAAE0/bhXJ0124j_E/s1600/BoM.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Taking the difference between the start and end dates and joining to the numbers table gives one row per month that exists between the start and end dates. A little jiggery-pokery with the date functions gives you the start and end of each month over which the bill of materials spanned, like so;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Courier New;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;[BillOfMaterialsID]&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;[StartDate]&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;[EndDate]&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: magenta;"&gt;&lt;i&gt;DATEDIFF&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: maroon;"&gt;m&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;StartDate&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;EndDate&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;NumberOfMonths&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: magenta;"&gt;&lt;i&gt;CAST&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;&lt;i&gt;CONVERT&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;i&gt;CHAR&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;6&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: magenta;"&gt;&lt;i&gt;DATEADD&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: maroon;"&gt;m&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Number&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;StartDate&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;112&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: silver;"&gt;+&lt;/span&gt;&lt;span style="color: red;"&gt;'01'&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;&lt;i&gt;DATETIME&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;MonthStartDate&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: magenta;"&gt;&lt;i&gt;DATEADD&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: maroon;"&gt;dd&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;-&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;&lt;i&gt;CAST&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;&lt;i&gt;CONVERT&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;i&gt;CHAR&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;6&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: magenta;"&gt;&lt;i&gt;DATEADD&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: maroon;"&gt;m&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Number&lt;/span&gt;&lt;span style="color: silver;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;StartDate&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;112&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: silver;"&gt;+&lt;/span&gt;&lt;span style="color: red;"&gt;'01'&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;&lt;i&gt;DATETIME&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;MonthEndDate&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: magenta;"&gt;&lt;i&gt;CAST&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: maroon;"&gt;PerAssemblyQty&lt;/span&gt;&lt;span style="color: silver;"&gt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;&lt;i&gt;DATEDIFF&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: maroon;"&gt;m&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;StartDate&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;EndDate&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: silver;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;&lt;i&gt;DECIMAL&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;5&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: maroon;"&gt;PerAssemblyQtyMonthly&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;PerAssemblyQty&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;[Production]&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;[BillOfMaterials]&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;b&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;INNER&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;JOIN&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;dbo&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;Numbers&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;n&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;ON&lt;/span&gt;&amp;nbsp;&lt;span style="color: magenta;"&gt;&lt;i&gt;DATEDIFF&lt;/i&gt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;(&lt;/span&gt;&lt;span style="color: maroon;"&gt;m&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;StartDate&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;EndDate&lt;/span&gt;&lt;span style="color: maroon;"&gt;)&lt;/span&gt;&lt;span style="color: silver;"&gt;&amp;gt;=&lt;/span&gt;&lt;span style="color: maroon;"&gt;n&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: blue;"&gt;Number&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;[EndDate]&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;IS&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;NULL&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;You'll note that I also divided the &lt;span style="font-family: Courier New;"&gt;&lt;span style="color: maroon;"&gt;PerAssemblyQty &lt;/span&gt;&lt;/span&gt;by the number of months (adding one because the DATEDIFF on two dates in the same month returns 0). Finally lets see the result set &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-SWxnG_LSqOc/Tj8jzUgRFDI/AAAAAAAAAFE/D8h-AX6qlEg/s1600/BoMMonth.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="http://4.bp.blogspot.com/-SWxnG_LSqOc/Tj8jzUgRFDI/AAAAAAAAAFE/D8h-AX6qlEg/s640/BoMMonth.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-6811645673017896531?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=6811645673017896531' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6811645673017896531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6811645673017896531'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2011/08/splitting-dates-over-monthly-periods.html' title='Splitting dates over monthly periods using a &apos;numbers table&apos;'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-ZYMLExiPgFU/Tj8i4mkIIXI/AAAAAAAAAE0/bhXJ0124j_E/s72-c/BoM.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-5738992181137842283</id><published>2011-07-13T14:55:00.002+01:00</published><updated>2011-07-13T15:36:38.856+01:00</updated><title type='text'>Denali CTP 3 is out!</title><content type='html'>Not exactly a big fanfare but a story in &lt;a href="http://www.theregister.co.uk/2011/07/13/windows_server_8_peek/"&gt;The Register&lt;/a&gt; reveals that the SQL Server Denali Community Technology Preview 3 is available for download &lt;a href="http://www.microsoft.com/betaexperience/pd/SQLDCTP3CTA/enus/default.aspx"&gt;here:&lt;/a&gt; (it weighs in at about 2GB). More details from Microsoft &lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/3711.aspx"&gt;here&lt;/a&gt; and what is included &lt;a href="http://blogs.technet.com/b/dataplatforminsider/archive/2011/07/11/sql-server-code-name-denali-ctp3-is-here.aspx"&gt;here&lt;/a&gt;. From what I understand this is the last CTP/beta before it goes RTM.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-5738992181137842283?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=5738992181137842283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/5738992181137842283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/5738992181137842283'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2011/07/denali-ctp-3-is-out.html' title='Denali CTP 3 is out!'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-8853924992726658374</id><published>2011-07-08T16:48:00.001+01:00</published><updated>2011-07-08T18:57:05.444+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Master Data Services'/><category scheme='http://www.blogger.com/atom/ns#' term='MDS'/><title type='text'>MDS - Access Denied</title><content type='html'>We're having a play with &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/mds.aspx"&gt;SQL Server Master Data Services&lt;/a&gt; at MITIE with a view to using them to manage some of our analytical Master Data - currently done via scripting. One of the first challenges was security. There is a set of instructions &lt;a href="http://msdn.microsoft.com/en-us/library/ff486968.aspx"&gt;here&lt;/a&gt; but we still managed to get stuck. We configured a user as an administrator for all models as described &lt;a href="http://technet.microsoft.com/en-us/library/ff487055.aspx"&gt;here&lt;/a&gt; but still got an "Access is Denied" message when trying to log in with that user. Note that the system administator has to be a user and not a group. The answer is &lt;a href="http://msdn.microsoft.com/en-us/library/ff487014.aspx"&gt;elsewhere&lt;/a&gt; in the MSDN documentation;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step one&lt;/b&gt;&lt;br /&gt;Under &lt;b&gt;User and Group Permissions&lt;/b&gt; click the down arrow &gt; Edit &gt; Functions. Here I'm showing the group page, but the user page works the same way:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-1amVvpV-24Y/ThclGqJVDZI/AAAAAAAAAEc/UlcRY6736PY/s1600/MDS_EditGrp.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="262" width="320" src="http://1.bp.blogspot.com/-1amVvpV-24Y/ThclGqJVDZI/AAAAAAAAAEc/UlcRY6736PY/s320/MDS_EditGrp.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Step two&lt;/b&gt;&lt;br /&gt;Click the pencil icon to allow for editing&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-MmyS5cL5d_M/ThclO03_M5I/AAAAAAAAAEk/nsJXShun92Q/s1600/MDS_EditBtn.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="228" width="320" src="http://4.bp.blogspot.com/-MmyS5cL5d_M/ThclO03_M5I/AAAAAAAAAEk/nsJXShun92Q/s320/MDS_EditBtn.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Step three&lt;/b&gt;&lt;br /&gt;Add the functions as appropriate. These map onto the 'buttons' that are rendered in the MDS home-page, and should be self-explanatory. To add all of them simply click the button highlighted below:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-EUM7UoqKOKU/ThclVq-O0DI/AAAAAAAAAEs/SQWsy5UTSyo/s1600/MDS_AddFunc.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="215" width="320" src="http://2.bp.blogspot.com/-EUM7UoqKOKU/ThclVq-O0DI/AAAAAAAAAEs/SQWsy5UTSyo/s320/MDS_AddFunc.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Your user or group should now be able to log into MDS, with no "Access is Denied" message. Other permissions can be established as per the &lt;a href="http://technet.microsoft.com/en-us/library/ff486968.aspx"&gt;MSDN documentation&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-8853924992726658374?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=8853924992726658374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8853924992726658374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8853924992726658374'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2011/07/mds-access-denied.html' title='MDS - Access Denied'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-1amVvpV-24Y/ThclGqJVDZI/AAAAAAAAAEc/UlcRY6736PY/s72-c/MDS_EditGrp.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-2029577725160838757</id><published>2011-02-09T19:50:00.001Z</published><updated>2011-02-09T19:51:01.406Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Analysis Services'/><category scheme='http://www.blogger.com/atom/ns#' term='SSAS'/><title type='text'>'Invalid characters' in Analysis Services cube</title><content type='html'>We ran into the following error whilst trying to query our development cube today;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;The server sent an unrecognizable response.&lt;br /&gt;' ', hexadecimal value 0x19, is an invalid character.&lt;/blockquote&gt;&lt;br /&gt;Rather peculiar I think you'd agree! Turns out the data in question was a Unicode field with a ASCII control character in it. 0x19 is ASCII character 25 (19 in hexadecimal) - which stands for EM or &lt;a href="http://nemesis.lonestar.org/reference/telecom/codes/ascii.html"&gt;End of Medium&lt;/a&gt; apparently. &lt;br /&gt;&lt;br /&gt;Analysis Services quite happily processed and stored the data - however any attempt to query it was defeated despite the fact that the associated dimension attribute was also Unicode (ie a &lt;a href="http://support.microsoft.com/kb/299905"&gt;WChar&lt;/a&gt;). This, I realised, was due to the fact that clients communicate with Analysis Services using the &lt;a href="http://msdn.microsoft.com/en-us/library/ms977626.aspx"&gt;XML for Analysis&lt;/a&gt; (XMLA) protocol. As the name suggests its based on XML which cannot encode some unicode characters - including ASCII 25!&lt;br /&gt;&lt;br /&gt;How on earth it got into our source system was a mystery - but we had to do something about it.&lt;br /&gt;&lt;br /&gt;Fortunately there's a very useful option in Analysis Services for dealing with this sort of issue; the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.analysisservices.invalidxmlcharacters.aspx"&gt;InvalidXMLCharacters&lt;/a&gt; property. You can find it by right-clicking on an attribute and selecting Properties:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_bbIj0pCkO7c/TVLkwOAdeHI/AAAAAAAAAEI/8I1K5NWDY20/s1600/AttributeProperties.JPG" imageanchor="1"&gt;&lt;img border="0" height="304" src="http://2.bp.blogspot.com/_bbIj0pCkO7c/TVLkwOAdeHI/AAAAAAAAAEI/8I1K5NWDY20/s320/AttributeProperties.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then expand the 'NameColumn' property and under that you'll find the InvalidXMLCharacters property:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_bbIj0pCkO7c/TVLl1n3dJCI/AAAAAAAAAEQ/nLvjOMmRZBY/s1600/InvalidXMLCharacters.JPG" imageanchor="1"&gt;&lt;img border="0" height="83" src="http://4.bp.blogspot.com/_bbIj0pCkO7c/TVLl1n3dJCI/AAAAAAAAAEQ/nLvjOMmRZBY/s320/InvalidXMLCharacters.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Essentially it tells Analysis Services what to do with characters that aren't supported by XML&lt;br /&gt;&lt;br /&gt;It has three settings:&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Preserve&lt;/b&gt;&lt;/td&gt;&lt;td&gt;Keep invalid characters. The default&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Replace&lt;/b&gt;&lt;/td&gt;&lt;td&gt;Replace with a '?'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;/td&gt;&lt;td&gt;Remove the character from the query results&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;We opted for 'Remove' which resolved our problem. Its worth considering setting this on all unicode and non-unicode text attributes as potentially any off these could include invalid XML characters. It really depends on how well you know - and trust - your data source...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-2029577725160838757?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=2029577725160838757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2029577725160838757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2029577725160838757'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2011/02/invalid-characters-in-analysis-services.html' title='&apos;Invalid characters&apos; in Analysis Services cube'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_bbIj0pCkO7c/TVLkwOAdeHI/AAAAAAAAAEI/8I1K5NWDY20/s72-c/AttributeProperties.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-8164363214680292129</id><published>2011-01-18T16:19:00.006Z</published><updated>2011-01-18T16:25:59.826Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reporting Services'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>Configure Reporting Services to use proxy for Bing maps</title><content type='html'>If you work somewhere that uses a proxy server to connect you and your servers to the internet you will need to configure Reporting Services to use said proxy in order to use the Bing maps layer. Otherwise you will see something along the lines of the following message in your report, instead of a map:&lt;br /&gt;&lt;blockquote&gt;The remote name could not be resolved: 'dev.virtualearth.net'&lt;/blockquote&gt;The solution is easy;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step one&lt;/b&gt;&lt;br /&gt;Navigate to the webconfig file for the instance of Reporting Services you want to proxy out to the internet. Typically for 2008 R2 this will be:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;drive name&amp;gt;\Program Files\Microsoft SQL Server\MSRS10_50.&amp;lt;instance name&amp;gt;\Reporting Services\ReportServer\web.config&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;b&gt;Step two&lt;/b&gt;&lt;br /&gt;Add the following xml fragment to the file - I usually add it in-between the&amp;lt;/runtime&amp;gt; tag and the &amp;lt;/configuration&amp;gt; tag, at the end of the file:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;system.net&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;defaultProxy enabled="true" useDefaultCredentials="true"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;proxy bypassonlocal="True" proxyaddress="http://&amp;lt;proxy server&amp;gt;"&amp;nbsp; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/defaultProxy&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/system.net&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Save the file.&lt;br /&gt;&lt;br /&gt;This of course assumes your server is allowed to proxy out in the first place (which it will need for Bing maps integration). You can test this by logging onto the server and firing up a browser or by asking your friendly local sysadmin...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-8164363214680292129?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=8164363214680292129' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8164363214680292129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8164363214680292129'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2011/01/configure-reporting-services-to-use.html' title='Configure Reporting Services to use proxy for Bing maps'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-2891665842039969040</id><published>2010-11-14T22:53:00.003Z</published><updated>2010-11-14T23:19:21.022Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Denali'/><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><title type='text'>SQL Server Denali: SSIS Configuration and Package Execution</title><content type='html'>One of the first things you note from the release notes are the changes to SSIS configurations in Denali. This is excellent news because the use of configurations in previous versions of SSIS weren't &lt;a href="http://consultingblogs.emc.com/jamiethomson/archive/2008/08/29/ssis-parent-package-configurations-yay-or-nay.aspx"&gt;without&lt;/a&gt; &lt;a href="http://forums.asp.net/t/1035770.aspx"&gt;their&lt;/a&gt; &lt;a href="http://consultingblogs.emc.com/jamiethomson/archive/2005/10/31/SSIS_3A00_-Indirect-configurations-gotcha.aspx"&gt;problems&lt;/a&gt;. The inimitable Jamie Thompson has a &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2010/11/10/introduction-to-ssis-projects-in-denali.aspx"&gt;series&lt;/a&gt; of &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2010/11/12/the-new-execute-package-task-in-ssis-in-denali.aspx"&gt;excellent&lt;/a&gt; &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2010/11/13/ssis-server-catalogs-environments-environment-variables-in-ssis-in-denali.aspx"&gt;posts&lt;/a&gt; about it which I won't repeat here, plus there is additional information on the &lt;a href="http://social.technet.microsoft.com/wiki/search/SearchResults.aspx?q=denali"&gt;MSDN Wiki&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Briefly however, the new deployment model involves deployment to a specially constructed SQL DB otherwise known as 'SSISDB' (at least in this CTP) which appears under its own node in SSMS - with its own GUI options. The SSISDB database is the SSIS 'Catalog' and includes the concepts of environments and parameters to allow run-time configuration of packages. Therefore SSIS is now 'environment aware' and there is no need to have to store configuration locations outside of SSIS in Windows environment variables and so on - which was always a bit awkward. Parameters can now be created on a project level removing the need to create Parent package configurations. All of this can be administered by using views and stored procedures, the API or the aforementioned SSMS.&lt;br /&gt;&lt;br /&gt;However the one thing I was left wondering was: 'how do I execute a package under the new configuration model without using the SSMS GUI?'. DTExec still exists but does not appear to have options to use the new environment variables (at least in the current CTP). Happily perusal of the &lt;a href="http://msdn.microsoft.com/en-us/library/ff878099%28v=SQL.110%29.aspx"&gt;new MSDN documentation&lt;/a&gt; reveals the answer.&lt;br /&gt;&lt;br /&gt;Firstly create and environment called 'env1', deploy an SSIS project called 'Project' with a package called 'Package1' to a folder called 'Test'. See Jamie's blog to set these up. Then do the following. First of all you need to retrieve the appropriate reference id for the project and environment:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Courier New;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@execution_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;&lt;i&gt;BIGINT&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@reference_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: black;"&gt;&lt;i&gt;BIGINT&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@reference_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;e&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;reference_id&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;catalog&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;project_environments&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;e&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;INNER&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;JOIN&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;catalog&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;projects&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;p&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;ON&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;e&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;project_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;p&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;project_id&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: maroon;"&gt;e&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;environment_name&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'env1'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;AND&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;p&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: maroon;"&gt;name&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'Project'&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;Then we need to tell the SSIS Catalog that we want to execute the package with the particular reference:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Courier New;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;EXECUTE&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;catalog&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: #ff0080;"&gt;&lt;b&gt;create_execution&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@folder_name&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'Test'&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@project_name&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'Project'&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@package_name&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;'Package1.dtsx'&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@reference_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@reference_id&lt;/span&gt;&lt;span style="color: silver;"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@execution_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@execution_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;OUTPUT&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Finally tell SSIS to execute using the execution id created above:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Courier New;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;EXECUTE&lt;/span&gt;&amp;nbsp;&lt;span style="color: maroon;"&gt;catalog&lt;/span&gt;&lt;span style="color: silver;"&gt;.&lt;/span&gt;&lt;span style="color: #ff0080;"&gt;&lt;b&gt;start_execution&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@execution_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: silver;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: #8000ff;"&gt;@execution_id&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;A couple of notes: &lt;br /&gt;&lt;br /&gt;1. The package referenced by 'create_execution' has to have the 'Entry-point package' property set in Visual Studio:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_bbIj0pCkO7c/TOBrQyzShqI/AAAAAAAAAD0/RhyoU7wE3x4/s1600/EntryPoint.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_bbIj0pCkO7c/TOBrQyzShqI/AAAAAAAAAD0/RhyoU7wE3x4/s1600/EntryPoint.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;2. There is an unused parameter in the above call to 'create_execution' - '@use32bitruntime' - use this on 64-bit environments if you want to force SSIS to execute in 32-bit mode.&lt;br /&gt;&lt;br /&gt;This leaves two overall configuration options as I see it. You could either:&lt;br /&gt;&lt;br /&gt;1. Have one SSIS 'environment' for every application you have. This means that the SSIS environment referenced at runtime would be the same across Dev, Test, Live and so on. Obviously the parameters themselves would be different!&lt;br /&gt;&lt;br /&gt;2. Have all of your application/network environments (ie Dev, Test, Live) created in every instance of the SSIS Catalog and reference the appropriate one at runtime. This is obviously more flexible but probably carries more risk of running the wrong configuration on the wrong environment - with potentially serious consequences!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-2891665842039969040?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=2891665842039969040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2891665842039969040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2891665842039969040'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/11/sql-server-denali-ssis-configuration.html' title='SQL Server Denali: SSIS Configuration and Package Execution'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_bbIj0pCkO7c/TOBrQyzShqI/AAAAAAAAAD0/RhyoU7wE3x4/s72-c/EntryPoint.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-8238991096591493240</id><published>2010-11-14T21:40:00.002Z</published><updated>2010-11-14T23:22:26.438Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Denali'/><category scheme='http://www.blogger.com/atom/ns#' term='SSMS'/><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><title type='text'>SQL Server Denali: First Impressions</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_bbIj0pCkO7c/TOBQ9JM19FI/AAAAAAAAADk/sX8VJ6h6vZ4/s1600/Denali.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="130" src="http://3.bp.blogspot.com/_bbIj0pCkO7c/TOBQ9JM19FI/AAAAAAAAADk/sX8VJ6h6vZ4/s200/Denali.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;So I, along with a great many others, have been playing around with Denali CTP1 over the last few days and reading about the many announcements made at SQL PASS. Its become clear that its probably the biggest release since SQL Server 2005 in terms of new features, with possibly the biggest splash being made by 'Project Crescent' (the reporting tool I mentioned in my previous Denali post) and the Business Intelligence Semantic Model (BISM).&lt;br /&gt;&lt;br /&gt;They're both described in quite a bit of detail &lt;a href="http://blogs.technet.com/b/dataplatforminsider/archive/2010/11/12/analysis-services-roadmap-for-sql-server-denali-and-beyond.aspx"&gt;here&lt;/a&gt;, and the introduction of BISM has provoked some &lt;a href="http://feedproxy.google.com/%7Er/wordpress/Cpjz/%7E3/JRFvASy0IG0/"&gt;misgivings&lt;/a&gt; in the developer community. However the introduction of the Powerpivot engine (otherwise known as Vertipaq) to developer tools, has to be a good thing even if they haven't managed to integrate it with Analysis Services. Potentially this could even mean the end of data warehousing and ETL, although this has been tried before...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/b/sqlrsteamblog/archive/2010/11/09/a-glimpse-at-project-crescent.aspx"&gt;Project Crescent&lt;/a&gt; is Silverlight-based and looks like the sort of end-user BI tool those of us working with MS BI software have been waiting for since Reporting Services came out. There's a very brief demo of it &lt;a href="http://blogs.msdn.com/b/bi/archive/2010/11/09/data-visualization-done-right-project-crescent.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;On a more detailed note as I said in my &lt;a href="http://phil-austin.blogspot.com/2010/11/denali-available-for-download.html"&gt;previous post&lt;/a&gt; you won't be able to use the new Denali CTP1 projects if you have 2008 or 2008 R2 installed and I found that I had to uninstall the &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=B0155166-B0A3-436E-AC95-37D7E39A440C"&gt;2008 Team Foundation Client&lt;/a&gt; as well. However if you're using Windows 7 PowerShell 2.0 is already installed.&lt;br /&gt;&lt;br /&gt;Additionally on starting SQL Server Management Studio (SSMS) I found the Create Catalog on the Integration Services folder (of which more in a later post) greyed out as follows:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_bbIj0pCkO7c/TOBU74pQpLI/AAAAAAAAADo/DD4uCQdGjs0/s1600/CreateCatalogGreyedOut.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="244" src="http://1.bp.blogspot.com/_bbIj0pCkO7c/TOBU74pQpLI/AAAAAAAAADo/DD4uCQdGjs0/s320/CreateCatalogGreyedOut.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;When I tried to connect to the (now superceded) Integration Services Server I got the following 'Access denied' error:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_bbIj0pCkO7c/TOBU8RlBNTI/AAAAAAAAADw/OG3DH_r49RE/s1600/SSISConnectionError.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="186" src="http://4.bp.blogspot.com/_bbIj0pCkO7c/TOBU8RlBNTI/AAAAAAAAADw/OG3DH_r49RE/s320/SSISConnectionError.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On Windows 7 both problems were solved by simply running SSMS in Administrator mode by right-clicking on the SSMS icon and selecting 'Run as Administrator':&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_bbIj0pCkO7c/TOBU8JRzQxI/AAAAAAAAADs/kUpZTN5Gw08/s1600/RunSSISAsAdmin.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="81" src="http://3.bp.blogspot.com/_bbIj0pCkO7c/TOBU8JRzQxI/AAAAAAAAADs/kUpZTN5Gw08/s320/RunSSISAsAdmin.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;More soon...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-8238991096591493240?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=8238991096591493240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8238991096591493240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8238991096591493240'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/11/sql-server-denali-first-impressions.html' title='SQL Server Denali: First Impressions'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_bbIj0pCkO7c/TOBQ9JM19FI/AAAAAAAAADk/sX8VJ6h6vZ4/s72-c/Denali.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-8983730314643639815</id><published>2010-11-11T08:34:00.002Z</published><updated>2010-11-11T09:00:50.042Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Denali'/><title type='text'>Denali available for download</title><content type='html'>As promised by MS the first CTP of the next version of SQL Server is available for &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9&amp;amp;displaylang=en"&gt;download&lt;/a&gt; now. What's new? Check &lt;a href="http://www.microsoft.com/sqlserver/en/us/product-info/future-editions.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/bb500435%28SQL.110%29.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;One thing that immediately jumps out at me is the following;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Business users will gain greater agility and empowerment with a new  highly interactive, web-based data exploration and visualization  solution. Introducing new and engaging ways to discover insights through  a drag-and-drop interface, smart and powerful data querying and  interactive storyboarding to allow users to quickly create and share  visual presentations of large datasets.&lt;/blockquote&gt;Sounds intriguing - but I'm not sure its in the CTP. Needless to say I'm downloading now...&lt;br /&gt;&lt;br /&gt;Update:&lt;br /&gt;&lt;br /&gt;Its worth checking the release notes &lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/sql-server-code-named-quot-denali-quot-ctp1-release-notes.aspx"&gt;here&lt;/a&gt;. There is a dependency on Powershell 2.0 - and more importantly no support for side-by-side installations with 2008/R2. There is also no support for XP regardless of SP version.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-8983730314643639815?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=8983730314643639815' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8983730314643639815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8983730314643639815'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/11/denali-available-for-download.html' title='Denali available for download'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-6751745245222547916</id><published>2010-10-28T13:34:00.001+01:00</published><updated>2010-10-28T13:35:19.058+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>Integration Services Lookup caching - Part one</title><content type='html'>Lookup caching in Integration Services is a new feature in 2008 which didn't get a lot of attention at the time of release and even now a search reveals some posts that discuss one aspect or other, but maybe not the whole story. Hopefully I will redress the balance here a little.&lt;br /&gt;&lt;br /&gt;First of all then - what is Lookup caching?&lt;br /&gt;&lt;br /&gt;Back in Integration Services 2005 there was a transformation task which allowed you to match a record in the dataflow with record or field in a database via an OLE DB connection. In a data warehouse context this was often used to look up &lt;a href="http://www.kimballgroup.com/html/articles_search/articles1998/9805d05.html"&gt;surrogate keys&lt;/a&gt; when loading fact tables. This was OK but every time a lookup was needed it required a round-trip to the database. If you're loading a data warehouse with &lt;a href="http://www.kimballgroup.com/html/articles_search/articles1997/9708d05.html"&gt;role-playing dimensions&lt;/a&gt; you might be looking up the same values for the same fact table, in the same dataflow. There were some options for preformance-tuining but essentially you always had to connect to the database in some way every time. Inefficient and in stark contrast to products such as Informatica which allowed you to reuse lookup data cached in memory.&lt;br /&gt;&lt;br /&gt;So what changed in 2008?&lt;br /&gt;&lt;br /&gt;For 2008 Microsoft substantially improved lookup functionality. You now have two basic caching options for lookups. These boil down to in-memory caching and file caching. Both are potentially faster than lookups using a database.&lt;br /&gt;&lt;br /&gt;In this post we'll deal with memory-caching.&lt;br /&gt;&lt;br /&gt;As the name suggests this stores the lookup data in-memory (ie RAM). This is pretty well covered by Jamie &lt;a href="http://consultingblogs.emc.com/jamiethomson/archive/2007/11/16/Katmai_3A00_-SSIS_3A00_-Lookup-component-gets-a-makeover.aspx"&gt;here&lt;/a&gt; . The key point is that the in-memory cache will not extend beyond the scope of the package ie you can't re-use an in-memory cache in one package having created in another. At this point its worth clarifying how this is used in a package. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step one:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After you've created a connection manager, the first step is to create a data source in a Data Flow Task - in this example it is an OLEDB Source Transformation. Note you can use any source for this - providing another advantage over using the 2005 look-up task on its own. I'm calling this OLEDB_Dim_Time for obvious reasons:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_bbIj0pCkO7c/TMllknVLMsI/AAAAAAAAACo/IngkrbTnAsc/s1600/Cache_OLEDBS.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_bbIj0pCkO7c/TMllknVLMsI/AAAAAAAAACo/IngkrbTnAsc/s1600/Cache_OLEDBS.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;&lt;ole db="" editor="" image="" source=""&gt;&amp;nbsp;&lt;/ole&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_bbIj0pCkO7c/TMlmxWiHTEI/AAAAAAAAADI/0qq3sMtBsV8/s1600/Cache_CTE.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ole db="" editor="" image="" source=""&gt;As you can see we're going to look up a time surrogate key - and by time I mean time of day not a calendar or date dimension. I'll cover the usefulness of a 'real' time dimension in another post. As is best practice we are selecting only the fields needed for the look-up and the value to be added to the data flow (ie the TimeKey). &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step two:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The next step is to terminate the data flow in the Cache Transform - which caches in memory.&lt;br /&gt;&lt;br /&gt;The Cache Transform Editor looks as follows:&lt;br /&gt;&lt;br /&gt;&lt;cache editor="" image="" transform=""&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;a href="http://1.bp.blogspot.com/_bbIj0pCkO7c/TMlmxWiHTEI/AAAAAAAAADI/0qq3sMtBsV8/s1600/Cache_CTE.JPG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_bbIj0pCkO7c/TMlmxWiHTEI/AAAAAAAAADI/0qq3sMtBsV8/s1600/Cache_CTE.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt; &lt;br /&gt;Here you need to create a cache connection manager by clicking the New... button. This then displays the Cache Connection Manager Editor, give the Cache Connection Manager a sensible name - in this case 'TimeLKP', and click on the 'Columns' tab:&amp;nbsp;&lt;/cache&gt;&lt;/ole&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_bbIj0pCkO7c/TMlnvKWUO9I/AAAAAAAAADM/mcPNizT45Yg/s1600/Cache_ColMaps.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_bbIj0pCkO7c/TMlnvKWUO9I/AAAAAAAAADM/mcPNizT45Yg/s1600/Cache_ColMaps.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;Here you need to specify which columns are 'indexed columns'. This isn't 'indexed' in the sense that there's a database index on the columns specified, instead this is the index that the lookup will use (ie the business key(s)). In other words, specify the order in which a lookup transform should use the lookup columns - lowest level (ie most granular) first. Here we have one column to lookup on so we make this position 1. Then if you want, you can alter the column names in the cache as follows:&lt;br /&gt;&lt;br /&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;a href="http://4.bp.blogspot.com/_bbIj0pCkO7c/TMloDMg_sII/AAAAAAAAADQ/HKyXryt3BnM/s1600/Cache_ColMaps2.JPG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_bbIj0pCkO7c/TMloDMg_sII/AAAAAAAAADQ/HKyXryt3BnM/s1600/Cache_ColMaps2.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt; &lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;&lt;br /&gt;&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;At the end of this you should have a Data Flow that looks something like this:&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_bbIj0pCkO7c/TMlsFNVKMlI/AAAAAAAAADg/Od5v4IuKbak/s1600/Cache_Dataflow.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_bbIj0pCkO7c/TMlsFNVKMlI/AAAAAAAAADg/Od5v4IuKbak/s1600/Cache_Dataflow.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;&lt;br /&gt;&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;If you were creating multiple caches you could put them all within the same Data Flow - or split them up, its up to you. However, you have to ensure that the cache is created before the lookup is used. To this end I put the lookup in a seperate Data Flow.&lt;b&gt; &lt;/b&gt;&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;br /&gt;&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;&lt;b&gt;Step three:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;All thats left is to use the Cache Connection Manager in a Lookup Transform. &lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;This is very straightforward. &lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;Create another Data Flow and &lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;within that, &lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;a data source connection in the normal way. Then add a Lookup Transform to the Data Flow and open its Editor. &lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;Select the 'Cache connection manager' radio button.&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt; &lt;br /&gt;&lt;lookup transform=""&gt;&lt;/lookup&gt;&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;a href="http://4.bp.blogspot.com/_bbIj0pCkO7c/TMlolVFd_2I/AAAAAAAAADU/JVEzL5qXnoY/s1600/Cache_LookupGen.JPG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_bbIj0pCkO7c/TMlolVFd_2I/AAAAAAAAADU/JVEzL5qXnoY/s1600/Cache_LookupGen.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;&lt;lookup transform=""&gt; &lt;br /&gt;Then choose your Cache connection:&amp;nbsp;&lt;/lookup&gt;&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_bbIj0pCkO7c/TMlpZnzqHjI/AAAAAAAAADc/l6bCqCDmpg8/s1600/Cache_Lookup1.JPG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_bbIj0pCkO7c/TMlpZnzqHjI/AAAAAAAAADc/l6bCqCDmpg8/s1600/Cache_Lookup1.JPG" /&gt;&lt;/a&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;&lt;lookup transform=""&gt; &lt;/lookup&gt;&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;br /&gt;&lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;&lt;lookup transform=""&gt;The rest of the process is exactly the same as a normal lookup:&lt;/lookup&gt;&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_bbIj0pCkO7c/TMlpZOEs2-I/AAAAAAAAADY/IsReoE5d3wk/s1600/Cache_Lookup2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_bbIj0pCkO7c/TMlpZOEs2-I/AAAAAAAAADY/IsReoE5d3wk/s1600/Cache_Lookup2.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Hopefully thats clarified how to go about creating an in-memory lookup cache. In my next post I'll demonstrate creating a file-cache and share the results of my entirely unscientific performance comparison&amp;nbsp; of memory-caching vs file-caching vs &lt;ole db="" editor="" image="" source=""&gt;&lt;cache editor="" image="" transform=""&gt;&lt;cache editor="" image="" mappings="" transform=""&gt;&lt;lookup transform=""&gt;no caching. &lt;/lookup&gt;&lt;/cache&gt;&lt;/cache&gt;&lt;/ole&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-6751745245222547916?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=6751745245222547916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6751745245222547916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6751745245222547916'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/10/integration-services-lookup-caching.html' title='Integration Services Lookup caching - Part one'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_bbIj0pCkO7c/TMllknVLMsI/AAAAAAAAACo/IngkrbTnAsc/s72-c/Cache_OLEDBS.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-2882416312968510128</id><published>2010-09-30T21:30:00.002+01:00</published><updated>2010-09-30T21:50:06.729+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL11'/><title type='text'>Next version SSIS</title><content type='html'>Details of the next version of SSIS have been &lt;a href="http://blogs.msdn.com/b/mattm/archive/2010/08/25/upcoming-product-changes.aspx"&gt;leaking&lt;/a&gt; onto the &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2010/09/10/newly-closed-connect-items-auger-well-for-ssis-in-denali.aspx"&gt;internets&lt;/a&gt;. Some highlights; undo in the designer - which will be a big time-saver, data-flow sequence containers - allowing developers to group and hide transformations, and last but not least - rounded corners!&lt;br /&gt;&lt;br /&gt;This is great, and no doubt other improvements will be announced over the next few weeks (presumably Visual Studio 2010 integration is a cast-iron certainty). However other gripes on &lt;a href="https://connect.microsoft.com/"&gt;connect&lt;/a&gt; remain open, or have already been closed as 'won't fix', such as case sensitivity on the Lookup transform (forcing additional 'uppercase' columns, or passing the whole lookup to the SQL database), and some of Jamie Thomsons debugging suggestions.&lt;br /&gt;&lt;br /&gt;Nit-picking aside its interesting to note that less than 6 months after the release of R2 MS is starting to talk about CTP's of the next version.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-2882416312968510128?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=2882416312968510128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2882416312968510128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2882416312968510128'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/09/next-version-ssis.html' title='Next version SSIS'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-1559213240142538689</id><published>2010-09-22T01:10:00.000+01:00</published><updated>2010-09-22T01:10:00.963+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data dude'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Connect'/><category scheme='http://www.blogger.com/atom/ns#' term='DBPro'/><title type='text'>Data dude build without a Visual Studio installation</title><content type='html'>The simple answer is that &lt;a href="http://sqlserverselect.blogspot.com/2010/07/visual-studio-2010-database-projects.html"&gt;you can't&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I've just run into this issue myself. It strikes me that requiring an additional client license, and a full VS install simply to_build_a project is way over-the-top. The TFS alternative is obviously better (it being a server product) - but potentially still requires additional licensing. Anyway with increasing numbers of shops running &lt;a href="http://martinfowler.com/articles/continuousIntegration.html"&gt;continuous integration&lt;/a&gt; I think it removes a significant amount of desirable functionality from the Visual Studion database project story.&lt;br /&gt;&lt;br /&gt;If you want to try and get database projects built only using MSbuild vote &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/details/580568/ability-to-build-database-projects-using-only-msbuild"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-1559213240142538689?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=1559213240142538689' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1559213240142538689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1559213240142538689'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/09/data-dude-build-without-visual-studio.html' title='Data dude build without a Visual Studio installation'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-254416240880291739</id><published>2010-09-19T10:40:00.000+01:00</published><updated>2010-09-19T10:46:12.314+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data dude'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Connect'/><category scheme='http://www.blogger.com/atom/ns#' term='DBPro'/><title type='text'>Data dude erroring on deployment - Connect request</title><content type='html'>I've created a &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/details/601532/add-database-size-and-auto-growth-settings-to-visual-studio-database-projects"&gt;connect request&lt;/a&gt; for the problem described &lt;a href="http://phil-austin.blogspot.com/2010/08/data-dude-erroring-on-deployment-over.html"&gt;below&lt;/a&gt;. Fingers crossed it gets accepted - if you want it added go and vote now!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-254416240880291739?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=254416240880291739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/254416240880291739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/254416240880291739'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/09/data-dude-erroring-on-deployment.html' title='Data dude erroring on deployment - Connect request'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-2656982042954917983</id><published>2010-08-21T16:23:00.000+01:00</published><updated>2010-09-04T10:20:29.154+01:00</updated><title type='text'>Data dude erroring on deployment over-writing database file settings</title><content type='html'>At MITIE we've started using Visual Studio (VS) 2010 for managing database development. The nice thing about 2010 is that the functionality from Data Dude that used to be in a seperate sku and license is now included in the vanilla editions of VS Pro and Premium (Kimberly Tripp has a good post about it &lt;a href="http://www.sqlskills.com/BLOGS/KIMBERLY/post/Data-Dude-moving-into-lower-priced-VS-Editions-in-VS-2010-excellent!.aspx"&gt;here&lt;/a&gt;). Premium has more functionality than Pro, obviously.&lt;br /&gt;&lt;br /&gt;I won't cover the advantages of using VS 2010 to develop databases as that is covered in detail elsewhere. However there are some wrinkles that aren't quite so well documented.&lt;br /&gt;&lt;br /&gt;I started to get this error whilst trying to deploy a database project from VS 2010, that I'd previously imported from SQL Server:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Error SQL01268: .Net SqlClient Data Provider: Msg 1834, Level 16, State 1, Line 1 The file &lt;span style="font-style:italic;"&gt;[file name]&lt;/span&gt; cannot be overwritten.  It is being used by database &lt;span style="font-style:italic;"&gt;[database name]&lt;/span&gt;. &lt;/blockquote&gt;&lt;br /&gt;There is some information on the problem &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/04d29fec-417f-4d16-839b-89bce5836c57"&gt;here&lt;/a&gt; however the thread is a bit long-winded and the final fix leaves something to be desired...&lt;br /&gt;&lt;br /&gt;Essentially my problem boiled down to the fact that the database that I imported had different file settings to the database I was deploying to. In this case the filegrowth settings. Therefore the database project also had different filegrowth settings than the deployment database. In this situation VS/data dude will detect a difference and attempt to alter the database file. Obviously if there are open connections to the database then this won't work. Therefore there are two solutions:&lt;br /&gt;&lt;br /&gt;1. Close all connections to the database and then deploy (possibly even putting the database in single user mode). This is a bit inconvenient and assumes you're happy with the settings in the database project. In this case I wasn't.&lt;br /&gt;&lt;br /&gt;2. Happily there is an alternative. You can change filegrowth (and other) settings of the database project, however these aren't available through the VS 2010 IDE. Instead you have to edit .sql files found here:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;[Project location]&lt;/span&gt;\&lt;span style="font-style:italic;"&gt;[Database project name]&lt;/span&gt;\Schema Objects\Storage\Files&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;In my case I changed the filegrowth settings from:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;font face="Courier New"&gt;&lt;br /&gt;&lt;font color = "#FF0080"&gt;&lt;b&gt;FILEGROWTH&lt;/b&gt;&lt;/font&gt;&lt;font color = "silver"&gt;=&lt;/font&gt;&lt;font color = "black"&gt;1&lt;/font&gt;&lt;font color = "maroon"&gt;MB&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;To:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;font face="Courier New"&gt;&lt;br /&gt;&lt;font color = "#FF0080"&gt;&lt;b&gt;FILEGROWTH&lt;/b&gt;&lt;/font&gt;&lt;font color = "silver"&gt;=&lt;/font&gt;&lt;font color = "black"&gt;10&lt;/font&gt;&lt;font color = "silver"&gt;%&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;After doing this my deployment problems were solved.&lt;br /&gt;&lt;br /&gt;Clearly appropriate filegrowth settings is a whole seperate topic - which could be the subject of at a whole post in itself. On this occasion 10% was better than 1MB.&lt;br /&gt;&lt;br /&gt;Unfortunately there is a limited set of database settings available to change through VS 2010 using the database properties &gt; schema settings dialogue - which doesn't include autogrowth let alone sizing. Ideally it'd be nice to be able to amend those settings through VS itself. I think there's probably another Connect request in the works...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-2656982042954917983?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=2656982042954917983' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2656982042954917983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2656982042954917983'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/08/data-dude-erroring-on-deployment-over.html' title='Data dude erroring on deployment over-writing database file settings'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-5063914063423432738</id><published>2010-07-07T18:42:00.000+01:00</published><updated>2010-07-07T21:41:56.017+01:00</updated><title type='text'>MERGE and Slowly Changing Dimensions</title><content type='html'>Blimey - has it really been over 2 months since my last post? A few things have happened since then - not least moving job from &lt;a href="http://www.clarity-integration.com/"&gt;Clarity&lt;/a&gt; to &lt;a href="http://www.mitie.com/"&gt;MITIE&lt;/a&gt;. Anyway on with the subject of the post.&lt;br /&gt;&lt;br /&gt;Using the &lt;a href="http://technet.microsoft.com/en-us/library/bb510625.aspx"&gt;MERGE&lt;/a&gt; statement is pretty well &lt;a href="http://blog.sqlauthority.com/2010/06/08/sql-server-merge-operations-insert-update-delete-in-single-execution/"&gt;documented&lt;/a&gt; however what about using it to update a dimension that includes &lt;a href="http://en.wikipedia.org/wiki/Slowly_changing_dimension"&gt;Type 1 and Type 2&lt;/a&gt; changes? There are &lt;a href="http://www.rkimball.com/html/08dt/KU107_UsingSQL_MERGESlowlyChangingDimension.pdf"&gt;examples&lt;/a&gt; on the web but they're either not SQL specific or seem flawed in one way or another. To follow this example you'll need the AdventureWorksDW2008 database available &lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/37109"&gt;here&lt;/a&gt;. The R2 version of AdventureWorksDW might work but as yet I haven't tested it. Firstly lets set up a staging table and a dimension table:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;br /&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ProductKey&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;ProductAlternateKey&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#FF0080"&gt;&lt;b&gt;ISNULL&lt;/b&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;0&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "#FF0080"&gt;&lt;b&gt;HASHBYTES&lt;/b&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "red"&gt;'SHA1'&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;Type1CheckSum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#FF0080"&gt;&lt;b&gt;HASHBYTES&lt;/b&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "red"&gt;'SHA1'&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "fuchsia"&gt;&lt;i&gt;CAST&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "#FF0080"&gt;&lt;b&gt;ISNULL&lt;/b&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;0&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;10&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Type2CheckSum&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;INTO&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;ProductStaging&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;AdventureWorksDW2008&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;DimProduct&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;EndDate&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;IS&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;GO&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;CREATE&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;TABLE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;[dbo]&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;[DimProduct]&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;[ProductKey]&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;[INT]&lt;/i&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;IDENTITY&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;1&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;1&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;NVARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;25&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;[EnglishProductName]&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;[NVARCHAR]&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;50&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;[ListPrice]&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;[MONEY]&lt;/i&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;DateUpdated&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;DATETIME&lt;/i&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;DEFAULT&lt;/font&gt;&amp;nbsp;&lt;font color = "fuchsia"&gt;&lt;i&gt;GETDATE&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARBINARY&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;8000&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;DEFAULT&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;0&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARBINARY&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;8000&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;DEFAULT&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;0&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;StartDate&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;DATETIME&lt;/i&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;DEFAULT&lt;/font&gt;&amp;nbsp;&lt;font color = "fuchsia"&gt;&lt;i&gt;GETDATE&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;EndDate&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;DATETIME&lt;/i&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;CurrentFlag&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;BIT&lt;/i&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NULL&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;DEFAULT&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;1&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;CONSTRAINT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;[PK_DimProduct_ProductKey]&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;PRIMARY&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;KEY&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;CLUSTERED&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;[ProductKey]&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;ASC&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Note that we're using &lt;a href="http://msdn.microsoft.com/en-us/library/ms174415.aspx"&gt;HASHBYTES&lt;/a&gt; on the staging table - this will be used to compare columns. The SHA1 algorithm ensures sensitivity to changes across those columns. If you're using non-character fields you'll need to cast them before hashing them.&lt;br /&gt;&lt;br /&gt;Firstly lets add new records (at this point all of them):&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;br /&gt;&lt;font color = "blue"&gt;MERGE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dbo&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;DimProduct&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;USING&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ProductStaging&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;ON&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;font color = "silver"&gt;=&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;WHEN&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;MATCHED&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;&amp;lt;&amp;gt;&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;THEN&lt;/font&gt;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;type1&amp;nbsp;changes&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;UPDATE&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;=&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;=&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;DateUpdated&lt;/font&gt;&lt;font color = "silver"&gt;=&lt;/font&gt;&lt;font color = "fuchsia"&gt;&lt;i&gt;GETDATE&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;WHEN&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;MATCHED&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;THEN&lt;/font&gt;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;new&amp;nbsp;records&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;INSERT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;VALUES&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;You'll note that this statement actually does the Type 1 updates as well - ie where the checksum\hash columns are different. &lt;br /&gt;&lt;br /&gt;OK, lets add some changes to the ProductName - which will be handled as Type 1 overwrites, and some changes to ListPrice - which we'll handle as Type 2:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;br /&gt;&lt;font color = "blue"&gt;UPDATE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ProductStaging&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'Fred'&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Type1CheckSum&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#FF0080"&gt;&lt;b&gt;HASHBYTES&lt;/b&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "red"&gt;'SHA1'&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'Fred'&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'AR-5381'&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;UPDATE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ProductStaging&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;9.99&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Type2CheckSum&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#FF0080"&gt;&lt;b&gt;HASHBYTES&lt;/b&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "red"&gt;'SHA1'&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "fuchsia"&gt;&lt;i&gt;CAST&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "#FF0080"&gt;&lt;b&gt;ISNULL&lt;/b&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;9.99&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;0&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;10&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'BE-2349'&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;GO&lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;So now we'll do the Type 1 update using the same MERGE statement as above. We also set the DateUpdated column - for auditing purposes:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;MERGE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dbo&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;DimProduct&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;USING&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ProductStaging&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;ON&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;WHEN&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;MATCHED&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;&amp;lt;&amp;gt;&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;THEN&lt;/font&gt;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;type1&amp;nbsp;changes&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;UPDATE&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;DateUpdated&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "fuchsia"&gt;&lt;i&gt;GETDATE&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;WHEN&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;MATCHED&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;THEN&lt;/font&gt;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;new&amp;nbsp;records&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;INSERT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;VALUES&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Here we're careful to ensure that Type 1 changes apply to all records including the historic ones. Some examples filter for current records only...&lt;br /&gt;&lt;br /&gt;Finally the Type 2 INSERTS. The trick here is to use the OUTPUT statement on the UPDATE to create a pseudo-table and then SELECT from that into the DimProduct dimension table to create the new 'current' record. Note that I'm also setting the CurrentFlag and EndDate on the old dimension record - so that its clear this is a historic record. Again all in one statement: &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;br /&gt;&lt;font color = "blue"&gt;INSERT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dbo&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;DimProduct&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;DateUpdated&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;CurrentFlag&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "fuchsia"&gt;&lt;i&gt;GETDATE&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "black"&gt;1&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;&lt;br /&gt;&lt;font color = "blue"&gt;MERGE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;DimProduct&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;USING&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;ProductStaging&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;ON&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;WHEN&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;MATCHED&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&lt;font color = "silver"&gt;&amp;lt;&amp;gt;&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;dim&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;CurrentFlag&lt;/font&gt;&lt;font color = "silver"&gt;=&lt;/font&gt;&lt;font color = "black"&gt;1&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;THEN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;UPDATE&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;CurrentFlag&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;0&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;EndDate&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "fuchsia"&gt;&lt;i&gt;GETDATE&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;OUTPUT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;$Action&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;Operation&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ProductId&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;EnglishProductName&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;ListPrice&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type1Checksum&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;font color = "maroon"&gt;stg&lt;/font&gt;&lt;font color = "silver"&gt;.&lt;/font&gt;&lt;font color = "maroon"&gt;Type2Checksum&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;MergeOut&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;Operation&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'UPDATE'&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;So that's it! Hope its um...useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-5063914063423432738?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=5063914063423432738' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/5063914063423432738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/5063914063423432738'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/07/merge-and-slowly-changing-dimensions.html' title='MERGE and Slowly Changing Dimensions'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-1290789247291512085</id><published>2010-04-21T22:10:00.000+01:00</published><updated>2010-05-29T11:55:07.271+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008 R2'/><title type='text'>SQL Server 2008 R2 RTM</title><content type='html'>MS have issued a &lt;a href="http://www.microsoft.com/Presspass/press/2010/apr10/SQL08RTMPR.mspx"&gt;press release&lt;/a&gt; stating that SQL Server 2008 R2 has been Released To Manufacturing (are they still pressing discs? I guess so...). It also states that it will be available in early May from the likes of &lt;a href="http://www.clarity-integration.com/"&gt;us&lt;/a&gt; and MS's own channels. Self-service BI gets top billing. I've certainly been impressed with the reporting elements of R2 - not only PowerPivot but also Reporting Services, so I'm looking forward to using it in anger with clients...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-1290789247291512085?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=1290789247291512085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1290789247291512085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1290789247291512085'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/04/sql-server-2008-r2-rtm.html' title='SQL Server 2008 R2 RTM'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-8992800937354954139</id><published>2010-03-18T20:42:00.000Z</published><updated>2010-05-29T11:54:49.607+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLBits'/><title type='text'>SQL Bits VI Registration Open</title><content type='html'>Title says it all really. Go &lt;a href="http://www.sqlbits.com/information/Registration.aspx"&gt;here&lt;/a&gt; to register and &lt;a href="http://www.sqlbits.com/information/newagenda.aspx"&gt;here&lt;/a&gt; for the agenda - lots of BI stuff needless to say...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-8992800937354954139?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=8992800937354954139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8992800937354954139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8992800937354954139'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/03/sql-bits-iv-registration-open.html' title='SQL Bits VI Registration Open'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-31662326458160532</id><published>2010-02-18T16:05:00.000Z</published><updated>2010-05-29T11:54:49.608+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLBits'/><title type='text'>SQL Bits 6 and MS Tech Days announced</title><content type='html'>SQL Bits VI, The 6th Sets (see what they did there?) &lt;a href="http://sqlbits.com/News.aspx?Title=SQLBits%20VI%20-%20Date%20and%20Location%20announced"&gt;was announced&lt;/a&gt; a few days ago (although I only got the mail yesterday). Its on the 16th April in London. Handily, the day before - also in London - MS has announced a &lt;a href="http://www.microsoft.com/uk/techdays/dayitp.aspx"&gt;Tech-day devoted to SQL Server&lt;/a&gt;. Good news is that they are both free so get in fast as these are likely to fill up quick...&lt;br /&gt;&lt;br /&gt;Update: registration is yet to open for SQLBits, &lt;a href="http://sqlbits.com/login.aspx"&gt;but you can join their mailing list&lt;/a&gt; to be told when it does.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-31662326458160532?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=31662326458160532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/31662326458160532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/31662326458160532'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/02/sql-bits-6-and-ms-tech-days-announced.html' title='SQL Bits 6 and MS Tech Days announced'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-5415092851302455632</id><published>2010-02-10T12:02:00.000Z</published><updated>2010-02-12T15:55:07.056Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reporting Services'/><title type='text'>Repeating table headers in Reporting Services 2008</title><content type='html'>You may find it a bit of a challenge to get Reporting Services 2008 to repeat table headers across pages. Unfortunately the tablix properties 'Repeat Row Headers' and 'Repeat Column Headers' appear to do absolutely nothing despite &lt;a href="http://msdn.microsoft.com/en-us/library/cc627566.aspx"&gt;what MSDN says&lt;/a&gt;. In fact there is a connect request related to it &lt;a href="https://connect.microsoft.com/SQLServer/feedback/details/337720/katmai-reporting-services-2008-tablix-control-repeat-column-headers-does-not-work"&gt;here&lt;/a&gt;. There is a bit of &lt;a href="http://blogs.msdn.com/robertbruckner/archive/2008/10/13/Repeat-Header-And-Visible-Fixed-Header-Table.aspx"&gt;information&lt;/a&gt; on the web about this - but not definitive guide and I still found myself scratching my head a bit, so here's my attempt at explaining it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Select the tablix in question and click the arrow on the left of Column Groups and the bottom of the Design tab, and select 'Advanced Mode':&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_bbIj0pCkO7c/S3V4pX7w3GI/AAAAAAAAACI/dmdUjTroGAM/s1600-h/Rowheaders1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 81px;" src="http://1.bp.blogspot.com/_bbIj0pCkO7c/S3V4pX7w3GI/AAAAAAAAACI/dmdUjTroGAM/s320/Rowheaders1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5437384777314393186" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 2:&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;Under 'Row Groups' you should now see grey bars before and after each tablix grouping marked '(Static)'. These represent the column headers for each group. Click on one of these:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_bbIj0pCkO7c/S3V4zSou8qI/AAAAAAAAACQ/dSomYg5b6Rg/s1600-h/Rowheaders2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 113px;" src="http://3.bp.blogspot.com/_bbIj0pCkO7c/S3V4zSou8qI/AAAAAAAAACQ/dSomYg5b6Rg/s320/Rowheaders2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5437384947691090594" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 3:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Click the Properties Window (there's no right-click menu on the static groups). On the RepeatOnNewPage property click 'True':&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_bbIj0pCkO7c/S3V48yd4o1I/AAAAAAAAACY/t6aKrTueiz4/s1600-h/Rowheaders3.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 143px;" src="http://3.bp.blogspot.com/_bbIj0pCkO7c/S3V48yd4o1I/AAAAAAAAACY/t6aKrTueiz4/s320/Rowheaders3.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5437385110854345554" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Step 4:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Repeat step 3 for every static group that a repeating header is required. Bear in mind there are the static groups after the tablix - don't set these to repeat.&lt;br /&gt;&lt;br /&gt;Then you should be done! Shame this can't simply be done on the tablix property - lets hope MS fix this in a Service Pack at some point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-5415092851302455632?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=5415092851302455632' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/5415092851302455632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/5415092851302455632'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/02/repeating-table-headers-in-reporting.html' title='Repeating table headers in Reporting Services 2008'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_bbIj0pCkO7c/S3V4pX7w3GI/AAAAAAAAACI/dmdUjTroGAM/s72-c/Rowheaders1.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-329706966393775506</id><published>2010-01-20T21:48:00.000Z</published><updated>2010-05-29T11:55:18.322+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008 R2'/><title type='text'>SQL Server 2008 R2 release dated</title><content type='html'>So the &lt;a href="http://phil-austin.blogspot.com/2009/12/sql-server-r2-release-dated-or-is-it.html"&gt;speculation&lt;/a&gt; was right. SQL Server 2008 R2 will be out in May this year. Check out the post from MS &lt;a href="http://blogs.technet.com/dataplatforminsider/archive/2010/01/19/sql-server-2008-r2-gets-an-official-date.aspx"&gt;here&lt;/a&gt;. No surprises that PowerPivot and self-service BI is getting a lot of airtime.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-329706966393775506?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=329706966393775506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/329706966393775506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/329706966393775506'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/01/sql-server-2008-r2-release-dated.html' title='SQL Server 2008 R2 release dated'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-1781841659683287819</id><published>2010-01-11T17:45:00.000Z</published><updated>2010-05-29T11:54:10.653+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Analysis Services'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>Analysis Services processing failure - 'Class not registered"</title><content type='html'>Beware of migrating SQL Server 2008 Analysis Services databases from a server that had an upgrade from SQL 2005 to one that has a clean install of 2008 - with no previous 2005 install. What you'll find is that the connection string information in the upgraded database will still be using the 2005 SQL Native Client provider; SQLNCLI.1. This is fine on a box that has this provider of course - ie one with a previous 2005 install. However a clean 2008 install won't have this version and you'll get a not terribly informative 'Class not registered message' when you try and process it - as I found out. &lt;br /&gt;&lt;br /&gt;The solution is very straightforward - change the connection string in the database's data source to use SQLNCLI10.1 instead of SQLNCLI.1.&lt;br /&gt;&lt;br /&gt;More information can be found &lt;a href="http://blogs.msdn.com/sqlblog/archive/2009/04/15/class-not-registered-error-after-restoring-an-analysis-services-database-that-uses-the-sql-server-2005-sql-native-client.aspx"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-1781841659683287819?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=1781841659683287819' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1781841659683287819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1781841659683287819'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/01/analysis-services-processing-failure.html' title='Analysis Services processing failure - &apos;Class not registered&quot;'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-1752088215204255543</id><published>2010-01-11T16:18:00.000Z</published><updated>2010-05-29T11:54:21.534+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><title type='text'>Visual Studio 2008 crash using Reporting Services 2008 charts</title><content type='html'>Frustrating day today - with a few techology niggles (see above). Anyway this means I can post about it in the hope that it saves someone else a lot of trouble. The major problem I had was with Visual Studio 2008 crashing without warning or error. The first occasion led to me losing work. On both occasions it happened after adding a standard line chart to a Reporting Services report. After checking the Event Log I found the following entry:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;.NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error (7225795E) (80131506)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Did some Googling around and discovered many people getting a &lt;a href="http://michaelsync.net/2009/10/31/net-runtime-version-2-0-50727-3603-fatal-execution-engine-error-7a036050-80131506-mscoree-dll"&gt;similar&lt;/a&gt; (though not identical) error message. The answer is to download a hotfix &lt;a href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=16827"&gt;here&lt;/a&gt;. So far this seems to have done the trick with no crashes. Note that this isn't included in Visual Studio SP1 or SQL Server 2008 SP1- so service packing won't help (it is in fact a .NET hotfix, from what I can tell) . I would strongly suggest applying the hotfix for anyone planning to do graph/chart work in Reporting Services 2008...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-1752088215204255543?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=1752088215204255543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1752088215204255543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1752088215204255543'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2010/01/visual-studio-2008-crash-using.html' title='Visual Studio 2008 crash using Reporting Services 2008 charts'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-9125183842795821240</id><published>2009-12-03T21:02:00.000Z</published><updated>2010-05-29T11:54:33.456+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>Server properties using err.. SERVERPROPERTY</title><content type='html'>Useful bit of SQL if you're connecting to a SQL Server for the first time:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;SELECT SERVERPROPERTY('Edition') AS SQLVersion&lt;br /&gt;  ,CASE WHEN SERVERPROPERTY('IsIntegratedSecurityOnly')=0 &lt;br /&gt;    THEN 'Mixed Security' ELSE 'Integrated Security Only' END AS IntegratedFlag&lt;br /&gt;  ,SERVERPROPERTY('LicenseType') AS LicenseType&lt;br /&gt;  ,SERVERPROPERTY('ProductLevel') AS SPLevel&lt;br /&gt;  ,SERVERPROPERTY('ServerName') AS ServerName &lt;br /&gt;  ,SERVERPROPERTY('Collation') AS Collation&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-9125183842795821240?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=9125183842795821240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9125183842795821240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9125183842795821240'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/12/server-properties-using-err.html' title='Server properties using err.. SERVERPROPERTY'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-1351478948274587638</id><published>2009-12-02T12:52:00.000Z</published><updated>2010-05-29T11:55:18.323+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008 R2'/><title type='text'>SQL Server R2 release dated - or is it?</title><content type='html'>&lt;a href="http://www.theregister.co.uk"&gt;The Reg&lt;/a&gt; is quoting the &lt;a href="http://blogs.msdn.com/sqlperf/archive/2009/11/30/new-tpc-results-on-sql-server-2008-r2.aspx"&gt;SQL Server Performance blog&lt;/a&gt;, stating that R2 will be released on May 6, 2010. However MS is quoted as saying that this will be delayed if 'more work is needed'. Given that this only emerged as a result of posting some TPC benchmarks, and the resulting backtracking one wonders how well planned this was...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-1351478948274587638?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=1351478948274587638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1351478948274587638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1351478948274587638'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/12/sql-server-r2-release-dated-or-is-it.html' title='SQL Server R2 release dated - or is it?'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-3511054763713113119</id><published>2009-11-22T14:58:00.000Z</published><updated>2010-05-29T11:55:18.324+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLBits'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008 R2'/><category scheme='http://www.blogger.com/atom/ns#' term='Madison'/><category scheme='http://www.blogger.com/atom/ns#' term='Parallel Data Warehouse'/><title type='text'>SQL Bits - R2 day - Parallel Data Warehouse</title><content type='html'>Went to my first &lt;a href="http://sqlbits.com/information/Friday.aspx"&gt;SQL bits&lt;/a&gt; last Friday (given that it was practically &lt;a href="http://www.celtic-manor.com/"&gt;in my backyard&lt;/a&gt; how could I not?) and I have to say that for a not-for-profit community-organised event, it was easily as good as those organised by DevExpress, Microsoft et al. Leaving aside the opportunity to catch-up with ex-colleagues and do a bit of networking there were some excellent sessions. Given that this was 'R2 day' these were almost entirely devoted to the next release of SQL Server. Hence I attended sessions on Gemini (&lt;a href="http://phil-austin.blogspot.com/2009/11/more-sql-2008-r2-news.html"&gt;now PowerPivot&lt;/a&gt;) Madison (now Parallel Data Warehouse) and R2 Reporting Services.&lt;br /&gt;&lt;br /&gt;Today I want to report on the Parallel Data Warehouse (PDW) session given by Thomas Kejser, a good, informative session - that only lacked a demo for obvious reasons (although I was told they are working on that). Any inaccuracies are my own however.&lt;br /&gt;&lt;br /&gt;Firstly Thomas went through the limitations of the usual SMP (think traditional big-iron) architecture. At about 10TB designing the data warehouse database requires significant additional customisation incurring additional administration and development cost. On top of that the cost of moving above a 64-core SMP architecture starts becoming prohibitively expensive in terms of the increase in the number of additional cores for each pound spent (ie doubling the core-count costs more than twice as much). None of this is of course news for those who operate at these sort of scales. &lt;br /&gt;&lt;br /&gt;So PDW is a true MPP solution operating across multiple cores in multiple nodes. PDW comes as a pre-built appliance - but using standard commodity hardware from Dell/EMC, IBM, HP or Bull. Nodes are nothing more than standard servers or disk arrays. The appliance comes pre-built, with all of the cabling, power, disk configuration and software installation already done. In theory it would be possible to mix racks from different hardware vendors. An appliance consists of one or more racks each with 64 cores - Thomas saying the largest being 5 racks at the moment.&lt;br /&gt;&lt;br /&gt;An appliance has two control nodes, a management node, a backup node, and a series of compute and storage nodes. It also had one 'spare' node per rack  - in case of a whole node failure. There is also a landing zone for ETL tools to deposit text files and a specialised data movement service to move data between nodes where necessary.&lt;br /&gt;&lt;br /&gt;As in other MPP architectures designers have to ensure that data is evenly spread across nodes by choosing atomic, evenly distributed columns. Datetime columns are often good candidates. Tables are created with the following syntax:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;CREATE TABLE AS SELECT [select list]&lt;br /&gt;WITH&lt;br /&gt;(&lt;br /&gt;CLUSTER_ON [column name]&lt;br /&gt;DISTRIBUTE_ON [column name] REPLICATE &lt;br /&gt;PARTITION_ON [column name]&lt;br /&gt;)&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;As the key word DISTRIBUTE ON suggests, it identifies the column(s) that distributes the data across the nodes. Its worth pointing out at this point that, like most other MPP products, PDW will only recognise a subset of T-SQL.&lt;br /&gt;&lt;br /&gt;A control node receives queries from clients, breaks the query down and issues it to the compute nodes, based on the distribution of data. Only one control node can be active at one time. Compute nodes work on their slice of the query, aggregating it up and sending it back to the control node. Thus each compute node only has to work on a small part of the total query. As the amount of data grows, additional racks can be added to increase the number of nodes and maintain or increase the performance of the appliance.&lt;br /&gt;&lt;br /&gt;The key to the appliance are the compute nodes roughly analogous to a Netezza SPU, although unlike those a compute node is simply a standard commodity server running SQL 2008. The version of 2008 on the compute node is claimed to be entirely standard - although the hardware is optimised it is only the sort of thing you can do yourself - each core having its own dedicated chunk of disk and tempdb separated out.&lt;br /&gt;&lt;br /&gt;Thomas was asked about the fact that all queries have to pass through one control node, the suspicion being that it could form a bottleneck. Thomas countered this by saying that most queries would never touch the disk of the control node and would be streamed through in-memory. Aggregations carried out on the control node would be relatively trivial as the compute nodes would pre-aggregate the data first. &lt;br /&gt;&lt;br /&gt;Thomas also suggested some ETL tips  (that work on 'normal' SQL) which I'll post later-on. There were also intriguing possibilities raised around Analysis Services using PDW in ROLAP mode - leveraging the more powerful MDX query language whilst utilising the raw performance of PDW. MS have already posited PDW as the centre of a hub-and-spoke model:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.microsoft.com/global/sqlserver/2008/en/us/PublishingImages/MadisonHubSpoke.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 597px; height: 414px;" src="http://www.microsoft.com/global/sqlserver/2008/en/us/PublishingImages/MadisonHubSpoke.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;So thats an overview of Madison/PDW - hopefully its of interest. We were told 8-9 companies have it in production and its scheduled for a first half 2010 release. After the summer we should start hearing more about customer experiences and the future roadmap. Pricing is anticipated to be cheaper than Netezza on a per-TB basis, and its likely that MS will discount the list price.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-3511054763713113119?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=3511054763713113119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3511054763713113119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3511054763713113119'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/11/sql-bits-r2-day.html' title='SQL Bits - R2 day - Parallel Data Warehouse'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-2810472708012130348</id><published>2009-11-10T22:36:00.000Z</published><updated>2010-05-29T11:55:41.323+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008 R2'/><title type='text'>November SQL Server 2008 R2 CTP out</title><content type='html'>Thanks to &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2009/11/09/fuzzy-logic-and-regex-come-to-t-sql-in-sql-server-2008-r2-available-now.aspx"&gt;Jamie&lt;/a&gt; for posting about this yesterday. The November SQL Server 2008 R2 CTP is out for TechNet and MSDN subscribers now and everbody else tomorrow. Get the bits &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/R2.aspx"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-2810472708012130348?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=2810472708012130348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2810472708012130348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2810472708012130348'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/11/november-sql-server-2008-r2-ctp-out.html' title='November SQL Server 2008 R2 CTP out'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-456795098581959198</id><published>2009-11-04T13:43:00.000Z</published><updated>2010-05-29T11:55:34.743+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008 R2'/><title type='text'>More SQL 2008 R2 news</title><content type='html'>Gemini (posted about &lt;a href="http://phil-austin.blogspot.com/2009/08/gemini-ctp.html"&gt;previously&lt;/a&gt;) has been renamed &lt;a href="http://www.powerpivot.com/"&gt;'PowerPivot'&lt;/a&gt; or more precisely 'Power Pivot for Excel 2010', continuing MS's penchant for long-winded product names. I've had a play with the CPT2 and it pretty much works as advertised - giving the ability to slice-and-dice large, disconnected, datasets with ease on modest hardware, with massive levels of data compression. There's also options to combine it with non-datawarehouse type data such as industry trends analysis or high-level reports retrieved from outside organisations in excel-ready formats. It also includes some useful GUI tricks pinched from &lt;a href="http://www.qlikview.com/"&gt;QlickView&lt;/a&gt; such as greying out slicers which have no data. Unfortunately CTP2 didn't include a connector for Analysis Services so I await that with baited breath in the November CTP.&lt;br /&gt;&lt;br /&gt;Also in the &lt;a href="http://www.reuters.com/article/pressRelease/idUS165849+03-Nov-2009+PRN20091103"&gt;news&lt;/a&gt; was the renaming of Madison (also mentioned previously) to - wait for it - &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/parallel-data-warehouse.aspx"&gt;'SQL Server 2008 R2 Parallel Data Warehouse'&lt;/a&gt; - confirmed as coming out with R2 in the first half of next year. This is great news as it answers the frequent criticism that 'SQL doesn't scale'. Not only that, but unlike many other warehouse appliance providers (such as Netezza and Teradata) you have the choice of commodity hardware from 5 different vendors, and unlike &lt;a href="http://www.google.co.uk/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;ved=0CA0QFjAA&amp;url=http%3A%2F%2Fwww.greenplum.com%2F&amp;rct=j&amp;q=greenplum&amp;ei=g4_xSujkFtTA-QalwZTlAg&amp;usg=AFQjCNFl61rWxYur5g63QmnKmmTDDQKbog"&gt;Greenplum&lt;/a&gt; (an open-source hardware-independent appliance vendor) MS is hardly a tiny company that few have heard of. More information on the sort of architecture MS propose for their Parallel Data Warehouse can be found &lt;a href="http://msdn.microsoft.com/en-us/library/dd458815.aspx"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-456795098581959198?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=456795098581959198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/456795098581959198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/456795098581959198'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/11/more-sql-2008-r2-news.html' title='More SQL 2008 R2 news'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-7082568452360925399</id><published>2009-09-03T21:46:00.000+01:00</published><updated>2009-11-09T20:22:27.576Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reporting Services'/><title type='text'>Strange Reporting Services 2008 error</title><content type='html'>Fixed a rather odd SSRS error today. A report with multiple tablix controls wouldn't render as a PDF. Looking in the ReportServer error log I saw the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;blockquote&gt;System.FormatException: Too many bytes in what should have been a 7 bit encoded Int32. &lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The issue was related to a divide-by-zero 'error' in one row in the result set from an Analysis Services cube. Analysis Services doesn't actually error in this situation but returns '1.#INF'. The HTML version of the report happily rendered 'Infinity' however the PDF renderer would appear to be using the &lt;a href="http://msdn.microsoft.com/en-us/library/system.io.binaryreader.read7bitencodedint.aspx"&gt;BinaryReader.Read7BitEncodedInt Method&lt;/a&gt; of System.IO and this obviously chokes on the string since it expects a 7-bit integer. Hence the slightly obtuse error message in the Reporting Services log above. Removing '1.#INF' is as easy as doing the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;blockquote&gt;WITH MEASURE c AS (IIF(Measures.a=0, NULL, Measures.b/Measures.a))&lt;/blockquote&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Mosha commented &lt;a href="http://sqlblog.com/blogs/mosha/archive/2005/06/30/how-to-check-if-cell-is-empty-in-mdx.aspx"&gt;here&lt;/a&gt; that he didn't see the point in removing these values. I guess he hadn't had to render PDF's using Reporting Services at the time!&lt;br /&gt;&lt;br /&gt;Update:&lt;br /&gt;&lt;br /&gt;After attempting to reproduce the error it appears that Reporting Services normally, is quite happy to render PDF's correctly, even when there are '1.#INF'-type characters in the results. This is the case even when switching from an integer-only field. So the bug is obviously much subtler than it first appeared. I'll post about this again if I figure it out...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-7082568452360925399?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=7082568452360925399' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/7082568452360925399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/7082568452360925399'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/09/strange-reporting-services-2008-error.html' title='Strange Reporting Services 2008 error'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-9163599041651193481</id><published>2009-08-25T23:00:00.000+01:00</published><updated>2009-11-03T17:03:19.584Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Madison'/><title type='text'>Madison news</title><content type='html'>More news on the next developments in SQL Server BI. Mentioned &lt;a href="http://phil-austin.blogspot.com/2009/05/kilimanjaro-now-2008-r2-and-madison-ctp.html"&gt;previously&lt;/a&gt; on this blog, Madison's progress is reported in the &lt;a href="http://blogs.technet.com/dataplatforminsider/archive/2009/08/24/microsoft-ships-the-first-technology-preview-for-project-code-named-madison.aspx"&gt;Data Platform Insider blog&lt;/a&gt;. One customer is quoted as having 20TB of data, and installations range from 8-20 nodes.&lt;br /&gt;&lt;br /&gt;Exciting times next year in the world of MS BI with the releases of Gemini, Madison and Office 2010...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-9163599041651193481?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=9163599041651193481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9163599041651193481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9163599041651193481'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/08/madison-news.html' title='Madison news'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-133637979766639453</id><published>2009-08-25T22:14:00.000+01:00</published><updated>2010-05-29T11:55:51.726+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008 R2'/><title type='text'>Gemini CTP</title><content type='html'>Not exactly news I know but the Gemini CTP (technically CTP2) is out. You have to sign up to &lt;a href="https://connect.microsoft.com/SQLServer"&gt;SQL Server Connect&lt;/a&gt; to get it (Windows Live ID required) and join the Gemini program by clicking the link at the top of the page and filling in a short questionnaire. There's also a Gemini blog &lt;a href="http://blogs.msdn.com/gemini/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Why should you be interested? Well there is a good demo - in two parts - presented by Donald Farmer on here giving an indication:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/CDqzKqNSnA4&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/CDqzKqNSnA4&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/N3l1VDOASUU&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/N3l1VDOASUU&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;20 000 000 rows in a spreadsheet being manipulated as if it was 20 000. The hardware running it? You'll have to watch to the end of the second part...&lt;br /&gt;&lt;br /&gt;Anyway as I say I've joined the CTP program so when I get the chance I'll be downloading it and giving it a whirl.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-133637979766639453?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=133637979766639453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/133637979766639453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/133637979766639453'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/08/gemini-ctp.html' title='Gemini CTP'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-8171792603394202104</id><published>2009-08-19T20:32:00.000+01:00</published><updated>2009-08-19T20:48:01.480+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VMWare'/><category scheme='http://www.blogger.com/atom/ns#' term='Networking'/><title type='text'>VMWare networking and Windows firewall</title><content type='html'>Couple of days ago a colleague and I were trying to set up 3 virtual windows 2008 servers in a domain (on VMWare's ESX as it happens). One domain controller (DC), one web and a database. Simple enough you'd think. &lt;br /&gt;&lt;br /&gt;So we had a virtual switch set up routing to the DC with DHCP running and the other two servers set to dynamically pick-up IP addresses. However try as we might we couldn't get them to 'see' the DC using ping etc, yet everything looked OK on the switch and the TCP/IP settings on the servers. So we scratched our heads for a while - and I left for a meeting saying 'its as though we have a loose bit of virtual CAT5...'. &lt;br /&gt;&lt;br /&gt;When I returned my colleague had cracked it. As you may have guessed from the title of this post it was Windows firewall all along. Turning it off on all 3 servers brought the network into life. Bit of a forehead-slapping 'doh' moment...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-8171792603394202104?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=8171792603394202104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8171792603394202104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8171792603394202104'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/08/vmware-networking-and-windows-firewall.html' title='VMWare networking and Windows firewall'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-6086851216630530436</id><published>2009-05-30T20:04:00.000+01:00</published><updated>2009-07-10T12:02:17.051+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Jobs'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2000'/><title type='text'>SQL Agent job schedules</title><content type='html'>Last week I found myself reviewing a SQL Server (2000 vintage no less!). As part of the review I was asked to document the Agent jobs - when they ran, how long for etc, etc. Unfortunately there were well over 100 of them. Clearly a query was called for - and to save me from having to repeat the exercise I'll reproduce it here:&lt;br /&gt;&lt;br /&gt;This is the 2000 version:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;select  j.name, &lt;br /&gt; case freq_type when 1 then 'Once' &lt;br /&gt;   when 4 then 'Daily'&lt;br /&gt;   when 8 then 'Weekly'&lt;br /&gt;   when 16 then 'Monthly'&lt;br /&gt;   when 32 then 'Monthly Relative'&lt;br /&gt;   else 'On start' end as TypeOfFrequency,&lt;br /&gt; case freq_type when 1 then 'Once' &lt;br /&gt;   when 4 then 'Daily'&lt;br /&gt;   when 8 then 'Weekly'&lt;br /&gt;   when 16 then 'Monthly'&lt;br /&gt;   when 32 then 'Monthly Relative'&lt;br /&gt;   else 'On start' end,&lt;br /&gt; case   when freq_type=4 then&lt;br /&gt;    case when freq_interval=1 then 'Every day' &lt;br /&gt;      else 'Every '+cast(freq_interval as varchar(2))+' days' end&lt;br /&gt;   when freq_type=8 then 'Every '+&lt;br /&gt;     left(&lt;br /&gt;     case when 1|freq_interval=freq_interval then 'Sunday, ' else '' end&lt;br /&gt;    +case when 2|freq_interval=freq_interval then 'Monday, ' else '' end&lt;br /&gt;    +case when 4|freq_interval=freq_interval then 'Tuesday, ' else '' end&lt;br /&gt;    +case when 8|freq_interval=freq_interval then 'Wednesday, ' else '' end&lt;br /&gt;    +case when 16|freq_interval=freq_interval then 'Thursday, ' else '' end&lt;br /&gt;    +case when 32|freq_interval=freq_interval then 'Friday, ' else '' end&lt;br /&gt;    +case when 64|freq_interval=freq_interval then 'Saturday,' else '' end, &lt;br /&gt;    len(case when 1|freq_interval=freq_interval then 'Sunday, ' else '' end&lt;br /&gt;    +case when 2|freq_interval=freq_interval then 'Monday, ' else '' end&lt;br /&gt;    +case when 4|freq_interval=freq_interval then 'Tuesday, ' else '' end&lt;br /&gt;    +case when 8|freq_interval=freq_interval then 'Wednesday, ' else '' end&lt;br /&gt;    +case when 16|freq_interval=freq_interval then 'Thursday, ' else '' end&lt;br /&gt;    +case when 32|freq_interval=freq_interval then 'Friday, ' else '' end&lt;br /&gt;    +case when 64|freq_interval=freq_interval then 'Saturday,' else '' end)-1) &lt;br /&gt;   when freq_type=16 then 'On day '+cast(freq_interval as varchar(2))+' of the month'&lt;br /&gt;   else 'The '+&lt;br /&gt;    case freq_relative_interval  when 1 then 'first ' &lt;br /&gt;        when 2 then 'second ' &lt;br /&gt;        when 4 then 'third ' &lt;br /&gt;        when 8 then 'forth ' &lt;br /&gt;        else 'last ' end&lt;br /&gt;      +'day of the month'      &lt;br /&gt; end,&lt;br /&gt; case freq_subday_type  when 1 &lt;br /&gt;       then 'At ' + reverse(left(reverse(next_run_time), 2)+':'&lt;br /&gt;            + substring(reverse(next_run_time), 3, 2)+':'&lt;br /&gt;            + substring(reverse(next_run_time), 5, 2)) &lt;br /&gt;&lt;br /&gt;    when 2 then 'Every '+cast(freq_subday_interval as varchar(1000))+' seconds'&lt;br /&gt;    when 4 then 'Every '+cast(freq_subday_interval as varchar(1000))+' mins'&lt;br /&gt;    else 'Every ' +cast(freq_subday_interval as varchar(1000))+' hours'&lt;br /&gt; end as 'Daily execution (hhmmss)',&lt;br /&gt; avg(run_duration) AvgDuration,&lt;br /&gt; min(run_duration) MinDuration,&lt;br /&gt; max(run_duration) MaxDuration,&lt;br /&gt; count(*)&lt;br /&gt;from sysjobs j&lt;br /&gt;inner join sysjobhistory h on j.job_id=h.job_id&lt;br /&gt;inner join sysjobschedules s on j.job_id=s.job_id&lt;br /&gt;group by &lt;br /&gt; j.name, &lt;br /&gt; case freq_type when 1 then 'Once' &lt;br /&gt;   when 4 then 'Daily'&lt;br /&gt;   when 8 then 'Weekly'&lt;br /&gt;   when 16 then 'Monthly'&lt;br /&gt;   when 32 then 'Monthly Relative'&lt;br /&gt;   else 'On start' end,&lt;br /&gt; case   when freq_type=4 then&lt;br /&gt;    case  when freq_interval=1 then 'Every day' else 'Every '+cast(freq_interval as varchar(2))+' days' end&lt;br /&gt;   when freq_type=8 then 'Every '+&lt;br /&gt;     left(case when 1|freq_interval=freq_interval then 'Sunday, ' else '' end&lt;br /&gt;    +case when 2|freq_interval=freq_interval then 'Monday, ' else '' end&lt;br /&gt;    +case when 4|freq_interval=freq_interval then 'Tuesday, ' else '' end&lt;br /&gt;    +case when 8|freq_interval=freq_interval then 'Wednesday, ' else '' end&lt;br /&gt;    +case when 16|freq_interval=freq_interval then 'Thursday, ' else '' end&lt;br /&gt;    +case when 32|freq_interval=freq_interval then 'Friday, ' else '' end&lt;br /&gt;    +case when 64|freq_interval=freq_interval then 'Saturday,' else '' end,&lt;br /&gt;    len(case when 1|freq_interval=freq_interval then 'Sunday, ' else '' end&lt;br /&gt;    +case when 2|freq_interval=freq_interval then 'Monday, ' else '' end&lt;br /&gt;    +case when 4|freq_interval=freq_interval then 'Tuesday, ' else '' end&lt;br /&gt;    +case when 8|freq_interval=freq_interval then 'Wednesday, ' else '' end&lt;br /&gt;    +case when 16|freq_interval=freq_interval then 'Thursday, ' else '' end&lt;br /&gt;    +case when 32|freq_interval=freq_interval then 'Friday, ' else '' end&lt;br /&gt;    +case when 64|freq_interval=freq_interval then 'Saturday,' else '' end)-1) &lt;br /&gt;   when freq_type=16 then 'On day '+cast(freq_interval as varchar(2))+' of the month'&lt;br /&gt;   else 'The '+&lt;br /&gt;    case freq_relative_interval  when 1 then 'first ' &lt;br /&gt;        when 2 then 'second ' &lt;br /&gt;        when 4 then 'third ' &lt;br /&gt;        when 8 then 'forth ' &lt;br /&gt;        else 'last ' end&lt;br /&gt;      +'day of the month'      &lt;br /&gt; end,&lt;br /&gt; case freq_subday_type  when 1 then 'At ' + reverse(left(reverse(next_run_time), 2)+':'&lt;br /&gt;             + substring(reverse(next_run_time), 3, 2)+':'&lt;br /&gt;             + substring(reverse(next_run_time), 5, 2))&lt;br /&gt;    when 2 then 'Every '+cast(freq_subday_interval as varchar(1000))+' seconds'&lt;br /&gt;    when 4 then 'Every '+cast(freq_subday_interval as varchar(1000))+' mins'&lt;br /&gt;    else 'Every ' +cast(freq_subday_interval as varchar(1000))+' hours'&lt;br /&gt; end&lt;br /&gt;&lt;br /&gt;order by j.name&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Nasty huh! Not sure why bitmask values are being used where they aren't combined (ie freq_relative_interval) but anyway... Note also the smart-alec use of the bitwise OR operator to get the days of the week.&lt;br /&gt;&lt;br /&gt;This is the 2005/8 version. Note that since you can now have multiple schedules per job, you might get multiple rows per job - hence the use of 'ScheduleName':&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;select j.name,&lt;br /&gt;s.name as ScheduleName,&lt;br /&gt;case freq_type when 1 then 'Once'&lt;br /&gt;when 4 then 'Daily'&lt;br /&gt;when 8 then 'Weekly'&lt;br /&gt;when 16 then 'Monthly'&lt;br /&gt;when 32 then 'Monthly Relative'&lt;br /&gt;else 'On start' end as TypeOfFrequency,&lt;br /&gt;case when freq_type=4 then&lt;br /&gt;case when freq_interval=1 then 'Every day' else 'Every '+cast(freq_interval as varchar(2))+' days' end&lt;br /&gt;when freq_type=8 then 'Every '+&lt;br /&gt;left(&lt;br /&gt;case when 1|freq_interval=freq_interval then 'Sunday, ' else '' end&lt;br /&gt;+case when 2|freq_interval=freq_interval then 'Monday, ' else '' end&lt;br /&gt;+case when 4|freq_interval=freq_interval then 'Tuesday, ' else '' end&lt;br /&gt;+case when 8|freq_interval=freq_interval then 'Wednesday, ' else '' end&lt;br /&gt;+case when 16|freq_interval=freq_interval then 'Thursday, ' else '' end&lt;br /&gt;+case when 32|freq_interval=freq_interval then 'Friday, ' else '' end&lt;br /&gt;+case when 64|freq_interval=freq_interval then 'Saturday,' else '' end,&lt;br /&gt;len(case when 1|freq_interval=freq_interval then 'Sunday, ' else '' end&lt;br /&gt;+case when 2|freq_interval=freq_interval then 'Monday, ' else '' end&lt;br /&gt;+case when 4|freq_interval=freq_interval then 'Tuesday, ' else '' end&lt;br /&gt;+case when 8|freq_interval=freq_interval then 'Wednesday, ' else '' end&lt;br /&gt;+case when 16|freq_interval=freq_interval then 'Thursday, ' else '' end&lt;br /&gt;+case when 32|freq_interval=freq_interval then 'Friday, ' else '' end&lt;br /&gt;+case when 64|freq_interval=freq_interval then 'Saturday,' else '' end)-1)&lt;br /&gt;when freq_type=16 then 'On day '+cast(freq_interval as varchar(2))+' of the month'&lt;br /&gt;else 'The '+&lt;br /&gt;case freq_relative_interval when 1 then 'first '&lt;br /&gt;when 2 then 'second '&lt;br /&gt;when 4 then 'third '&lt;br /&gt;when 8 then 'forth '&lt;br /&gt;else 'last ' end&lt;br /&gt;+'day of the month'&lt;br /&gt;end as Interval,&lt;br /&gt;case freq_subday_type when 1 then 'At ' + reverse(left(stuff('000000', 6-len(cast(active_start_time as varchar(6))), len(cast(active_start_time as varchar(6))), cast(active_start_time as varchar(6))), 2))+':'+&lt;br /&gt;substring(reverse(stuff('000000', 6-len(cast(active_start_time as varchar(6))), len(cast(active_start_time as varchar(6))), cast(active_start_time as varchar(6)))), 3, 2)+':'+&lt;br /&gt;substring(reverse(stuff('000000', 6-len(cast(active_start_time as varchar(6))), len(cast(active_start_time as varchar(6))), cast(active_start_time as varchar(6)))), 1, 2)&lt;br /&gt;when 2 then 'Every '+cast(freq_subday_interval as varchar(1000))+' seconds'&lt;br /&gt;when 4 then 'Every '+cast(freq_subday_interval as varchar(1000))+' mins'&lt;br /&gt;else 'Every ' +cast(freq_subday_interval as varchar(1000))+' hours'&lt;br /&gt;end as 'Daily execution (hhmmss)',&lt;br /&gt;avg(run_duration) AvgDuration,&lt;br /&gt;min(run_duration) MinDuration,&lt;br /&gt;max(run_duration) MaxDuration&lt;br /&gt;&lt;br /&gt;from sysjobs j&lt;br /&gt;left outer join sysjobhistory h on j.job_id=h.job_id&lt;br /&gt;left outer join sysjobschedules js on j.job_id=js.job_id&lt;br /&gt;left outer join dbo.sysschedules s on js.schedule_id=s.schedule_id&lt;br /&gt;group by&lt;br /&gt;j.name,&lt;br /&gt;s.name,&lt;br /&gt;case freq_type when 1 then 'Once'&lt;br /&gt;when 4 then 'Daily'&lt;br /&gt;when 8 then 'Weekly'&lt;br /&gt;when 16 then 'Monthly'&lt;br /&gt;when 32 then 'Monthly Relative'&lt;br /&gt;else 'On start' end,&lt;br /&gt;case when freq_type=4 then&lt;br /&gt;case when freq_interval=1 then 'Every day' else 'Every '+cast(freq_interval as varchar(2))+' days' end&lt;br /&gt;when freq_type=8 then 'Every '+&lt;br /&gt;left(case when 1|freq_interval=freq_interval then 'Sunday, ' else '' end&lt;br /&gt;+case when 2|freq_interval=freq_interval then 'Monday, ' else '' end&lt;br /&gt;+case when 4|freq_interval=freq_interval then 'Tuesday, ' else '' end&lt;br /&gt;+case when 8|freq_interval=freq_interval then 'Wednesday, ' else '' end&lt;br /&gt;+case when 16|freq_interval=freq_interval then 'Thursday, ' else '' end&lt;br /&gt;+case when 32|freq_interval=freq_interval then 'Friday, ' else '' end&lt;br /&gt;+case when 64|freq_interval=freq_interval then 'Saturday,' else '' end,&lt;br /&gt;len(case when 1|freq_interval=freq_interval then 'Sunday, ' else '' end&lt;br /&gt;+case when 2|freq_interval=freq_interval then 'Monday, ' else '' end&lt;br /&gt;+case when 4|freq_interval=freq_interval then 'Tuesday, ' else '' end&lt;br /&gt;+case when 8|freq_interval=freq_interval then 'Wednesday, ' else '' end&lt;br /&gt;+case when 16|freq_interval=freq_interval then 'Thursday, ' else '' end&lt;br /&gt;+case when 32|freq_interval=freq_interval then 'Friday, ' else '' end&lt;br /&gt;+case when 64|freq_interval=freq_interval then 'Saturday,' else '' end)-1)&lt;br /&gt;when freq_type=16 then 'On day '+cast(freq_interval as varchar(2))+' of the month'&lt;br /&gt;else 'The '+&lt;br /&gt;case freq_relative_interval when 1 then 'first '&lt;br /&gt;when 2 then 'second '&lt;br /&gt;when 4 then 'third '&lt;br /&gt;when 8 then 'forth '&lt;br /&gt;else 'last ' end&lt;br /&gt;+'day of the month'&lt;br /&gt;end,&lt;br /&gt;&lt;br /&gt;case freq_subday_type when 1 then 'At ' + reverse(left(stuff('000000', 6-len(cast(active_start_time as varchar(6))), len(cast(active_start_time as varchar(6))), cast(active_start_time as varchar(6))), 2))+':'+&lt;br /&gt;substring(reverse(stuff('000000', 6-len(cast(active_start_time as varchar(6))), len(cast(active_start_time as varchar(6))), cast(active_start_time as varchar(6)))), 3, 2)+':'+&lt;br /&gt;substring(reverse(stuff('000000', 6-len(cast(active_start_time as varchar(6))), len(cast(active_start_time as varchar(6))), cast(active_start_time as varchar(6)))), 1, 2)&lt;br /&gt;when 2 then 'Every '+cast(freq_subday_interval as varchar(1000))+' seconds'&lt;br /&gt;when 4 then 'Every '+cast(freq_subday_interval as varchar(1000))+' mins'&lt;br /&gt;else 'Every ' +cast(freq_subday_interval as varchar(1000))+' hours'&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;order by j.name &lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-6086851216630530436?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=6086851216630530436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6086851216630530436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6086851216630530436'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/05/sql-agent-job-schedules.html' title='SQL Agent job schedules'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-1620200011130294196</id><published>2009-05-17T19:52:00.000+01:00</published><updated>2009-07-10T12:05:00.030+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>Kilimanjaro now 2008 R2 and Madison CTP out in July</title><content type='html'>Kilimanjaro, &lt;a href="http://blogs.zdnet.com/microsoft/?p=1621"&gt;previously the code name of the next release of SQL Server&lt;/a&gt; is now &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/r2.aspx#new"&gt;SQL Server 2008 R2&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The list of features is pretty long for an 'R2' - the link above provides the full details, but as a hopelessly biased BI chap, the most interesting one for me is the technology previously known as &lt;a href="http://www.microsoft-watch.com/content/business_applications/microsoft_bi_gemini_lands_at_kilimanjaro.html"&gt;Gemini&lt;/a&gt;. This is MS's answer to the column-orientated 'in-memory' analysis engines of vendors such as &lt;a href="http://www.qlikview.com/"&gt;QlikTech&lt;/a&gt;. The ability to be able to provide users with an ability to analyse millions of rows of data through Excel at 'lightening fast speeds' without needing to create cubes, write MDX etc is an interesting one, to say the least. No confirmed date for this but &lt;a href="http://blogs.zdnet.com/microsoft/?p=2754"&gt;Mary-Jo Foley reckons it will be July&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For me though the most exciting announcement is that a Madison CTP is also planned for July. The lack of a compelling scalability story has always been a bit of a chink in SQL Server's armour, particularly when compared to vendors such as &lt;a href="www.teradata.com"&gt;Teradata&lt;/a&gt; and &lt;a href="www.netezza.com"&gt;Netezza&lt;/a&gt;, and I will be all over this when it comes out.&lt;br /&gt;&lt;br /&gt;What both of these announcements show is that SQL Server is forging ahead, addressing weaker product areas and - providing the CTP's ship on time - on schedule.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-1620200011130294196?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=1620200011130294196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1620200011130294196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1620200011130294196'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/05/kilimanjaro-now-2008-r2-and-madison-ctp.html' title='Kilimanjaro now 2008 R2 and Madison CTP out in July'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-6650816605796186462</id><published>2009-03-29T19:15:00.000+01:00</published><updated>2009-07-10T12:03:05.274+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><title type='text'>Microsoft Connectors for Oracle and Teradata by Attunity</title><content type='html'>Thanks to &lt;a href="http://blogs.msdn.com/euanga/archive/2008/10/05/high-performance-loading-in-ssis-for-oracle-and-teradata.aspx"&gt;Euan Garden&lt;/a&gt; for mentioning that MS have licensed Attunity's Oracle and Teradata 'Connect adapters' (ie database providers) for use with SSIS 2008 (Attunity press release &lt;a href="http://www.attunity.com/press_releases.aspx?newsId=1128"&gt;here&lt;/a&gt;). &lt;br /&gt;&lt;br /&gt;I've known about Attunity's providers for a while, but the licensing deal is great news, because paying for database providers is a difficult case to make. Anyone using Oracle for a source or destination in a SSIS package should investigate using these since, as I have posted &lt;a href="http://phil-austin.blogspot.com/2008/08/ssis-and-oracle-providers-another.html"&gt;before&lt;/a&gt;, there are a number of bugs with Oracle providers. I've yet to try the Attunity providers myself so I'll post again when I've tried them out. However, its hard to see they could be any worse than Oracle's.&lt;br /&gt;&lt;br /&gt;Anyway you can download them &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=d9cb21fe-32e9-4d34-a381-6f9231d84f1e&amp;displaylang=en"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-6650816605796186462?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=6650816605796186462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6650816605796186462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6650816605796186462'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/03/microsoft-connectors-for-oracle-and.html' title='Microsoft Connectors for Oracle and Teradata by Attunity'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-3532080043776515782</id><published>2009-02-26T17:27:00.000Z</published><updated>2009-07-10T12:04:11.223+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reporting Services'/><title type='text'>Deploying Reporting Services programmatically - shared data sources</title><content type='html'>Hello again! After a longish hiatus I'm back posting fairly useful stuff - so I don't lose/forget/have to do it again in another job. &lt;br /&gt;&lt;br /&gt;The first useful snippet covers deploying Reporting Services reports using the &lt;a href="http://msdn.microsoft.com/en-us/library/ms162839.aspx"&gt;rs utility&lt;/a&gt; on the command line. This will be necessary in situations where you can't deploy directly from BIDS - which to my mind isn't good practice when you are outside of the development environment. Although there are various examples of doing this there aren't many using VB.NET (which you have to use with rs) and none covering my requirements.&lt;br /&gt;&lt;br /&gt;As you may know when using the rs utility to deploy (technically create) reports on a Report Server it does not maintain references to shared data sources even when they exist in the same relative position given in the Reporting Services project. This means you have the tricky job of adding those references programatically after using &lt;a href="http://msdn.microsoft.com/en-us/library/aa225813(SQL.80).aspx"&gt;CreateReport&lt;/a&gt; to create the reports. &lt;br /&gt;&lt;br /&gt;Tricky? Well it is if your reports have multiple different data sources. If you try adding a data source to a report that doesn't know about that data source (ie hasn't got a reference to it in the .rdl) you will get an &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/dc333c06-9570-4a9d-a69c-266098d5fcaa/"&gt;error&lt;/a&gt;. Therefore you have to work out what data sources that report has a reference to and relate those references to the shared data sources with the same name elsewhere in Reporting Services. A complicating factor is that you can't (or at least I couldn't) simply map the data sources obtained from the report to the shared data source location. Which is way I ended up looping around the datasources retrieved from the report definition in the code below. Anyway it works and that's good enough for me...&lt;br /&gt;&lt;br /&gt;In order to use the example create an empty .rss file in Notepad and copy and paste the following code and save it as UpdateDataSources.rss. &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Public Sub Main()&lt;br /&gt;&lt;br /&gt;      rs.Credentials = System.Net.CredentialCache.DefaultCredentials&lt;br /&gt;         &lt;br /&gt;      Dim item as CatalogItem&lt;br /&gt;      Dim items as CatalogItem()&lt;br /&gt;      &lt;br /&gt;      Try      &lt;br /&gt;        items=rs.ListChildren(ReportFolder, False)  &lt;br /&gt;            &lt;br /&gt;  For Each item in items&lt;br /&gt;&lt;br /&gt;   If item.Type = 2 'ie Report&lt;br /&gt;&lt;br /&gt;    Dim dataSources() as DataSource = rs.GetItemDataSources(item.Path)&lt;br /&gt;  &lt;br /&gt;    For Each ds as DataSource in dataSources&lt;br /&gt;  &lt;br /&gt;     Dim sharedDs(0) as DataSource&lt;br /&gt;     sharedDs(0)=GetDataSource(SharedDataSourceFolder, ds.Name)&lt;br /&gt;&lt;br /&gt;     rs.SetItemDataSources(item.Path, sharedDs)&lt;br /&gt;    Console.WriteLine("Set " &amp; ds.Name &amp; " datasource for " &amp; item.Path &amp; " report")&lt;br /&gt;  &lt;br /&gt;    Next       &lt;br /&gt;&lt;br /&gt;  end if&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;      Next&lt;br /&gt;      &lt;br /&gt;      Console.WriteLine("Shared data source reference set for {0} reports.", ReportFolder)&lt;br /&gt;&lt;br /&gt;      Catch e As SoapException&lt;br /&gt;         Console.WriteLine(e.Detail.InnerXml.ToString())&lt;br /&gt;      End Try&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Function GetDataSource(sharedDataSourcePath as string, dataSourceName as String) as DataSource&lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;      Dim reference As New DataSourceReference()&lt;br /&gt;      Dim ds As New DataSource&lt;br /&gt;      &lt;br /&gt;      reference.Reference = sharedDataSourcePath &amp; "/" &amp; dataSourceName&lt;br /&gt;      ds.Item = CType(reference, DataSourceDefinitionOrReference)&lt;br /&gt;&lt;br /&gt;      ds.Name = dataSourceName&lt;br /&gt;&lt;br /&gt;      GetDataSource=ds&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;End Function&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Use it with rs on the command-line as follows: &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;rs -i UpdateDataSources.rss -v ReportFolder=[&lt;span style="font-style:italic;"&gt;Folder Location containing the reports to be updated&lt;/span&gt;] -v SharedDataSourceFolder=[&lt;span style="font-style:italic;"&gt;Folder location containing the shared data sources&lt;/span&gt;].&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-3532080043776515782?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=3532080043776515782' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3532080043776515782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3532080043776515782'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2009/02/deploying-reporting-services.html' title='Deploying Reporting Services programmatically - shared data sources'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-9151612471364535737</id><published>2008-11-18T15:41:00.000Z</published><updated>2009-07-10T12:03:36.819+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Conferences'/><title type='text'>SQL Bits III video session on Data Vizualisation</title><content type='html'>Interesting video &lt;a href="http://www.sqlbits.com/Agenda/event3/Data_Vizualisation_-_Make_your_reports_useful_to_business_-_No_more__Speed_Dials__/default.aspx"&gt;here&lt;/a&gt; ('web cast' maybe? What's the difference?)  about visualising data - focusing on tables, graphs and dashboards. If you don't know what a 'bullet graph', or a 'sparkline' is then this is for you. Most of it is non-product specific as well. &lt;br /&gt;&lt;br /&gt;May sound a bit dry but this is one area of BI you can't ignore and can result in all of the behind-the-scenes effort going to waste.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-9151612471364535737?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=9151612471364535737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9151612471364535737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9151612471364535737'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/11/sql-bits-iii-video-session-on-data.html' title='SQL Bits III video session on Data Vizualisation'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-9058705701892125484</id><published>2008-11-01T19:11:00.000Z</published><updated>2009-07-10T12:03:05.275+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><title type='text'>Child vs Parent Package Configurations contd..</title><content type='html'>Not so much a Part 2 (I will get round to it honest..) but a real-world example of the advantage of parent configurations. My current project involves migrating data for a major Norwegian bank, and needless to say we are using a parent package to set the configuration of the child packages actually doing the migration.&lt;br /&gt;&lt;br /&gt;As often happens in IT projects we weren't in posession of all of the requirements before we started development. One of the requested changes was significant. The client wanted to use multiple target environments for each release. In other words, our migration server would need to migrate data into &lt;span style="font-style: italic;"&gt;n &lt;/span&gt;target servers. However, we had baked the target connection string into a database table, which was read by the parent package, so we would have to update the database table every time we wanted to migrate to a different target. I felt this would be a cumbersome and risky operation at runtime. Not only could the connection string be incorrectly updated but we ran the risk of updating the wrong configuration or even wiping out all the configurations. On top of that, there was the possibility that the client might be making the changes themselves. Therefore I thought a change to our package config was required.&lt;br /&gt;&lt;br /&gt;The option that seemed most sensible in the circumstances was to allow the target to be set at runtime on the command-line. We were using &lt;a href="http://msdn.microsoft.com/en-us/library/ms162810.aspx"&gt;dtexec&lt;/a&gt; to run the migration anyway and using the /SET parameter you can set package properties including package variables (you should always set properties through variables as this insulates yourself against changes to packages).&lt;br /&gt;&lt;br /&gt;What has all this got to do with child vs parent package configurations? Well, to make this change for us was simple - we only had to change the parent package and delete the configuration from the database table. If we had been configuring child packages directly we would have had to change every child package using that configuration. As we were doing lookups against the target server this would have been most of the child packages. As the project stands that would have been 3 packages - but had we decided to this in a months time it would probably be 6-8. With that many to do there would have been quite an impact on the project.&lt;br /&gt;&lt;br /&gt;Therefore be aware that the most unlikely changes can be requested sometimes, and therefore its almost always best to try and anticipate these changes in your configuration design. Particularly when the costs of such a design are (in my view at least) relatively trivial.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-9058705701892125484?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=9058705701892125484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9058705701892125484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9058705701892125484'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/11/child-vs-parent-package-configurations.html' title='Child vs Parent Package Configurations contd..'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-546891192537134465</id><published>2008-08-30T08:09:00.000+01:00</published><updated>2008-09-01T18:11:21.313+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><title type='text'>Child vs Parent Package Configurations Part 1</title><content type='html'>One of my colleagues - Sam Loud - prompted a &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2008/08/29/ssis-parent-package-configurations-yay-or-nay.aspx"&gt;mention&lt;/a&gt; from the venerable Jamie Thompson on the thorny subject of SSIS configuration (in fact he starts with the problems with logging configuration - something I've also encountered, but the subject for another post I think). In fact we were debating it in the office that very day .&lt;br /&gt;&lt;br /&gt;Sam's beef with parent package configurations is that it makes the development of child packages more onerous. This is due to the inability of child packages to use master configurations at run-time, unlike a direct configuration to a config file or database table which the child package can use. An example of this follows:&lt;br /&gt;&lt;br /&gt;Firstly create a new SSIS project in BIDS/Visual Studio and create two packages - 'Parent' and 'Child':&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_bbIj0pCkO7c/SLkBRVV5O1I/AAAAAAAAAA0/G94m-gvZQ4Q/s1600-h/ParentChild1.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5240221038720662354" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_bbIj0pCkO7c/SLkBRVV5O1I/AAAAAAAAAA0/G94m-gvZQ4Q/s320/ParentChild1.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We'll create a very simple child package to read the @@VERSION variable in SQL:&lt;br /&gt;&lt;br /&gt;Add a connection manager to the package pointing to the master database on a convenient server (in this case my local machine):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_bbIj0pCkO7c/SLkCdQqZx2I/AAAAAAAAAA8/ze2hQgoT_0I/s1600-h/ParentChild2.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5240222343134562146" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_bbIj0pCkO7c/SLkCdQqZx2I/AAAAAAAAAA8/ze2hQgoT_0I/s320/ParentChild2.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Add an Execute SQL Task selecting the connection manager created above and type "SELECT @@VERSION" as the SQLStatement property:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_bbIj0pCkO7c/SLwe5nSG7DI/AAAAAAAAABE/6lHT1hUE3-w/s1600-h/ParentChild3.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5241098041498725426" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_bbIj0pCkO7c/SLwe5nSG7DI/AAAAAAAAABE/6lHT1hUE3-w/s320/ParentChild3.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Create a package variable with a 'Child' scope called 'ConnString', and set the connection manager to use the variable through the Property Expressions Editor:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_bbIj0pCkO7c/SLwf7sU50eI/AAAAAAAAABU/E2Tb6vDRer0/s1600-h/ParentChild5.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5241099176723993058" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_bbIj0pCkO7c/SLwf7sU50eI/AAAAAAAAABU/E2Tb6vDRer0/s320/ParentChild5.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You'll note at this point that you need to type the connection string into the variable to get the package to work. This of course is what Sam is complaining about having to do with Master configurations. However the advantage becomes clearer when adding a second child package.&lt;br /&gt;&lt;br /&gt;Finally create a simple configuration using an XML file to set the ConnString variable value:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_bbIj0pCkO7c/SLwf7zGHaSI/AAAAAAAAABc/ddEbTv-zMk4/s1600-h/ParentChild6.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5241099178541017378" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_bbIj0pCkO7c/SLwf7zGHaSI/AAAAAAAAABc/ddEbTv-zMk4/s320/ParentChild6.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Executing the package should result in success. This is an example of a direct child configuration. Adding a second child package - Child2 - running through the same steps as for Child you can skip the step typing the connection string into the variable - simply add the variable and the configuration (remembering to click 'Reuse' when prompted). You should be able to execute Child2 successfully with the package picking the connection string up from the config file.&lt;br /&gt;&lt;br /&gt;Now for the Parent configuration:&lt;br /&gt;&lt;br /&gt;In the Parent package create a variable called 'ConnString' with Parent scope and use the XML configuration created for the Child.dtsx package. Create a File Connection Manager, selecting 'Existing file' in the drop-down and the file location of Child.dtsx (I'm not using MSDB for this example though this might be advisable in practice). Add a Execute Package task using the File Connection Manager created earlier.&lt;br /&gt;&lt;br /&gt;Switch to the Child.dtsx package and remove the file configuration created earlier and create a 'Parent package variable' configuration adding 'ConnString' as the Parent variable:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_bbIj0pCkO7c/SLwf72BaRqI/AAAAAAAAABk/_j1LVw-bYbE/s1600-h/ParentChild7.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5241099179326588578" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_bbIj0pCkO7c/SLwf72BaRqI/AAAAAAAAABk/_j1LVw-bYbE/s320/ParentChild7.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You should be able to execute the Parent package and see BIDS switch to the Child.dtsx package and execute that in turn.&lt;br /&gt;&lt;br /&gt;But what happens when you replace the file configuration in Child2.dtsx, with Parent package variable and try and execute it by itself? It will fail - as the ConnString variable in Child2.dtsx is blank and it will not 'look-up' the variable in Parent.dtsx. To get it to work you need to manually type the connection string into the ConnString variable. This is the crux of Sam's complaint. Using parent configuration means typing the connection string every time you create a package rather than just the once. There are associated disadvantages in that you can't test the development configuration until the parent package is run and so on.&lt;br /&gt;&lt;br /&gt;The advantages of parent package configuration relate to larger, more complex projects:&lt;br /&gt;&lt;br /&gt;1. Configuration is centralised and 'hidden' from child packages:&lt;br /&gt;&lt;br /&gt;This makes changing the configuration (from database to environment variable for example)infinitely easier if you have a large number of packages. This might be an issue you can't control the environment your packages are running on, or you have multiple different possible environments to target.&lt;br /&gt;&lt;br /&gt;2. Development amongst multiple developers without direct configuration is easier:&lt;br /&gt;&lt;br /&gt;In my experience when developing packages in a team of 3 or more people direct configurations can become a pain. This is unless everyone has their machine set up exactly the same way. I've often found myself disabling the direct configurations in order to get a package to use a different database (local rather than server-based for example) or filepath to the one specified in the configuration. Using parent configurations leaves you as a developer free to set the variables as you please.&lt;br /&gt;&lt;br /&gt;So in conclusion - because this post has gone on long enough - use child packages with direct configuration when the project is small, the environments you're using are well-defined and the number of packages are low - probably no more than 6-8. Otherwise the safest course of action is parent configuration.&lt;br /&gt;&lt;br /&gt;In a future post I'll look at the possible solutions and/or work-arounds for working with parent configurations without typing configuration in for every package.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-546891192537134465?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=546891192537134465' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/546891192537134465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/546891192537134465'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/08/child-vs-parent-package-configurations.html' title='Child vs Parent Package Configurations Part 1'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_bbIj0pCkO7c/SLkBRVV5O1I/AAAAAAAAAA0/G94m-gvZQ4Q/s72-c/ParentChild1.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-9003217669327800682</id><published>2008-08-07T16:54:00.000+01:00</published><updated>2009-07-20T09:28:53.897+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>SSIS and Oracle providers - another warning</title><content type='html'>As you may have gathered I'm working with Oracle and SSIS a lot at the moment - and here's another gotcha with it:&lt;br /&gt;&lt;br /&gt;Colleagues finalising a release encountered this error when testing SSIS packages on a 64-bit version of Windows 2003 R2:&lt;br /&gt;&lt;blockquote&gt;ORA-06413: Connection not open&lt;/blockquote&gt;This is discussed at length in &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=159581&amp;SiteID=1"&gt;this MSDN thread&lt;/a&gt; amongst others.&lt;br /&gt;&lt;br /&gt;The upshot is that the Oracle provider can't cope with parentheses (ie brackets) in the filepath of programs connecting to Oracle using the provider. Yes - you read that right. &lt;br /&gt;&lt;br /&gt;Those of you who know anything about Windows running on X64 architecture know that 32-bit applications are stored under a seperate programs folder ie:&lt;blockquote&gt;c:\Program Files (x86)\&lt;/blockquote&gt; The sorts of programs that live under this folder are Business Intelligence Development Studio (ie BIDS) which is 32-bit only, and the 32-bit version of DTExec.exe - which executes SSIS packages. So you can see the problem; any SSIS package that uses the Oracle provider and runs in a 32-bit context will error.&lt;br /&gt;&lt;br /&gt;Fine you might say, don't run it under a 32-bit context then. Unfortunately if you're having to extract data from Excel (as we are) you have to - there is no 64-bit provider for Excel. Happily there is a fix and a workaround. The bug fix is patch number 5059238 available from Oracles &lt;a href="https://metalink.oracle.com/"&gt;MetaLink site&lt;/a&gt;. However you need a 'Support Identifier' which we haven't got hold of yet. I'll edit this post if we (or when) we try this fix.&lt;br /&gt;&lt;br /&gt;The work-around is simply to avoid using parentheses when calling executables. The way this is done is by using the old-school MS-DOS short-name for the file path. Hence &lt;br /&gt;&lt;blockquote&gt;c:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\DTExec.exe&lt;/blockquote&gt;becomes&lt;blockquote&gt;C:\Progra~2\Microsoft SQL Server\90\DTS\Binn\DTExec.exe&lt;/blockquote&gt;This avoids having a parenthesis in the file-path and therefore the Oracle provider won't error. In fact you can launch BIDS/Visual Studio from the command-line in a similar way - so you can check the connection managers work:&lt;blockquote&gt;C:\Progra~2\Microsoft Visual Studio 8\Common7\IDE\devenv.exe&lt;/blockquote&gt;So to top this post off here is an example of a command-line that will run an SSIS package using the Oracle provider under a 32-bit context on a 64-bit server:&lt;blockquote&gt;"C:\Progra~2\Microsoft SQL Server\90\DTS\Binn\DTExec.exe” /DTS "\MSDB\[Package Name]" /SERVER [Server Name]&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-9003217669327800682?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=9003217669327800682' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9003217669327800682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9003217669327800682'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/08/ssis-and-oracle-providers-another.html' title='SSIS and Oracle providers - another warning'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-1289467222521771784</id><published>2008-08-05T12:42:00.000+01:00</published><updated>2008-08-05T12:48:25.619+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>More on Oracle connectors</title><content type='html'>A useful wiki &lt;a href="http://ssis.wik.is"&gt;here&lt;/a&gt; containing a plethora of info on SSIS connectivitity. There is a table &lt;a href="http://ssis.wik.is/Data_Sources/Oracle"&gt;here&lt;/a&gt; listing the different Oracle Providers. This also includes the points I made in &lt;a href="http://phil-austin.blogspot.com/2008/07/oracle-ssis-providers-careful.html"&gt;my previous post&lt;/a&gt;. Since it appears under my post on a Google search for 'Oracle providers' I thought I'd try and redress the balance a little...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-1289467222521771784?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=1289467222521771784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1289467222521771784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1289467222521771784'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/08/more-on-oracle-connectors.html' title='More on Oracle connectors'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-7641374830047415266</id><published>2008-07-28T15:02:00.000+01:00</published><updated>2008-08-07T21:05:48.958+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Oracle SSIS providers - careful!</title><content type='html'>Been pretty busy over the last couple of months (hence the hiatus in posting), but I've built up plenty of useful material to post about in the next few weeks (time permitting!).&lt;br /&gt;&lt;br /&gt;Whats in a name? Well quite a lot when it comes to loading data into Oracle using SSIS. The details are described &lt;a href="http://msdn.microsoft.com/en-us/library/bb332055.aspx#connssis_topic4"&gt;here&lt;/a&gt; but it boils down to using "Oracle Provider for OLE DB" rather than "Microsoft OLE DB Provider for Oracle". &lt;br /&gt;The difference? Well as the article states: &lt;blockquote&gt;&lt;span style="font-family:times new roman;"&gt;[Microsoft OLE DB Provider for Oracle] has not been enhanced since Oracle 8&lt;/span&gt;&lt;/blockquote&gt;Therefore it doesn't support certain data types and 64-bit for starters.&lt;br /&gt;&lt;br /&gt;Bear in mind however you need to install the Oracle client to get the Oracle Provider for OLE DB which is &lt;a href="http://www.oracle.com/technology/tech/oci/instantclient/index.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-7641374830047415266?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=7641374830047415266' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/7641374830047415266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/7641374830047415266'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/07/oracle-ssis-providers-careful.html' title='Oracle SSIS providers - careful!'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-3445401947642035737</id><published>2008-04-19T20:48:00.000+01:00</published><updated>2009-07-10T12:03:05.275+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><title type='text'>Multi-user SSIS environment? Vote now!</title><content type='html'>In a post &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2008/04/15/ssis-package-parts.aspx"&gt;here &lt;/a&gt; Jamie Thompson suggests extending the container object in SSIS to allow for code re-use and crucially allow more than one developer to work on one package at a time.  This would be a big help on large projects. He's put in a &lt;a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=338609"&gt;Connect  request&lt;/a&gt; which currently has 9 votes. If you want to see this feature in the next version of SQL vote now!&lt;br /&gt;&lt;br /&gt;Personally I'd like to see better branching and merging support so that its easier to compare packages. There is &lt;a href="http://www.codeplex.com/bidshelper/Wiki/View.aspx?title=Smart%20Diff&amp;referringTitle=Home"&gt; Smart Diff&lt;/a&gt;, part of &lt;a href="http://www.codeplex.com/bidshelper"&gt;BIDS Helper&lt;/a&gt; which is better but it's:&lt;br /&gt;&lt;br /&gt;a) an add-on&lt;br /&gt;b) still needs a Source Control client&lt;br /&gt;c) still forces you to do manual XML merges&lt;br /&gt;&lt;br /&gt;One can but hope...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-3445401947642035737?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=3445401947642035737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3445401947642035737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3445401947642035737'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/04/multi-user-ssis-environment-vote-now.html' title='Multi-user SSIS environment? Vote now!'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-163165817468644200</id><published>2008-04-03T18:14:00.000+01:00</published><updated>2009-07-10T12:05:00.031+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance Point'/><title type='text'>PerformancePoint Monitoring Data Source Connection Problems - Solution for XP</title><content type='html'>Long title for a post! Over the last day or two I've been getting to grips with PerformancePoint 2007 , in particular the Monitoring Server product - including KPI's, scorecards, dashboards and so on. Be warned - there are some prerequisites including &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&amp;displaylang=en"&gt;ASP.NET AJAX extensions&lt;/a&gt; which aren't mentioned on the PerformancePoint &lt;a href="http://office.microsoft.com/en-us/performancepoint/FX101680481033.aspx"&gt;website&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Long story short, I came up against the problem detailed in full by Nick Barclay &lt;a href="http://nickbarclay.blogspot.com/2007/11/pps-data-source-connection-problems.html"&gt;here&lt;/a&gt;. If you're running Vista or Windows 2003 you should read the that post for the solution. However was using XP. &lt;br /&gt;&lt;br /&gt;Briefly, the problem was that creating a Data Source in the Dashboard Designer results in the following message:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;"The PerformancePoint Server could not connect to the specified data source. Verify that either the current user or application pool user has Read permissions to the data source, depending on your security configuration. Also verify that all required connection information is provided and correct"&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The reason for the message is that PerformancePoint is written in ASP.NET and as such, under IIS 6 it uses several Application Pools. Its the account that these app pools run under that is used to connect to a Data Source. Unfortunately XP uses IIS 5.1 so there's no app pools and therefore Nick's solution doesn't work. However there is a solution that I stumbled across.&lt;br /&gt;&lt;br /&gt;On IIS 5 ASP.NET websites run under the ASPNET account. However, changing the priviliges (ie adding to the Administrators group) is bad practice and more fundamentally won't work. The solution is to give the ASPNET account priviliges on the target Data Source. This is easy enough for SQL Server - simply add the ASPNET account as a user and give it access to the relevant database. The Analysis Services solution is slightly more involved.&lt;br /&gt;&lt;br /&gt;Basically you need to add a Role to the Analysis Services cube and add the ASPNET account as a member. Here's some screenshots showing the process in SSMS.&lt;br /&gt;&lt;br /&gt;Connect to your cube and navigate to the 'Role' folder and right-click on it. Choose 'New Role...':&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_bbIj0pCkO7c/R_U6ZU79wtI/AAAAAAAAAAU/Bl4YLbk6zGY/s1600-h/NewRole.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_bbIj0pCkO7c/R_U6ZU79wtI/AAAAAAAAAAU/Bl4YLbk6zGY/s320/NewRole.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5185114752778355410" /&gt;&lt;/a&gt;&lt;br /&gt;On the Create Role dialogue click the 'Full Control (Administrator)' box, and give it an appropriate name (for the purposes of this example we'll leave it as 'Role'):&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_bbIj0pCkO7c/R_U6ZU79wuI/AAAAAAAAAAc/6z-R_1Z9gUY/s1600-h/CreateRole.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_bbIj0pCkO7c/R_U6ZU79wuI/AAAAAAAAAAc/6z-R_1Z9gUY/s320/CreateRole.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5185114752778355426" /&gt;&lt;/a&gt;&lt;br /&gt;Click the 'Membership' property in the right-hand pane. Then click the 'Add...' button:&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_bbIj0pCkO7c/R_U6Z079wvI/AAAAAAAAAAk/wh3zNuUCFeA/s1600-h/RoleMembership.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_bbIj0pCkO7c/R_U6Z079wvI/AAAAAAAAAAk/wh3zNuUCFeA/s320/RoleMembership.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5185114761368290034" /&gt;&lt;/a&gt;&lt;br /&gt;Type ASPNET as the object name and click 'Check Names' - it should underline it:&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_bbIj0pCkO7c/R_U6Z079wwI/AAAAAAAAAAs/1q5wHUQ--B4/s1600-h/SelectUser.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_bbIj0pCkO7c/R_U6Z079wwI/AAAAAAAAAAs/1q5wHUQ--B4/s320/SelectUser.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5185114761368290050" /&gt;&lt;/a&gt;&lt;br /&gt;Click OK, and OK again on the 'Create Role' dialogue. Fire up the Dashboard Designer and you should find the Data Source connects fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-163165817468644200?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=163165817468644200' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/163165817468644200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/163165817468644200'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/04/performancepoint-monitoring-data-source.html' title='PerformancePoint Monitoring Data Source Connection Problems - Solution for XP'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_bbIj0pCkO7c/R_U6ZU79wtI/AAAAAAAAAAU/Bl4YLbk6zGY/s72-c/NewRole.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-8496152598662321451</id><published>2008-03-07T11:23:00.000Z</published><updated>2008-07-22T21:54:39.964+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>Details of Windows 2008/SQL 2008 performance emerging</title><content type='html'>Some pretty stellar performance being recorded for SQL 2008 on Windows 2008 on the SQL Server Performance Blog. Record &lt;a href="http://blogs.msdn.com/sqlperf/archive/2008/02/27/etl-world-record.aspx"&gt;ETL performance&lt;/a&gt; of over 2TB an hour! As they say themselves - not a certified benchmark but impressive nonetheless, and the sort of performance you'd expect of a data appliance and/or Informatica, Ab Initio et al. White paper to follow which should be an interesting read.&lt;br /&gt;&lt;br /&gt;Some benchmarks that &lt;i&gt;are&lt;/i&gt; certified on the other hand are the Transaction Processing Council (TPC). HP have &lt;a href="http://www.tpc.org/tpch/results/tpch_result_detail.asp?id=108022701"&gt;posted&lt;/a&gt; the first 10TB TPC-H benchmark for Windows 2008/SQL Server 2008, achieving over 1000 queries per minute at less than $40 per query. Oracle and DB2 still do better at this scale - both in terms of raw performance and price/performance but SQL is catching up with every release. It'll be interesting to see the 3TB results because there wasn't much in it under SQL 2005.&lt;br /&gt;&lt;br /&gt;Does any of this matter? Well yes and no. Clearly you're not going to embark on a 10TB data warehouse with only a handful of TPC benchmarks to guide you, but whereas previously you might not consider SQL Server for this scale I think its becoming more viable. &lt;a href="http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=200128"&gt;Nationwide's&lt;/a&gt; Basel II data warehouse was predicted to get to that size a couple of years a ago and that was running on SQL 2005 and Windows 2003.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-8496152598662321451?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=8496152598662321451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8496152598662321451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8496152598662321451'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/03/details-of-windows-2008sql-2008.html' title='Details of Windows 2008/SQL 2008 performance emerging'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-1787120949538293983</id><published>2008-02-29T10:21:00.000Z</published><updated>2008-02-29T10:44:52.366Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='general BI'/><title type='text'>OLAP report BI survey released</title><content type='html'>The venerable &lt;a href="www.olapreport.com"&gt;OLAP Report&lt;/a&gt; has released the seventh annual BI survey for 2007. The report is reviewed &lt;a href="http://www.intelligententerprise.com/showArticle.jhtml?articleID=206401755&amp;pgno=3"&gt;here&lt;/a&gt; by Intelligent Enterprise. Not had the opportunity to read it - it's not exactly cheap at $4 995 for three users, hopefully Clarity will see fit to get the credit card out.&lt;br /&gt;&lt;br /&gt;Some headlines however; customer 'loyalty' scores increased for Microstrategy, Applix and Microsoft Analysis Services and declined for Hyperion Essbase, Cognos and SAP. &lt;br /&gt;&lt;br /&gt;Overall satisfaction with BI is high - 71% of survey respondents reporting that business goals had 'largely' been met. &lt;br /&gt;&lt;br /&gt;On the flip-side less than 9% of employees use BI with cost and performance being the biggest obstacles to a wider deployment. 'BI for the masses' not exactly here yet...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-1787120949538293983?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=1787120949538293983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1787120949538293983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/1787120949538293983'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/02/olap-report-bi-survey-released.html' title='OLAP report BI survey released'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-4160838982220658835</id><published>2008-02-07T12:46:00.000Z</published><updated>2008-02-07T18:20:40.758Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='data modeling'/><category scheme='http://www.blogger.com/atom/ns#' term='data warehouse'/><title type='text'>Restating history or "What was the number on this date?"</title><content type='html'>Interesting article from Joy Mundy &lt;a href="http://www.intelligententerprise.com/channels/business_intelligence/showArticle.jhtml?articleID=204800027&amp;pgno=1"&gt;here&lt;/a&gt; about meeting the need to 'restate' history or do point-in-time analysis from a data warehouse. It involves joining on a business key which might raise a few eyebrows. Not sure how you'd go about doing this in an OLAP tool - a difficutly she highlights herself. &lt;br /&gt;&lt;br /&gt;In a recent project I solved a similar problem by loading a snapshot of all relevant facts every day, and doing distinct counts in Analysis Services. A 'snapshot date' dimension allowed for analysis on any given date. This approach worked well because the data-sets were small (only amounting to 2000 rows a day) - Joy's might be a more elegant solution if you have millions of rows to contend with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-4160838982220658835?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=4160838982220658835' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/4160838982220658835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/4160838982220658835'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/02/restating-history-or-what-was-number-on.html' title='Restating history or &quot;What was the number on this date?&quot;'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-7288255359404190290</id><published>2008-02-04T22:48:00.000Z</published><updated>2008-02-05T12:02:21.320Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Conferences'/><title type='text'>Conferences</title><content type='html'>Lots of SQL and BI events occuring over the next few months.&lt;br /&gt;&lt;br /&gt;First-up is the &lt;a href="http://agendabuilder.gartner.com/bie9i/WebPages/Home.aspx"&gt;Gartner Euro BI conference&lt;/a&gt; at which there will be a &lt;a href="http://www.clarity-integration.com/"&gt;Clarity-Integration&lt;/a&gt; stand and some of my colleagues. Not me though unfortunately...&lt;br /&gt;&lt;br /&gt;Second is the &lt;a href="http://www.sqlbits.com/default.aspx?AspxAutoDetectCookieSupport=1"&gt;SQLBits II - The SQL&lt;/a&gt; in Birmingham next month. Puns aside its shaping up pretty well with sessions on 2008 as well as some in-depth 2005 sessions with MVPs. Only catch is that its on a Saturday. What gives with that?&lt;br /&gt;&lt;br /&gt;Thirdly &lt;a href="http://www.european-pass-conference.com/"&gt;PASS Europe&lt;/a&gt; in April in Germany - not a lot of detail on this at the moment - although a couple of MVP's are doing sessions.&lt;br /&gt;&lt;br /&gt;Last but certainly not least is the &lt;a href="http://www.microsoft.com/bi/conference/default.aspx"&gt;MS BI conference&lt;/a&gt; in Seattle in October. Went to this last year and it was great, with some informative and useful sessions - particularly from SQL CAT - oh and a free trip up the Space Needle courtesy of &lt;a href="http://www.panorama.com"&gt;Panorama&lt;/a&gt; wasn't bad either...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-7288255359404190290?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=7288255359404190290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/7288255359404190290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/7288255359404190290'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/02/conferences.html' title='Conferences'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-2343138665303559245</id><published>2008-02-04T22:27:00.000Z</published><updated>2008-02-05T12:02:53.951Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='blogs'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>More useful blogs</title><content type='html'>Sometimes it amazes me how much good stuff people in the SQL community are blogging about. I for one have difficulty keeping up with it all. Stumbled across &lt;a href="http://blogs.msdn.com/michen/default.aspx"&gt;this&lt;/a&gt; by Michael Entin none other than the Tech Lead for SSIS - not someone I'd heard of I'm ashamed to say. Anyhoo lots of informative posts particularly about SQL 2008, including &lt;a href="http://blogs.msdn.com/michen/archive/2007/06/11/katmai-ssis-data-flow-improvements.aspx"&gt;one&lt;/a&gt; about the improvement in multi-threading execution trees and &lt;a href="http://blogs.msdn.com/michen/archive/2007/12/04/SQL-2008-and-VS-2008.aspx"&gt;another&lt;/a&gt; about compatability between VS2008/SQL2008 and VS2005/SQL2005 (note - there are limitations).&lt;br /&gt;&lt;br /&gt;I found another detailed and interesting post &lt;a href="http://weblogs.sqlteam.com/derekc/archive/2008/01/28/60469.aspx"&gt;here&lt;/a&gt; about Change Data Capture which could be really big news for BI on SQL2008 providing that a) your source system will be migrated onto 2008, and b) you can persuade your source system DBA's to switch it on. One of the major issues frequently encountered working with large source systems is figuring out the delta - ie whats changed since you last did an extract. Change Data Capture (CDC) could be a neat solution. Time to start bending your fellow DBA's ears now..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-2343138665303559245?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=2343138665303559245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2343138665303559245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2343138665303559245'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/02/more-useful-blogs.html' title='More useful blogs'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-2162032982387849665</id><published>2008-01-25T18:53:00.000Z</published><updated>2010-04-26T12:56:41.637+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Expressions'/><title type='text'>SSIS Expression for YYYYMMDD (ISO date)</title><content type='html'>Scratching around this afternoon trying to find a crib for the SSIS expression for the date format YYYYMMDD (ie 20080125 for today). &lt;a href=http://wiki.sqlis.com/&gt;Darren's Wiki site&lt;/a&gt; has it &lt;a href=http://wiki.sqlis.com/default.aspx/SQLISWiki/Expressions.html&gt;here&lt;/a&gt; but it appeared to be having a few problems and the page was timing out (seems to working now). So I'm sticking it here should I need it again (and I probably will):&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;blockquote&gt;&lt;br /&gt;(DT_STR,4,1252)YEAR(GETDATE()) + RIGHT("0" + (DT_STR,2,1252)MONTH(GETDATE()),2) + RIGHT("0" + (DT_STR,2,1252)DAY(GETDATE()),2)&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Update: Thanks to Anonymous below who pointed out that the code-page ought to be 1252 (rather than 1253) since this is usually the default for most SQL installs (not that 1253 will break it). As you can see I've updated it. Also if you want a Unicode version you can do this:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;blockquote&gt;&lt;br /&gt;(DT_WSTR,4)YEAR(GETDATE()) + RIGHT("0" + (DT_WSTR,2)MONTH(GETDATE()),2) + RIGHT("0" + (DT_WSTR,2)DAY(GETDATE()),2)&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-2162032982387849665?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=2162032982387849665' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2162032982387849665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/2162032982387849665'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2008/01/ssis-expression-for-yyyymmdd-iso-date.html' title='SSIS Expression for YYYYMMDD (ISO date)'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-5935137714263006623</id><published>2007-12-30T19:25:00.000Z</published><updated>2007-12-30T19:33:17.882Z</updated><title type='text'>New SQL Customer Advisory Team blog</title><content type='html'>Well more of a fully-blown &lt;a href="http://sqlcat.com/"&gt;website&lt;/a&gt; than a blog, and their blog wasn't bad (check my links on the left-hand side). Definitely worth keeping tabs on. Thanks to the ever-useful Euan Garden's &lt;a href="http://blogs.msdn.com/euanga/default.aspx"&gt;blog&lt;/a&gt; for this tidbit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-5935137714263006623?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=5935137714263006623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/5935137714263006623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/5935137714263006623'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2007/12/new-sqlcat-blog.html' title='New SQL Customer Advisory Team blog'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-3846043707157143598</id><published>2007-12-18T18:30:00.000Z</published><updated>2008-12-09T08:58:41.241Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><title type='text'>Retain Nulls</title><content type='html'>This slowed me down for a few minutes today - so might be useful (well fairly anyway).&lt;br /&gt;&lt;br /&gt;Importing a text file using SSIS, and writing to a table in a Data Flow Task. Problem was that empty date fields in the text source were causing '1753-01-01 00:00:00.000' to be written to the table - we obviously wanted NULLs. The solution was to right-click on the Flat File Source -&gt; click 'Show Advanced Editor...' click on the 'Component Properties' tab and then set the 'RetainNulls' property to 'True'. Obvious really but I'll add a picture just in case you didn't follow:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_bbIj0pCkO7c/R2gUWREE4tI/AAAAAAAAAAM/keZNO65_vjk/s1600-h/RetainNulls.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_bbIj0pCkO7c/R2gUWREE4tI/AAAAAAAAAAM/keZNO65_vjk/s320/RetainNulls.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5145384947040969426" /&gt;&lt;/a&gt;&lt;br /&gt;The code for doing this programmatically you say? Why here it is:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;blockquote&gt;&lt;br /&gt;Dim flatFileSource As IDTSComponentMetaData90 = flow.ComponentMetaDataCollection.New()&lt;br /&gt;Dim srcInstance As CManagedComponentWrapper = flatFileSource.Instantiate()&lt;br /&gt;&lt;br /&gt;srcInstance.SetComponentProperty("RetainNulls", True)&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;Bob's yer Uncle - NULLs instead of &lt;a href="http://en.wikipedia.org/wiki/1753"&gt;1753&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Don't forget that the Flat File Task and associated Flat File Data Source component need to have date fields configured to the DT_DBTIMESTAMP data type.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-3846043707157143598?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=3846043707157143598' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3846043707157143598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3846043707157143598'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2007/12/retain-nulls.html' title='Retain Nulls'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_bbIj0pCkO7c/R2gUWREE4tI/AAAAAAAAAAM/keZNO65_vjk/s72-c/RetainNulls.JPG' height='72' width='72'/><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-6172792321044147409</id><published>2007-12-18T18:16:00.000Z</published><updated>2007-12-18T19:04:34.323Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data dude'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='the Register'/><title type='text'>Visual Studio 2008 reviewed</title><content type='html'>Interesting review (well overview anyway) of the new version of Visual Studio on the Reg &lt;a href="http://www.regdeveloper.co.uk/2007/12/18/visual_studio_2008_review/"&gt;here&lt;/a&gt;. Towards the end of the aticle it mentions that the 'Database version' is integrated into the main edition. &lt;a href="http://blogs.msdn.com/gertd/archive/2007/11/21/visual-studio-team-system-2008-database-edition.aspx"&gt;This is&lt;/a&gt; in fact 'Data Dude' (or 'DB Pro' as apparently it should be known). It strikes me that this is reason enough to get 2008 on its own. The pain of installing another sku over the top of Visual Studio and SQL Server has caused me considerable effing and blinding. Now its just a question of ticking a box on the install.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-6172792321044147409?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=6172792321044147409' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6172792321044147409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/6172792321044147409'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2007/12/visual-studio-2008-reviewed.html' title='Visual Studio 2008 reviewed'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-9163847317408510910</id><published>2007-12-10T19:01:00.001Z</published><updated>2007-12-10T19:25:04.471Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Regular Expressions'/><title type='text'>Regular expressions again</title><content type='html'>Right. Now I understand regular expressions a &lt;em&gt;little&lt;/em&gt; better here's an update to the previous post. Rather than use the rather clunky .NET string manipulation of the previous post this is a little neater:&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt; &lt;br /&gt;Dim dateRegEx As New RegularExpressions.Regex("\d{4}[-]\d{2}[-]\d{2}[-]\d{2}.\d{2}.\d{2}.\d{6}")&lt;br /&gt;&lt;br /&gt;If dateRegEx.IsMatch(StringToFix) Then&lt;br /&gt;&lt;br /&gt;            outString = dateRegEx.Replace(StringToFix, _&lt;br /&gt;            "(?&lt;year&gt;\d{4})-(?&lt;month&gt;\d{2})-(?&lt;day&gt;\d{2})-(?&lt;hour&gt;\d{2}).(?&lt;min&gt;\d{2}).(?&lt;sec&gt;\d{2}).(?&lt;milli&gt;\d{3})(?&lt;remove&gt;\d{3})", _&lt;br /&gt;            "${year}-${month}-${day} ${hour}:${min}:${sec}.${milli}")&lt;br /&gt;&lt;br /&gt;        End If&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;This does everything the previous code fragment does but with less than half the code. The regular expressions work as follows:&lt;br /&gt;&lt;br /&gt;\d - in this example has to be used with a repetition count (the number in the {}-brackets). Essentially this matches the number of digits in the curly brackets. This was probably where I was going wrong in the previous post. So that tidies up the match.&lt;br /&gt;&lt;br /&gt;The Replace function has quite a large number of overloads but the one being used is &lt;a href="http://msdn2.microsoft.com/en-us/library/e7f5w83z.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;the ?&amp;ltyear&amp;gt; notation in the second replace parameter identifies a regular expression group (in this case 'year'), essentially splitting up the string being evaluated, for manipluation in the third parameter.&lt;br /&gt;&lt;br /&gt;The ${} notation is explained &lt;a href="http://msdn2.microsoft.com/en-us/library/ewy2t5e0.aspx"&gt;here&lt;/a&gt;, and in this example I'm just using it to concatenate the various bits of string groups created by using ?&amp;lt;&lt;em&gt;group name&lt;/em&gt;&amp;gt; notation together.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-9163847317408510910?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=9163847317408510910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9163847317408510910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/9163847317408510910'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2007/12/regular-expressions-again.html' title='Regular expressions again'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-3625371776604832171</id><published>2007-12-06T17:43:00.000Z</published><updated>2007-12-06T20:59:54.156Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Regular Expressions'/><title type='text'>Regular expressions are your friend</title><content type='html'>Well apparently there are people reading this - 23 so far if Google Analytics is to be believed. Anyway on with the post...&lt;br /&gt;&lt;br /&gt;We're importing some frankly bizarre DB2 flat files using SSIS, one of the features of which is a date format yyyy-mm-dd-hh.mm.ss.mmmmm which SQL obviously won't accept as a datetime format (they're also fixed width &lt;em&gt;and&lt;/em&gt; delimited - work that one out). For this and other reasons the easiest thng to do is to parse the file in a Script Task. The RegularExpressions .NET class is dead handy for this (Useful resource &lt;a href="http://www.regular-expressions.info/"&gt; here &lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Add a script task do the necessary getting of the file using System.IO class and split the line using the Split method (note that the seperator is a Char data type not string), we need to reference the right RegularExpression class:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Imports System.Text.RegularExpressions&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Then create an immutable regular expression:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Dim dateRegEx As New Regex("[0-9][0-9][0-9][0-9][-][0-9][0-9][-][0-9][0-9][-][0-9][0-9][.][0-9][0-9][.][0-9][0-9][.][0-9][0-9][0-9][0-9][0-9][0-9]")&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Then match the string you want to fix with the regular expression and do your reformatting work:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;If dateRegEx.IsMatch(StringToFix) Then&lt;br /&gt;            revString = StrReverse(StringToFix)&lt;br /&gt;            outString = Replace(Replace(revString, "-", " ", , 1), ".", ":")&lt;br /&gt;            outString = StrReverse(Replace(outString, ":", ".", , 1)).Substring(0, 23)&lt;br /&gt;        End If&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Not the cleverest regular expression for date-matching but sufficient for our purposes. Incidentally I found that the SSIS version of .NET didn't seem to like using the /d notation instead of [0-9]. Anyway doing this without RegEx would be a real pain.&lt;br /&gt;&lt;br /&gt;There is actually a regular expression task at www.sqlis.com but we wanted to parse the file prior to loading into SSIS. Script Task and RegEx to the rescue...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-3625371776604832171?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=3625371776604832171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3625371776604832171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3625371776604832171'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2007/12/regular-expressions-are-your-friend.html' title='Regular expressions are your friend'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-7625827065363890245</id><published>2007-12-03T10:57:00.000Z</published><updated>2007-12-03T11:18:34.796Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='custom logging'/><title type='text'>Simple custom logging for SSIS</title><content type='html'>A neat trick found &lt;a href="http://blogs.sqlservercentral.com/blogs/michael_coles/archive/2007/10/09/3012.aspx"&gt;here&lt;/a&gt; for an easy way of doing custom logging to SQL Server. Essentially you can hack around with the stored procedure that SSIS calls to log events (sp_dts_addlogentry). &lt;br /&gt;&lt;br /&gt;An obvious usage would be to simplify the extremely verbose logging messages provided by SSIS by filtering the majority into a seperate table and 'cherry-picking' the really useful ones and INSERTing them into a 'core' logging table. I'll leave it up to the reader (if there are any!) to work out the 'usefulness' algorithm for now, although I may post on this again if I end up implementing it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-7625827065363890245?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=7625827065363890245' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/7625827065363890245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/7625827065363890245'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2007/12/simple-custom-logging-for-ssis.html' title='Simple custom logging for SSIS'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-3951942103644113472</id><published>2007-12-03T10:20:00.001Z</published><updated>2007-12-03T11:10:41.214Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='custom rollup problem'/><category scheme='http://www.blogger.com/atom/ns#' term='SSAS'/><title type='text'>Custom roll-up performance problems</title><content type='html'>A colleague of mine came across an issue when working with custom roll-ups in SSAS 2005, so I thought I'd post it here for future reference. Apparently since SP2 performance is significantly degraded (in our case by about 10 times) when a custom member formula is used to calculate a measure. MS are quoted &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1525418&amp;amp;SiteID=1"&gt;here&lt;/a&gt; as suggesting that changing a the Cache Policy setting in the msmdsrv.ini to 9 and restarting SSAS solves the problem. This worked for us. Problem is that its a server-wide setting so lets hope it won't cause a problem somewhere else in the future.&lt;br /&gt;&lt;br /&gt;Why bother using custom rollups? Well they're particularly useful when creating accounting reports because the aggregations sometimes depend on values of other members, rather than on directly related measures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-3951942103644113472?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=3951942103644113472' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3951942103644113472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/3951942103644113472'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2007/12/custom-roll-up-performance-problems.html' title='Custom roll-up performance problems'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-8444103192276032625</id><published>2007-12-03T10:20:00.000Z</published><updated>2010-06-09T10:31:04.037+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='custom rollup problem'/><category scheme='http://www.blogger.com/atom/ns#' term='SSAS'/><title type='text'>Custom roll-up performance problems</title><content type='html'>Sam - a colleague of mine - came across an issue when working with custom roll-ups in SSAS 2005, so I thought I'd post it here for future reference. Apparently since SP2 performance is significantly degraded (in our case by about 10 times) when a custom member formula is used to calculate a measure. MS are quoted &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1525418&amp;amp;SiteID=1"&gt;&lt;br /&gt;here&lt;/a&gt; as suggesting that changing a the Cache Policy setting in the msmdsrv.ini to 9 and restarting SSAS solves the problem. This worked for us. Problem is that its a server-wide setting so lets hope it won't cause a problem somewhere else in the future.&lt;br /&gt;&lt;br /&gt;Why bother using custom rollups? Well they're particularly useful when creating accounting reports because the aggregations sometimes depend on values of other members, rather than on directly related measures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-8444103192276032625?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=8444103192276032625' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8444103192276032625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8444103192276032625'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2007/12/custom-roll-up-performance-problems_03.html' title='Custom roll-up performance problems'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-583448162611849186.post-8845100564388440212</id><published>2007-11-28T12:02:00.000Z</published><updated>2008-01-18T10:16:02.320Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='custom task'/><title type='text'>First post</title><content type='html'>Hello!&lt;br /&gt;&lt;br /&gt;My first post relates to installing custom SSIS tasks. Here's a simple batch script to do it. The way it works assumes you have gacutil.exe, gacutil.exe.config and the SSIS custom task assembly in the same folder as the batch script:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;p&gt;rem Install custom task&lt;br /&gt;@echo off&lt;br /&gt;set Task=&amp;lt;Insert Task Name&amp;gt;.dll&lt;br /&gt;rem copy task to task folder&lt;br /&gt;copy /y /v %Task% "c:\Program Files\Microsoft SQL Server\90\DTS\Tasks"&lt;br /&gt;&lt;br /&gt;rem execute gacutil to add to GAC&lt;br /&gt;gacutil.exe /if "c:\program files\Microsoft SQL Server\90\DTS\Tasks\%Task%"&lt;br /&gt;@echo Successfully installed&lt;br /&gt;pause&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The /if switch ensures that any previous version of the assembly is forcibly overwritten. By the way if you're struggling with Vista permissions shift+right-click on the batch file and select 'Run as administrator'. If you're looking for the .Net 2.0 gacutil its in %Program Files%\Microsoft Visual Studio 8\SDK\v2.0\Bin assuming you have Visual Studio 2005 installed of course.&lt;br /&gt;&lt;br /&gt;Obviously this doesn't add it to the Business Intelligence Design Studio toolbox - you have to do that manually (right-click 'Choose Items...' etc, etc).&lt;br /&gt;&lt;br /&gt;Hopefully I'll have more interesting posts in the future...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/583448162611849186-8845100564388440212?l=phil-austin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=583448162611849186&amp;postID=8845100564388440212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8845100564388440212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/583448162611849186/posts/default/8845100564388440212'/><link rel='alternate' type='text/html' href='http://phil-austin.blogspot.com/2007/11/first-post.html' title='First post'/><author><name>Phil</name><uri>http://www.blogger.com/profile/10605647000243636584</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
