<?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-19716801</id><updated>2011-07-28T04:39:43.464-07:00</updated><title type='text'>SQL Server Business Intelligence</title><subtitle type='html'>SQL SERVER 2005 &amp; 2008 IS THE MAIN THEME OF THIS BLOG</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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>70</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-19716801.post-5489496591465255846</id><published>2007-08-29T02:53:00.000-07:00</published><updated>2010-12-01T06:39:15.063-08:00</updated><title type='text'>Moved to http://www.beeii.com/</title><content type='html'>I have moved my blog to &lt;a href="http://www.beeii.com/"&gt;beeii&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-5489496591465255846?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/5489496591465255846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=5489496591465255846' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5489496591465255846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5489496591465255846'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/08/moved-to-sqlblogcasts.html' title='Moved to http://www.beeii.com/'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-5373332010921604373</id><published>2007-08-20T00:48:00.000-07:00</published><updated>2007-08-28T00:18:09.707-07:00</updated><title type='text'>Installing Proclarity Analytics Server</title><content type='html'>Please note the Sever Authentication should be set to "SQL Server and Windows Authentication Mode" before installing PAS.&lt;br /&gt;&lt;br /&gt;Default is set to "Windows Authentication Mode". You can change this by selecting Properties on the server. This setting is under "Security" tab.&lt;br /&gt;&lt;br /&gt;Just a reminder for me more than anything else.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-5373332010921604373?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/5373332010921604373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=5373332010921604373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5373332010921604373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5373332010921604373'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/08/inatalling-proclarity-analytics-server.html' title='Installing Proclarity Analytics Server'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-7607255570725903715</id><published>2007-08-16T06:45:00.000-07:00</published><updated>2007-08-16T06:51:50.061-07:00</updated><title type='text'>Performance Point CTP4 Available for Download</title><content type='html'>Performance Point CTP4 is available for &lt;a href="https://connect.microsoft.com/Downloads/Downloads.aspx?SiteID=181"&gt;download&lt;/a&gt; from MS Connect site.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-7607255570725903715?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/7607255570725903715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=7607255570725903715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/7607255570725903715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/7607255570725903715'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/08/performance-point-ctp4-available-for.html' title='Performance Point CTP4 Available for Download'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-8184064193463021573</id><published>2007-08-06T01:05:00.000-07:00</published><updated>2007-08-06T01:06:17.369-07:00</updated><title type='text'>How did I build Employee dimension using historical data?</title><content type='html'>I never ever had to this in the past. On my current project I had to build the employee dimension based on opportunity table in CRM system, not from an employee reference table. Opportunity table holds the following information OpportunityID, AccountManagerID, ActualCloseDate, ClosedDivision and ClosedRegion along with many other fields.&lt;br /&gt;&lt;br /&gt;UserInfo table is the table which holds Employee details, but that table only holds current date. Going forward we will be OK as will do the type 2 on Region and Division.&lt;br /&gt;&lt;br /&gt;The requirement was from the client is to map the Employee to an opportunity, which is fine, except the employee need to be mapped to the Division and Region which they closed the deal at. That’s why the ClosedDivision and ClosedRegion from an opportunity table comes handy.&lt;br /&gt;&lt;br /&gt;I brought the data from source system into Stage database using query similar to the one below&lt;br /&gt;SELECT                     o.accountmanagerid,&lt;br /&gt;                                    u.username,&lt;br /&gt;                                    o1.closed_region,&lt;br /&gt;                                    o1.closed_division,&lt;br /&gt;                                    MIN(o.actualclose) actualclose&lt;br /&gt;FROM                         sysdba.opportunity o&lt;br /&gt;INNER JOIN             sysdba.opportunity_extra_1 o1&lt;br /&gt;ON                              o.opportunityid = o1.opportunityid&lt;br /&gt;INNER JOIN             sysdba.userinfo u&lt;br /&gt;ON                              o.accountmanagerid = u.userid&lt;br /&gt;WHERE                      status LIKE 'Closed - %'&lt;br /&gt;AND                           actualclose IS  NOT NULL&lt;br /&gt;AND                           closed_division IS  NOT NULL&lt;br /&gt;AND                           closed_region IS  NOT NULL&lt;br /&gt;GROUP BY               o.accountmanagerid,&lt;br /&gt;                                    u.username,&lt;br /&gt;                                    o1.closed_region,&lt;br /&gt;                                    o1.closed_division&lt;br /&gt;&lt;br /&gt;The above query will bring all the AccountManagerID (NK), Name, ClosedDivision and Region along with MINIMUM actual close date of an opportunity.&lt;br /&gt;&lt;br /&gt;Source table example&lt;br /&gt;&lt;br /&gt;Opp                 Emp                 ClosedDate     ClosedRegion ClosedDivision&lt;br /&gt;1234                ABC                01/04/1990      London           South&lt;br /&gt;2345                ABC                09/04/1990      Mids                North&lt;br /&gt;4567                ABC                06/08/2003      Mids                North&lt;br /&gt;3456                ABC                05/07/2007      Scotland          Scotland&lt;br /&gt;&lt;br /&gt;The Stage table will look like this&lt;br /&gt;&lt;br /&gt;Emp                 ClosedDate                 ClosedRegion             ClosedDivision&lt;br /&gt;ABC                01/04/1990                  London                       South&lt;br /&gt;ABC                09/04/1990                  Mids                            North&lt;br /&gt;ABC                05/07/2007                  Scotland                      Scotland&lt;br /&gt;&lt;br /&gt;Now I have got the stage table populated, now how can I build the warehouse dimension table.&lt;br /&gt;&lt;br /&gt;This package only to run one time, as it is going to build the employee dimension using historical data. This is how I built the dimension.&lt;br /&gt;&lt;br /&gt;1.      I read the stage table and assigned it to an object variable using the following query&lt;br /&gt;SELECT         DISTINCT AccountManagerId, ActualClose&lt;br /&gt;FROM scbEmployeeHistory&lt;br /&gt;ORDER BY 1,2&lt;br /&gt;2.      Please note that I am only selecting AccountManagerID (NK) and ActualClose (date).&lt;br /&gt;3.      Using Foreach Loop Container I loop through the Foreach ADO Enumerator and mapping the results to 2 variables.&lt;br /&gt;4.      Then I will build the dimension usual way, but the key is to pass the AccountManagerID and ActualCloseDate as parameter to the source querry.&lt;br /&gt;&lt;br /&gt;If anyone would like to see an example feel free to drop me a mail and I will send it to you.&lt;br /&gt;&lt;br /&gt;I would be interested to hear from others if you have done it differently.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-8184064193463021573?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/8184064193463021573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=8184064193463021573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/8184064193463021573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/8184064193463021573'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/08/how-did-i-build-employee-dimension.html' title='How did I build Employee dimension using historical data?'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-8469986197621751930</id><published>2007-07-31T00:39:00.000-07:00</published><updated>2007-07-31T00:53:07.999-07:00</updated><title type='text'>How do we extract latest data from source system</title><content type='html'>&lt;p&gt;Until SQL Server 2008 is released and implemented we all have to work with various work around to retrieve only latest data from source systems.&lt;/p&gt;&lt;p&gt;In the previous projects I was fortunate in a way that source system was either Oracle or flat files with only changed / new data. Oracle and other major DB vendors had Change Data Capture for a long time. &lt;/p&gt;&lt;p&gt;&lt;a href="https://connect.microsoft.com/SQLServer/content/content.aspx?ContentID=5395"&gt;SQL Server 2008&lt;/a&gt; is going to provide the same feature and functionality. You can find out more about SQL Server 2008 CDC feature &lt;a href="https://www.livemeeting.com/cc/lmevents/view?id=msft061307fs&amp;pw=ATT1302&amp;amp;cn="&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Each source table has either CreateDate and ModifyDate column. If these columns are there we extract all the records anything greater than we have extracted last. I store last extract datetime stamp for each table in a control table, which is used within SSIS package to extract only the latest record. &lt;/p&gt;&lt;p&gt;I use a SP similar to the one shown below to update the control table with the last extract datetime stamp.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;CREATE PROCEDURE [dbo].[uspUpdateExtractionDate] (@LoadId INT)&lt;br /&gt;AS&lt;br /&gt;DECLARE @VarName VARCHAR(50)&lt;br /&gt;DECLARE @ObjectName VARCHAR(50)&lt;br /&gt;DECLARE @VarValue VARCHAR(50)&lt;br /&gt;DECLARE @Tmp TABLE (VarName VARCHAR(50),ObjectName VARCHAR(50), VarValue VARCHAR(50))&lt;br /&gt;BEGIN TRY&lt;br /&gt;INSERT&lt;br /&gt;INTO @Tmp&lt;br /&gt;SELECT 'strLastExtractDate', 'pkgStgOpportunity',CONVERT(VARCHAR(23),MAX(CreateDate),121)&lt;br /&gt;FROM scbOpportunity&lt;br /&gt;WHERE LoadId = @LoadId&lt;br /&gt;BEGIN TRAN&lt;br /&gt;DECLARE Tmp_Cursor CURSOR FOR&lt;br /&gt;SELECT *&lt;br /&gt;FROM @Tmp&lt;br /&gt;OPEN Tmp_Cursor&lt;br /&gt;FETCH NEXT FROM Tmp_Cursor INTO @VarName, @ObjectName, @VarValue&lt;br /&gt;WHILE @@FETCH_STATUS = 0&lt;br /&gt;BEGIN&lt;br /&gt;UPDATE BISystem.dbo.ConfigVar&lt;br /&gt;SET VarValue = @VarValue&lt;br /&gt;WHERE VarName = @VarName&lt;br /&gt;AND ObjectName = @ObjectName&lt;br /&gt;FETCH NEXT FROM Tmp_Cursor INTO @VarName, @ObjectName, @VarValue&lt;br /&gt;END&lt;br /&gt;CLOSE Tmp_Cursor&lt;br /&gt;DEALLOCATE Tmp_Cursor&lt;br /&gt;COMMIT TRAN&lt;br /&gt;END TRY&lt;br /&gt;BEGIN CATCH&lt;br /&gt;ROLLBACK TRAN&lt;br /&gt;EXEC BISystem.dbo.uspLogErrorInfo&lt;br /&gt;END CATCH&lt;/p&gt;&lt;p&gt;Thanks&lt;br /&gt;Sutha&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-8469986197621751930?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/8469986197621751930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=8469986197621751930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/8469986197621751930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/8469986197621751930'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/07/how-do-we-extract-latest-data-from.html' title='How do we extract latest data from source system'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-4928475093510174586</id><published>2007-07-27T02:33:00.000-07:00</published><updated>2007-07-27T02:41:54.742-07:00</updated><title type='text'>Execute Package Task Might Fail Intermittently</title><content type='html'>I have used Execute Package Task before in various projects without any problems.&lt;br /&gt;&lt;br /&gt;On my current project I tried to do the same I came across funny problem. Execute Package Task started to fail Intermittently. The only difference in this project to others I have implemented was that we are using ADO.Net Connection Manager. Thats where it seems to have a problem. It doesn't seem to acquire connection for the ADO.Net connection manager time to time.&lt;br /&gt;&lt;br /&gt;Therefore I have decided to use script task to execute the package. When I use Script Task it works fine.&lt;br /&gt;&lt;br /&gt;I need to investigate this further and maybe even log a call with MS.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-4928475093510174586?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/4928475093510174586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=4928475093510174586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/4928475093510174586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/4928475093510174586'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/07/execute-package-task-might-fail.html' title='Execute Package Task Might Fail Intermittently'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-2401730401413498043</id><published>2007-07-25T11:09:00.000-07:00</published><updated>2007-07-25T11:29:34.052-07:00</updated><title type='text'>Loading Data Into Table via SSIS when IGNORE_DUP_KEY is ON</title><content type='html'>Probably most of you aware of this issue and most definitely it is not a best practice, but if you wish to use in any unforseen reason please be aware.&lt;br /&gt;&lt;br /&gt;For example we have a table with 3 columns. If you set a Unique Non-Clustered Index with all 3 columns and set IGNORE_DUP_KEY = ON, then you have to be aware of the following.&lt;br /&gt;&lt;br /&gt;If you are using OLE DB Destination with OLE DB Provider for SQL Server it will fail the package even though it will insert correct number of rows by ignoring duplicate rows. If you want to populate this type of table without failing the package, while using OLE DB Destination, you would need to user Native OLEDB\SQL Native Client.&lt;br /&gt;&lt;br /&gt;The Provider to use in this scenario is - SQLNCLI.1&lt;br /&gt;The Provider NOT use in this scenario is - SQLOLEDB&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-2401730401413498043?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/2401730401413498043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=2401730401413498043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/2401730401413498043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/2401730401413498043'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/07/loading-data-into-table-via-ssis-when.html' title='Loading Data Into Table via SSIS when IGNORE_DUP_KEY is ON'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-5265510759732483640</id><published>2007-07-23T23:52:00.000-07:00</published><updated>2007-07-23T23:56:56.483-07:00</updated><title type='text'>Loading Date Dimension</title><content type='html'>I am sure all of you seen this script before. More than anything I am putting this here for my reference in the future.&lt;br /&gt;&lt;br /&gt;Last couple of client sites I have worked, their fiscal year is aligned with calendar year and therefore it made life much easier. The SP below can populate the dates as you specify.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;USE [Stage]&lt;br /&gt;GO&lt;br /&gt;CREATE PROCEDURE [dbo].[uspPopulateDate] (@LoadId INT)&lt;br /&gt;AS&lt;br /&gt;DECLARE @id INT&lt;br /&gt;DECLARE @date DATETIME&lt;br /&gt;DECLARE @Startdate DATETIME&lt;br /&gt;DECLARE @Enddate DATETIME&lt;br /&gt;SET @Startdate = '1950-01-01'&lt;br /&gt;SET @EndDate = '2100-12-31'&lt;br /&gt;SET @id = 0&lt;br /&gt;SET @date = DATEADD(dd, @id, @startdate)&lt;br /&gt;BEGIN TRY&lt;br /&gt;BEGIN TRAN -- Start of a transaction&lt;br /&gt;WHILE @date &lt;= @enddate&lt;br /&gt;BEGIN&lt;br /&gt;INSERT&lt;br /&gt;INTO scbDate&lt;br /&gt;SELECT @date CalendarDate,&lt;br /&gt;DATEPART(dd, @date) CalendarDayMonth,&lt;br /&gt;DATEPART(dy, @date) CalendarDayYear,&lt;br /&gt;DATEPART(dw, @date) CalendarDayWeek,&lt;br /&gt;DATENAME(dw, @date) CalendarDayName,&lt;br /&gt;LEFT(DATENAME(dw, @date),3) CalendarAbbDayName,&lt;br /&gt;CASE&lt;br /&gt;WHEN DATEPART(dw, @date) IN (1,7) THEN&lt;br /&gt;'Y'&lt;br /&gt;ELSE&lt;br /&gt;'N'&lt;br /&gt;END CalendarWeekday,&lt;br /&gt;DATEPART(ww, @date) CalendarWeek,&lt;br /&gt;'Week ' + RIGHT('0' + DATENAME(ww, @date), 2) CalendarWeekName,&lt;br /&gt;DATEPART(mm, @date) CalendarMonth,&lt;br /&gt;DATENAME(mm, @date) CalendarMonthName,&lt;br /&gt;LEFT(DATENAME(mm, @date),3) CalendarAbbMonthName,&lt;br /&gt;DATEPART(qq, @date) CalendarQuarter,&lt;br /&gt;'Q' + DATENAME(qq, @date) + ' ' + DATENAME(yy, @date) CalendarQuarterName,&lt;br /&gt;DATEPART(yy, @date) CalendarYear,&lt;br /&gt;DATEPART(dw, @date) FiscalDayWeek,&lt;br /&gt;DATEPART(yy, @date) FiscalYear,&lt;br /&gt;DATEPART(mm, @date) FiscalPeriod,&lt;br /&gt;DATEPART(ww, @date) FiscalWeek,&lt;br /&gt;DATEPART(qq, @date) FiscalQuarter,&lt;br /&gt;0 CurrentDay,&lt;br /&gt;@LoadId LoadId,&lt;br /&gt;'STA' DataSource&lt;br /&gt;SET @id = @id + 1&lt;br /&gt;SET @date = DATEADD(dd, @id, @startdate)&lt;br /&gt;END&lt;br /&gt;COMMIT TRAN&lt;br /&gt;END TRY&lt;br /&gt;BEGIN CATCH&lt;br /&gt;ROLLBACK TRAN -- Rollback Transaction&lt;br /&gt;END CATCH&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-5265510759732483640?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/5265510759732483640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=5265510759732483640' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5265510759732483640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5265510759732483640'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/07/loading-date-dimension.html' title='Loading Date Dimension'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-432338051420914532</id><published>2007-07-23T12:00:00.000-07:00</published><updated>2007-07-23T12:20:12.503-07:00</updated><title type='text'>Building Dynamic Excel Connection String</title><content type='html'>If you wish to build the Excel connection string dynamically inside SSIS and assign it to Excel Connection Manager you can use the following expression.&lt;br /&gt;&lt;br /&gt;"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::strWorkingFolder] +"\\"+ @[User::strExcelFileName] + ";Extended Properties=\"" + "Excel 8.0;HDR=YES" + "\""+";"&lt;br /&gt;&lt;br /&gt;Where strWorkingFolder and strExcelFileName are user variables. For example, strWorkingFolder = C:\Temp and strExcelFileName = Sales.Xls&lt;br /&gt;&lt;br /&gt;Please note the above syntax is for Excel 97-2003&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-432338051420914532?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/432338051420914532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=432338051420914532' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/432338051420914532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/432338051420914532'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/07/building-dynamic-connection-string.html' title='Building Dynamic Excel Connection String'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-2089954563318342107</id><published>2007-02-22T00:32:00.000-08:00</published><updated>2007-02-22T00:34:25.070-08:00</updated><title type='text'>SQL Server 2005 Best Practices Analyzer</title><content type='html'>All&lt;br /&gt;&lt;br /&gt;SQL Server 2005 Best Practices Analyzer (February 2007 CTP) is available now for &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=DA0531E4-E94C-4991-82FA-F0E3FBD05E63&amp;displaylang=en"&gt;Download&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-2089954563318342107?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/2089954563318342107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=2089954563318342107' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/2089954563318342107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/2089954563318342107'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/02/sql-server-2005-best-practices-analyzer.html' title='SQL Server 2005 Best Practices Analyzer'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-4712182168176679018</id><published>2007-02-19T10:19:00.000-08:00</published><updated>2007-02-19T10:20:38.527-08:00</updated><title type='text'>Download Feb 2007 Books Online</title><content type='html'>There is an updated version (February 2007) of &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=BE6A2C5D-00DF-4220-B133-29C1E0B6585F&amp;displaylang=en"&gt;Books Online &lt;/a&gt;available for &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=BE6A2C5D-00DF-4220-B133-29C1E0B6585F&amp;amp;displaylang=en"&gt;download&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-4712182168176679018?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/4712182168176679018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=4712182168176679018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/4712182168176679018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/4712182168176679018'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/02/download-feb-2007-books-online.html' title='Download Feb 2007 Books Online'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-6753904395566263229</id><published>2007-02-19T10:14:00.000-08:00</published><updated>2007-02-19T10:15:30.972-08:00</updated><title type='text'>SQL Server 2005 SP2 is available for download</title><content type='html'>All&lt;br /&gt;&lt;br /&gt;SP2 is available for &lt;a href="http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/servicepacks/sp2.mspx"&gt;download &lt;/a&gt;now.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-6753904395566263229?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/6753904395566263229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=6753904395566263229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/6753904395566263229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/6753904395566263229'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/02/sql-server-2005-sp2-is-available-for.html' title='SQL Server 2005 SP2 is available for download'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-5835825009656293784</id><published>2007-02-13T01:09:00.000-08:00</published><updated>2008-11-12T17:40:32.577-08:00</updated><title type='text'>OLE DB Source - SQL Command</title><content type='html'>I came across something simple on OLE DB Source last week. I was using “SQL Command” as Data Access Mode. Most of source SQL statements were simple, such as&lt;br /&gt;&lt;br /&gt;SELECT oid,baseid&lt;br /&gt;FROM STG_PAS99&lt;br /&gt;WHERE baseid = ?&lt;br /&gt;&lt;br /&gt;For the above SQL I can pass a parameter without any problem.&lt;br /&gt;&lt;br /&gt;For one reason or the other I had to write a source SQL something like this. Yes I do know that I don’t need inside parameter if I have one outside. I am using it to explain my point plus it does improve performance.&lt;br /&gt;&lt;br /&gt;SELECT oid,baseid&lt;br /&gt;FROM STG_PAS99&lt;br /&gt;INNER JOIN (&lt;br /&gt;SELECT MAX(loaded), oid, baseid&lt;br /&gt;FROM STG_PAS99&lt;br /&gt;WHERE baseid = ?&lt;br /&gt;GROUP BY oid, baseid&lt;br /&gt;)&lt;br /&gt;WHERE baseid = ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If I enter the above SQL into “SQL Command Text” and click on Parameters I got the following message&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5030944406214634722" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_corBkvwgDB0/RdGBSEkpbOI/AAAAAAAAAAM/4IbuvFQVM9w/s320/SQLSourceError.JPG" border="0" /&gt; &lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;As the error message suggests I used the SQL Command from variable to get around that issue. If you don’t know how to do that please have a look at &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2005/12/09/SSIS_3A00_-Using-dynamic-SQL-in-an-OLE-DB-Source-component.aspx"&gt;Jamie’s Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-5835825009656293784?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/5835825009656293784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=5835825009656293784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5835825009656293784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5835825009656293784'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/02/ole-db-source-sql-command.html' title='OLE DB Source - SQL Command'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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/_corBkvwgDB0/RdGBSEkpbOI/AAAAAAAAAAM/4IbuvFQVM9w/s72-c/SQLSourceError.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19716801.post-5186988564811850822</id><published>2007-02-12T03:33:00.000-08:00</published><updated>2007-02-12T03:28:52.308-08:00</updated><title type='text'>64 Bit Oracle Issues</title><content type='html'>One my friends has done a brilliant post on 64 bit Oracle drivers and connectivity issues. Well worth having a read.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://stevemchugh.blogspot.com/2007/02/adventures-of-ssis-and-oracle-in-64bit.html"&gt;http://stevemchugh.blogspot.com/2007/02/adventures-of-ssis-and-oracle-in-64bit.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-5186988564811850822?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/5186988564811850822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=5186988564811850822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5186988564811850822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/5186988564811850822'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/02/64-bit-oracle-issues.html' title='64 Bit Oracle Issues'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-117101007511801724</id><published>2007-02-09T00:34:00.000-08:00</published><updated>2007-02-09T00:34:35.360-08:00</updated><title type='text'>One Day Maybe....</title><content type='html'>I dont like E-Bay. I think they charge too much.&lt;br /&gt;&lt;br /&gt;Hopefully there is someone emerging in the market.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mobadoo.com/pages/home/home.aspx"&gt;http://www.mobadoo.com/pages/home/home.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-117101007511801724?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/117101007511801724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=117101007511801724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/117101007511801724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/117101007511801724'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2007/02/one-day-maybe.html' title='One Day Maybe....'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115459539340651396</id><published>2006-08-03T01:48:00.000-07:00</published><updated>2006-08-03T01:58:48.873-07:00</updated><title type='text'>Executing Batch Files Using SQL Agent</title><content type='html'>I wrote a simple batchfile which takes a copy of our source files. I wanted to execute that via SQL Server Agent. Batchfile works fine when I execute on a command prompt.&lt;br /&gt;&lt;br /&gt;To get the batch file to execute via SQL Agent I have to use CALL command.&lt;br /&gt;&lt;br /&gt;In my scenario&lt;br /&gt;&lt;strong&gt;CALL E:\Data\FTP\CopySourceFiles\SourceFile_Backup.bat&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115459539340651396?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115459539340651396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115459539340651396' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115459539340651396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115459539340651396'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/08/executing-batch-files-using-sql-agent.html' title='Executing Batch Files Using SQL Agent'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115443242296141098</id><published>2006-08-01T04:37:00.000-07:00</published><updated>2006-08-01T04:40:23.550-07:00</updated><title type='text'>Shredding Recordset Object In ForEach Loop - While Using Checkpoint - Bug Fixed</title><content type='html'>Following my &lt;a href="http://tsutha.blogspot.com/2006/05/shredding-recordset-object-in-foreach.html"&gt;earlier post&lt;/a&gt;, I raised a bug and I have been informed my Microsoft Connect team this bug has been fixed and the fix will be available on SP2. Quote from MS Connect below:&lt;br /&gt;&lt;br /&gt;"The bug was identified as a same known issue which was fixed already for our next release, however, after considering the problems involved in this bug issue, we decided to also port the fix into our next Yukon service pack, SP2. You should be able to get the fix after applying SP2."&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115443242296141098?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115443242296141098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115443242296141098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115443242296141098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115443242296141098'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/08/shredding-recordset-object-in-foreach.html' title='Shredding Recordset Object In ForEach Loop - While Using Checkpoint - Bug Fixed'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115441340802175178</id><published>2006-07-31T23:14:00.000-07:00</published><updated>2006-07-31T23:23:28.470-07:00</updated><title type='text'>Why am I Processing Index Separately?</title><content type='html'>Someone asked me why am I processing index separately in my &lt;a href="http://tsutha.blogspot.com/2006/07/processing-dimensions-partions-and-re.html"&gt;earlier post&lt;/a&gt;. Why didn't I do it inside the first measure group foreach loop.&lt;br /&gt;&lt;br /&gt;Yes, it would have worked.&lt;br /&gt;&lt;br /&gt;There is a reason for splitting it up, is because that we have a measure group with billions of rows. Building aggregations on that measure group will take some time. I do not want to hold rest of the measure group partition processing.&lt;br /&gt;&lt;br /&gt;Therefore I process the cubes first and make them available to users as quickly as possible and then build the aggregations. I have informed the users that some of the reports might not run as fast as you would expect straight after refreshing the data, until the aggregations are rebuilt.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115441340802175178?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115441340802175178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115441340802175178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115441340802175178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115441340802175178'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/07/why-am-i-processing-index-separately.html' title='Why am I Processing Index Separately?'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115435836946882623</id><published>2006-07-31T07:08:00.000-07:00</published><updated>2006-07-31T08:11:14.640-07:00</updated><title type='text'>Processing Dimensions, Partions and Re-Building Aggregations</title><content type='html'>This package is very similar what Jamie has already &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2006/07/18/4235.aspx"&gt;posted&lt;/a&gt;. I have written a simple package which process all dimensions and process 3 specific partitions (current fiscal period, current fiscal period -1 and current fiscal period -2).&lt;br /&gt;&lt;br /&gt;Once I have processed all the dimensions and 3 partitions in selected measure groups, I rebuild aggregations (using Process Index) for each measure group.&lt;br /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/1906/1957/320/Processing.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;I have used XMLA and Execute DDL statement tasks to achieve this.&lt;br /&gt;&lt;br /&gt;You can download the sample package from &lt;a href="http://www.smart-bi-solutions.com/BlogStuff/Pkg_Cub_ProcessDimPart.zip"&gt;here&lt;/a&gt;. Please note that I have set DelayValidation = TRUE, to avoid any errors.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115435836946882623?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115435836946882623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115435836946882623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115435836946882623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115435836946882623'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/07/processing-dimensions-partions-and-re.html' title='Processing Dimensions, Partions and Re-Building Aggregations'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115433314562535428</id><published>2006-07-31T00:52:00.000-07:00</published><updated>2006-07-31T01:06:55.916-07:00</updated><title type='text'>Gotcha When You Process Update Dimensions</title><content type='html'>We can process cube related members via DDL statements. &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2006/07/18/4235.aspx"&gt;Jamie posted&lt;/a&gt; a simple package which process all the dimensions and measure groups.&lt;br /&gt;&lt;br /&gt;Jamie followed it with a &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=582974&amp;SiteID=1&amp;amp;mode=1"&gt;question&lt;/a&gt; in the forum and did a &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2006/07/26/4272.aspx"&gt;post&lt;/a&gt;. I got interested in that and followed the thread and got it confirmed the following:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;If your do process update on dimensions you are likely to lose aggregation on the cube.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;You have to re-build aggregations using "Process Index" option.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I will post a simple package later on today which process all dimensions, specific partitions in a given measure group and finally it will build the aggregations for the cube.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115433314562535428?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115433314562535428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115433314562535428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115433314562535428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115433314562535428'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/07/gotcha-when-you-process-update.html' title='Gotcha When You Process Update Dimensions'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115372292047073743</id><published>2006-07-23T23:33:00.000-07:00</published><updated>2006-07-23T23:35:20.736-07:00</updated><title type='text'>64 Bit Performance Issue Resolved</title><content type='html'>With the hotfix from Microsoft we have resolved this issue. It was a bug, which was fixed with  hotfix. If anyone has performance issue contact Microsoft and get hotfix.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115372292047073743?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115372292047073743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115372292047073743' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115372292047073743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115372292047073743'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/07/64-bit-performance-issue-resolved.html' title='64 Bit Performance Issue Resolved'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115289618659390844</id><published>2006-07-14T09:51:00.000-07:00</published><updated>2006-07-14T09:56:26.890-07:00</updated><title type='text'>Continuing on 64 bit SSIS issues - Hopefully Resolved</title><content type='html'>Using the example I have posted on my &lt;a href="http://tsutha.blogspot.com/2006/07/sample-project-package-to-re-pro-64.html"&gt;previous post&lt;/a&gt;, Microsoft have reproduced the issue I have had on a 64 bit platform.&lt;br /&gt;&lt;br /&gt;Infact some of the issues were identified before. Microsoft have been working on the solution for last couple of months (service pack 2). Microsoft released a hot fix (which is not available for public yet, I dont know when it will be available either) for us to test.&lt;br /&gt;&lt;br /&gt;After initial testing the hotfix seems to have resolved the issue on a 64 bit box. I will be doing an extensive testing on Monday and will post my findings.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115289618659390844?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115289618659390844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115289618659390844' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115289618659390844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115289618659390844'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/07/continuing-on-64-bit-ssis-issues.html' title='Continuing on 64 bit SSIS issues - Hopefully Resolved'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115227121824578565</id><published>2006-07-07T04:18:00.000-07:00</published><updated>2006-07-07T04:39:51.030-07:00</updated><title type='text'>Sample Project / Package to Re-Pro 64 Bit Issue</title><content type='html'>Microsoft said, they couldn't reproduce the problem from Scratch, but I have.  I have sent it to MS as well. I have attached the whole project (with all the packages) and configuration files.&lt;br /&gt;&lt;br /&gt;Master Package&lt;br /&gt;[1] Creates a simple table in tempdb database if it doesn't exist else it will truncate the table.&lt;br /&gt;[2] It will populate 25 records into that table.&lt;br /&gt;[3] SQL will get those 25 records and assign them to a Object variable.&lt;br /&gt;[4] Foreach Loop (ADO) and set the values of each row to couple of variables. Inside that foreach I have an execute package task, which will call another package (in this case Pkg_Sample25.dtsx)&lt;br /&gt;&lt;br /&gt;I have got 52 packages in this project. All the packages except Pkg_Master is exactly same. They all have one single Execute SQL Task, which has a SQL statement as "SELECT 1".&lt;br /&gt;&lt;br /&gt;Every package has connections for all 51 packages and 55 flat files. All these are configured in the configuration file (64BitConfig.dtsConfig) which is located in a directory called "C:\RePro\Config". Please note you would need to change servername in the configuration file before you execute the package. You will need to change flat file directory and packages directory if you put them anywhere other than "C:\RePro".&lt;br /&gt;&lt;br /&gt;If I run a package called "Pkg_Master" on my laptop (32 bit), it executes under 50 seconds. If I execute same package on a 64bit machine it executes just under 7 minutes (6min 42 Secs).&lt;br /&gt;&lt;br /&gt;If anyone wish to download the sample project and try it on there 64 bit box, you can do it from &lt;a href="http://www.smart-bi-solutions.com/BlogStuff/RePro.zip"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115227121824578565?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115227121824578565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115227121824578565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115227121824578565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115227121824578565'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/07/sample-project-package-to-re-pro-64.html' title='Sample Project / Package to Re-Pro 64 Bit Issue'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115149570520148115</id><published>2006-06-28T03:57:00.000-07:00</published><updated>2006-06-28T06:08:43.263-07:00</updated><title type='text'>Rambling on about 64 bit issue I had...</title><content type='html'>I have done various tests. I developed a simple package (which moves files from source directory to working directory) to test timing against RTM, and the same process against SP1 and then Hotfix. The differences were negligible, between different builds. So I opened my original package and disabled all the tasks except the one I have built in the simple package and executed it and the difference was huge.&lt;br /&gt;&lt;br /&gt;Simple package took around ~ 18 seconds to moves files etc where my master package took around ~ 270 seconds. Infact it was 15 times slower.&lt;br /&gt;&lt;br /&gt;Then I went back drawing board as they say and looked at what was going on, specially what are the differences between simple package against the master package originally developed. My first instinct was event handlers and I disabled them and the performance was negligible . Second thought was transaction and that didn't make any difference. Next thing came to my mind was checkpoint and that wasn't an issue either. At this point I was going mad.....!!!!!!&lt;br /&gt;&lt;br /&gt;While checking both packages visually I noticed something quite different. The simple package has only 2 connections where the master package had quite a few (close to 100 connections). Then I reproduced it and it seems to be the problem.&lt;br /&gt;&lt;br /&gt;So, my initial conclusion is that Execute Package Task seems to be resolving package configurations each time it loads / execute a package on a 64 Bit environment. The behaviour seems to be totally different on a 32 bit environment.&lt;br /&gt;&lt;br /&gt;We have logged a call with MS about this.&lt;br /&gt;&lt;br /&gt;Keep you posted.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115149570520148115?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115149570520148115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115149570520148115' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115149570520148115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115149570520148115'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/06/rambling-on-about-64-bit-issue-i-had.html' title='Rambling on about 64 bit issue I had...'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115104787283407970</id><published>2006-06-23T00:23:00.000-07:00</published><updated>2006-06-23T00:31:12.926-07:00</updated><title type='text'>SSIS Performance on 64 Bit Sucks....</title><content type='html'>&lt;strong&gt;I have been working on a project last few months. I have developed the project on my laptop, which is resonably powerful. It runs through fine within 9 mins with sample data set.  If I replicate the same environment on a 64 Bit machine with 32 Bit Win 2003 and SP1, it takes just over 7 mins. If I rerun it on a 64 Bit machine with 64 Bit Win 2003, it takes between 21 and 24 mins. Executing the packages via dtexec on a command prompt.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I have got "Run64BitRunTime" set to "True". I dont know any other settings I should watch out when executing on 64 Bit.&lt;br /&gt;&lt;br /&gt;My laptop(dual core) has 2 GB of memory. This server has 16GB of memory. Server is 4 way Dual Core box.&lt;br /&gt;&lt;br /&gt;I have few things running on my laptop, where server is absolutely dead, nothing is happening on it. Only difference is that the source files, databases are on C: of my machine, where source files are on C: on the server, but the databases are on different disk and one of the source database (ODS) is on the different server all together.&lt;br /&gt;&lt;br /&gt;I am running exactly same packages on my laptop and dev server.&lt;br /&gt;My packages uses various componts such as OLE DB Source, OLE DB Destination, SQL Server Destination, Lookup, Merge, Sort, Aggregate, Script Task, SQL Task, Execute Package Task, For Each Loop, Data Conversion, Derived Column, RowCount, Union All, OLE DB Command, Conditional Split, Multicast and CHECKSUM.&lt;br /&gt;&lt;br /&gt;I audit my packages via event handler. I execute SQL Task to insert record into a table on PreExecute, PostExecute and OnError. I also use Checksum from Darren &amp; Allan. I don't think that's the problem as everything is slow in general.&lt;br /&gt;&lt;br /&gt;We are trying various options and we are speaking to Microsoft as well. As we uncover more things I will update my blog.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115104787283407970?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115104787283407970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115104787283407970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115104787283407970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115104787283407970'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/06/ssis-performance-on-64-bit-sucks.html' title='SSIS Performance on 64 Bit Sucks....'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-115104700417558769</id><published>2006-06-23T00:07:00.000-07:00</published><updated>2006-06-23T00:21:12.006-07:00</updated><title type='text'>UK BI UserGroup Meeting</title><content type='html'>Last night we had a successful first BI user group meeting at Microsoft Reading. Turn out for the meeting was excellent. Most of the BI consultancy representatives were there.&lt;br /&gt;&lt;br /&gt;At last I have met people like &lt;a href="http://blogs.conchango.com/jamiethomson/"&gt;Jamie Thomson&lt;/a&gt; and &lt;a href="http://blogs.conchango.com/christianwade/"&gt;Christian Wade&lt;/a&gt; face to face after speaking to them for a long time on the web.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cwebbbi.spaces.msn.com/PersonalSpace.aspx"&gt;Chris Webb&lt;/a&gt;, &lt;a href="http://www.markhill.org/blog"&gt;Mark Hill&lt;/a&gt; and &lt;a href="http://sqljunkies.com/WebLog/simons/default.aspx"&gt;Simon Sabin&lt;/a&gt; presentations were excellent. Hopefully we can have more sessions like this.&lt;br /&gt;&lt;br /&gt;Slides and sample codes from this session will be available soon @ &lt;a href="http://www.sqlserverfaq.com/"&gt;SQL Server User Group&lt;/a&gt; site.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-115104700417558769?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/115104700417558769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=115104700417558769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115104700417558769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/115104700417558769'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/06/uk-bi-usergroup-meeting.html' title='UK BI UserGroup Meeting'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114951704258470501</id><published>2006-06-05T07:07:00.000-07:00</published><updated>2006-06-05T07:22:41.930-07:00</updated><title type='text'>Upgrade to SQL Server 2005</title><content type='html'>If you are going upgrade from SQL Server 7 / 2000 to SQL Sercer 2005 you are highly recommended to use the following tools before you upgrade.&lt;br /&gt;&lt;br /&gt;You have to run the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6107C27A-662C-4319-AFE7-B52D1568C30A&amp;displaylang=en"&gt;Microsoft Upgrade Advisor&lt;/a&gt; which can be downloaded free. Microsoft SQL Server 2005 Upgrade Advisor analyzes instances of SQL Server 7.0 and SQL Server 2000 in preparation for upgrading to SQL Server 2005. Upgrade Advisor identifies deprecated features and configuration changes that might affect your upgrade, and it provides links to documentation that describes each identified issue and how to resolve it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.scalabilityexperts.com/"&gt;Scalability Experts&lt;/a&gt; have developed a great tool, which helps you during upgrade process. You can download the &lt;a href="http://www.scalabilityexperts.com/default.asp?action=article&amp;amp;ID=320"&gt;SQL Server Upgrade Assistant&lt;/a&gt; for free. This tool analyses the impact associated with upgrading SQL Server 2000 installation to SQL Server 2005.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114951704258470501?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114951704258470501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114951704258470501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114951704258470501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114951704258470501'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/06/upgrade-to-sql-server-2005.html' title='Upgrade to SQL Server 2005'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114949533467455862</id><published>2006-06-05T01:11:00.000-07:00</published><updated>2006-06-05T01:21:08.756-07:00</updated><title type='text'>Cross database ownership chaining</title><content type='html'>One of the Gotcha when you migrate a database from SQL 2000 to SQL 2005 "Cross database ownership chaining" is turned off by default.&lt;br /&gt;&lt;br /&gt;You would need to enable it manually once you have restored the database.&lt;br /&gt;&lt;br /&gt;This option is available under "Server Properties" in "Security" tab.&lt;br /&gt;&lt;br /&gt;You can either Execute the SQL below or you can change the server property using Management Studio.&lt;br /&gt;&lt;strong&gt;EXEC SP_DBOPTION "(DB Name)&lt;db&gt;&lt;db&gt;","DB CHAINING", "TRUE"&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If you wish to check is the database chaining is ON / OFF you can using the following statement&lt;br /&gt;&lt;strong&gt;EXEC SP_DBOPTION "(DB Name)&lt;db&gt;&lt;db&gt;","DB CHAINING"&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114949533467455862?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114949533467455862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114949533467455862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114949533467455862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114949533467455862'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/06/cross-database-ownership-chaining.html' title='Cross database ownership chaining'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114927959844764104</id><published>2006-06-02T13:06:00.000-07:00</published><updated>2006-06-02T13:20:37.703-07:00</updated><title type='text'>SQL Server 2005 Directory Structure</title><content type='html'>Nothing too serious, it is something everyone need to be aware.&lt;br /&gt;&lt;br /&gt;Generally if you have full / default installation you will get the directory structure like shown below:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/1906/1957/1600/DefaultStructure.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/1906/1957/320/DefaultStructure.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When you conduct default installation SQL Server (data / backup etc) will be installed MSSQL.1 directory. Analysis Services related stuff in MSSQL.2 dorectory and Reporting Services related stuff in MSSQL.3 directory.&lt;br /&gt;&lt;br /&gt;What you have to be aware is that for example if you just install Analysis Services on a new server it will install under MSSQL.1 directory. On the other hand if you install another instance of SQL Server, Analysis Server and Reporting Server in the above scenario, they will get MSSQL.4, MSSQL.5 and MSSQL.6 directory as 1,2 and 3 already exists as shown above.&lt;br /&gt;&lt;br /&gt;Specially you have to be aware if you use within your application / reports where Reporting Services sits etc.&lt;br /&gt;&lt;br /&gt;The directory names would differ between servers depending on installation.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114927959844764104?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114927959844764104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114927959844764104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114927959844764104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114927959844764104'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/06/sql-server-2005-directory-structure.html' title='SQL Server 2005 Directory Structure'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114908384980652571</id><published>2006-05-31T06:48:00.000-07:00</published><updated>2006-05-31T06:57:30.016-07:00</updated><title type='text'>Partitions &amp; Identity Columns</title><content type='html'>&lt;u&gt;Question&lt;/u&gt;&lt;br /&gt;When I switch the data to the main table partition, it is ignoring the Identity specification column on and duplicating the values in the Identity column.&lt;br /&gt;&lt;br /&gt;I did a search on Books on Line and all I could see is Performing partition switching can introduce duplicate values in IDENTITY columns of the target table, and gaps in the values of IDENTITY columns in the source table. Use DBCC_CHECKIDENT to check the identity values of your tables and correct the values if you want. But it doesn't tell me how to use DBCC_CHECKIDENT.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Answer &lt;/u&gt;&lt;br /&gt;When you are inserting data into your empty table, reseed that table before you start with the max+1 value from the main table, a quick query should work that out.&lt;br /&gt;&lt;br /&gt;Insert your data and then push it into your main table, no issues.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Scenario&lt;/u&gt;&lt;br /&gt;My table partition is based on the date. I've created my Temp tables dynamically based on the date. And before inserting the records into Temp table I've retrieved the (max + 1) value of the Identity column from the main table and reseeded the Identity of the Temp table with DBCC CHECKIDENT&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114908384980652571?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114908384980652571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114908384980652571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114908384980652571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114908384980652571'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/05/partitions-identity-columns.html' title='Partitions &amp; Identity Columns'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114862985113136062</id><published>2006-05-26T00:44:00.000-07:00</published><updated>2006-05-26T00:53:25.300-07:00</updated><title type='text'>Kimball Group Webcasts - MSEevents</title><content type='html'>Following their &lt;a href="http://www.msftdwtoolkit.com/"&gt;book&lt;/a&gt; on SQL Server 2005, &lt;a href="http://www.kimballgroup.com/"&gt;Kimball group&lt;/a&gt; is going to conduct 4 TechNet webcasts. It should be well worth listening material. You can rigister for those webcasts using the links below:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032297084&amp;Culture=en-US"&gt;Microsoft Business Intelligence (BI) Using the Kimball Method&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032297070&amp;amp;Culture=en-US"&gt;Designing a Scalable Data Warehouse / Business Intelligence (DW/BI) System&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032297072&amp;EventCategory=4&amp;amp;culture=en-US&amp;CountryCode=US"&gt;Using SQL Server 2005 Integration Services to Populate a Kimball Method Data Warehouse&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032297086&amp;amp;Culture=en-US"&gt;Getting Started with Data Mining&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114862985113136062?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114862985113136062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114862985113136062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114862985113136062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114862985113136062'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/05/kimball-group-webcasts-mseevents.html' title='Kimball Group Webcasts - MSEevents'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114802191349353510</id><published>2006-05-18T23:28:00.000-07:00</published><updated>2006-05-18T23:58:34.093-07:00</updated><title type='text'>Shredding Recordset Object In ForEach Loop - While Using Checkpoint</title><content type='html'>I think this got to be one of the annoying bugs within SSIS.&lt;br /&gt;&lt;br /&gt;I have a SQL Task which returns the result set to a variable called "Pkg_Obj_ResultRet".&lt;br /&gt;&lt;br /&gt;Then using Foreach Loop container I shredd the result set. I have a Foreach ADO Enumerator and the Enumeration Mode is set to Rows in the first table. Shredded results are mapped to 2 variables called Pkg_Str_SSISStreamName and Pkg_Str_SSISVarNameControlFile.&lt;br /&gt;&lt;br /&gt;Inside Foreach Loop Container I have "Execute Package Task" which execute package using these variables. Here comes the fun.&lt;br /&gt;&lt;br /&gt;The iteration works fine first time, runs the second iteration successfully and then it try to run second iteration in an infinite loop.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;This happens when you have &lt;u&gt;SaveCheckPoints&lt;/u&gt; option set to &lt;u&gt;True&lt;/u&gt;. If you want to use checkpoint, you can't get this to work unless you set the Foreach Loop &lt;u&gt;TransactionOption = Required&lt;/u&gt;. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I think this is a bug and I have raised it with Microsoft.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114802191349353510?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114802191349353510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114802191349353510' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114802191349353510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114802191349353510'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/05/shredding-recordset-object-in-foreach.html' title='Shredding Recordset Object In ForEach Loop - While Using Checkpoint'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114796328369453985</id><published>2006-05-18T07:36:00.000-07:00</published><updated>2006-05-18T07:43:37.720-07:00</updated><title type='text'>Cumulative hotfix package (build 2153) for SQL Server 2005</title><content type='html'>As we all know there were we some issues with SP1. Microsoft released hotfix package, which can be downloaded from &lt;a href="http://support.microsoft.com/default.aspx/kb/918222"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114796328369453985?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114796328369453985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114796328369453985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114796328369453985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114796328369453985'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/05/cumulative-hotfix-package-build-2153.html' title='Cumulative hotfix package (build 2153) for SQL Server 2005'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114784924698407859</id><published>2006-05-16T23:53:00.000-07:00</published><updated>2006-05-17T00:06:42.736-07:00</updated><title type='text'>Getting SSIS Packages To Run On A 64 Bit Box</title><content type='html'>We had some serious issues getting the SSIS packages to run on a 64 Bit platform which connects to Oracle database.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://markiehill.blogspot.com/"&gt;Mark Hill&lt;/a&gt; managed to get this bloddy thing to work. He wrote a simple document explaining what he did. I thought I would share it with all of you.&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------&lt;br /&gt;When we first approached this, I would have thought it should have been as easy as installing the 64 bit drivers from the Oracle CD and then copying a package across and running it.&lt;br /&gt;&lt;br /&gt;This approach did not work, no matter which driver was selected at design time (Oracle Client, Dot Net Provider etc) we could not establish a connection.&lt;br /&gt;&lt;br /&gt;When opening up the package on the server with the BIDS environment we found that we were getting bad image messages or init failures for the driver from the design dialog.&lt;br /&gt;&lt;br /&gt;Going back to basics, I thought this through a little.&lt;br /&gt;&lt;br /&gt;If BIDS is a 32 bit process (which it is), it cannot load the 64 bit drivers, therefore that would go someway to explaining the bad image error message.&lt;br /&gt;&lt;br /&gt;Solution?! Let’s try and install the 32 bit Oracle client on the 64 bit box.&lt;br /&gt;&lt;br /&gt;Install worked, however the 32bit drivers also failed to load under BIDS.&lt;br /&gt;&lt;br /&gt;By this time I was pulling my hair out for real.&lt;br /&gt;&lt;br /&gt;Next we developed a package on the 32bit laptop, was sure to choose the Oracle driver, copy it across and run it. No, the 64 bit run time of SSIS cannot run this package.&lt;br /&gt;&lt;br /&gt;Back to the drawing board (web search)&lt;br /&gt;&lt;br /&gt;Three pieces of interesting information (there is actually four)&lt;br /&gt;&lt;br /&gt;1) There are two versions of SSIS installed on a 64 bit by default, one in x86 programs and the other in programs&lt;br /&gt;2) The 32 bit Oracle drivers do not like x86 in their path name (may explain the odd 32 bit driver errors under BIDS)&lt;br /&gt;3) A package can be told which subsystem to use, package properties, 32 bit or 64 bit.&lt;br /&gt;4) If you use scripting code, ensure that the flag is set in the properties to allow dynamic recompile, or else you will get an error message loading the vbscript code on 64 bit.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Reality&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Well there are two versions of SSIS, which you can run from the command line prompt, dtsexec.exe, if you use the /f option then you will be able to specify a filename for it to run.&lt;br /&gt;&lt;br /&gt;The dynamic code flag, sometimes does not work, if you have this problem, open the package on the 64bit box and then resave it.&lt;br /&gt;&lt;br /&gt;Eventually after all of this we were able to copy across a package and get it to work accessing an Oracle box.&lt;br /&gt;&lt;br /&gt;All in all a bloody nightmare.&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Thanks Mark&lt;br /&gt;&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114784924698407859?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114784924698407859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114784924698407859' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114784924698407859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114784924698407859'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/05/getting-ssis-packages-to-run-on-64-bit.html' title='Getting SSIS Packages To Run On A 64 Bit Box'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19716801.post-114709413036805790</id><published>2006-05-08T06:07:00.000-07:00</published><updated>2006-05-08T06:17:47.356-07:00</updated><title type='text'>First BI User Group Session</title><content type='html'>BI User group has been set up by &lt;a href="http://spaces.msn.com/cwebbbi/"&gt;Chris Webb&lt;/a&gt; and Tony Rogerson. The first meeting is set for 22/06/2006. Register &lt;a href="http://www.sqlserverfaq.com/"&gt;here&lt;/a&gt; if you wish to attend. Look forward to see you there.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114709413036805790?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114709413036805790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114709413036805790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114709413036805790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114709413036805790'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/05/first-bi-user-group-session.html' title='First BI User Group Session'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114672687886095798</id><published>2006-05-04T00:05:00.000-07:00</published><updated>2006-05-04T00:24:30.056-07:00</updated><title type='text'>Installing SQL2005 SP1 - checking for locked files via Windows Installer file sqlrun_sql.msp</title><content type='html'>Please note that you have to shutdown all the services except SQL Server service, before you start SP1 installation.&lt;br /&gt;&lt;br /&gt;When I tried to install SP1 yesterday I came across a small problem. I had all SQL related services shutdown, except SQL Server service (It is required to run when SP1 installation starts - Installation process will shut SQL Server service later on during installation). I came across this problem. During Database Services, installation process hung stating the following message.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;checking for locked files via Windows Installer file sqlrun_sql.msp&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;I tried few things and couldn't get it to work.&lt;br /&gt;&lt;br /&gt;Eventually I moved all the user created database files (MDF and LDF) to a different directory from SQL Data directory (in my case - C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data) to a temp directory.&lt;br /&gt;&lt;br /&gt;Then I re-installed SP1 and it went through without any problems.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114672687886095798?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114672687886095798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114672687886095798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114672687886095798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114672687886095798'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/05/installing-sql2005-sp1-checking-for.html' title='Installing SQL2005 SP1 - checking for locked files via Windows Installer file sqlrun_sql.msp'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114612770219406712</id><published>2006-04-27T01:31:00.000-07:00</published><updated>2006-04-27T01:55:47.366-07:00</updated><title type='text'>2 Digit Date Format in SSIS</title><content type='html'>If I run the following SQL into SQL Server via SSMS it will load "31-DEC-49" as 2049-12-31.&lt;br /&gt;&lt;strong&gt;INSERT&lt;br /&gt;INTO Stg_StockProductCostPrice&lt;br /&gt;VALUES (0,9999,0.99,'15-NOV-75','31-DEC-49')&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;But if I have the same data in a file and load it via SSIS it is loading into the database as 1949-12-31, instead of 2049-12-31.&lt;br /&gt;&lt;br /&gt;There is a property called "Two Digit Year Cutoff" against the server. It is defaulted to 2049.&lt;br /&gt;&lt;br /&gt;SSIS uses the Windows settings. The work around is to use derived column and get what you wanted as shown below:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;(DT_DBTIMESTAMP) (SUBSTRING(CostPriceEndDate, 1, 7) + ((DT_I2)SUBSTRING(CostPriceEndDate, 8, 2) &gt; 10 ? "19" : "20") + SUBSTRING(CostPriceEndDate, 8, 2))&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;**** PLEASE READ BELOW IF YOU HAVE SQL 2005 SP1 ****&lt;br /&gt;&lt;br /&gt;http://wiki.sqlis.com/default.aspx/SQLISWiki/DateConversions.html&lt;br /&gt;&lt;a href="http://blogs.conchango.com/jamiethomson/archive/2006/04/26/3870.aspx"&gt;http://blogs.conchango.com/jamiethomson/archive/2006/04/26/3870.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114612770219406712?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114612770219406712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114612770219406712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114612770219406712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114612770219406712'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/04/2-digit-date-format-in-ssis.html' title='2 Digit Date Format in SSIS'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114603951225475028</id><published>2006-04-26T01:15:00.001-07:00</published><updated>2006-04-26T23:51:33.636-07:00</updated><title type='text'>SQL 2005 Service Pack 1 and April Books Online Available</title><content type='html'>&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=cb6c71ea-d649-47ff-9176-e7cac58fd4bc&amp;DisplayLang=en"&gt;Service pack1&lt;/a&gt; has been available for download few days now.  Brian Knight has listed the enhancements / features related to SSIS which can be found &lt;a href="http://whiteknighttechnology.com/cs/blogs/brian_knight/archive/2006/04/20/150.aspx"&gt;here&lt;/a&gt;.  You can get the full details from the following knowledge base articles &lt;a class="external" href="http://support.microsoft.com/kb/913090" target="_blank"&gt;KB 913090&lt;/a&gt; and &lt;a class="external" href="http://support.microsoft.com/default.aspx/kb/916940?" target="_blank"&gt;KB 916940&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL 2005 Books Online (April 2006) is available now for &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=be6a2c5d-00df-4220-b133-29c1e0b6585f&amp;amp;DisplayLang=en"&gt;download&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114603951225475028?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114603951225475028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114603951225475028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114603951225475028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114603951225475028'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/04/sql-2005-service-pack-1-and-april_26.html' title='SQL 2005 Service Pack 1 and April Books Online Available'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114579888131496075</id><published>2006-04-23T05:46:00.000-07:00</published><updated>2006-04-23T06:28:01.343-07:00</updated><title type='text'>Persistent Teams Up With Microsoft SSIS</title><content type='html'>Following up my earlier &lt;a href="http://tsutha.blogspot.com/2006/02/performance-when-loading-data-into.html"&gt;post&lt;/a&gt; about Oracle connector performance within SSIS, Persistent have released a press release, which can be found &lt;a href="http://www.efytimes.com/fullnews.asp?edid=11170"&gt;here&lt;/a&gt;. They have implemented their custom component at Moffit Cancer Centre.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114579888131496075?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114579888131496075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114579888131496075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114579888131496075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114579888131496075'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/04/persistent-teams-up-with-microsoft.html' title='Persistent Teams Up With Microsoft SSIS'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114413607618000427</id><published>2006-04-04T00:28:00.000-07:00</published><updated>2006-04-04T00:37:09.696-07:00</updated><title type='text'>Microsoft Bought ProClarity</title><content type='html'>Microsoft annouced yesterday that they have acquired Proclarity.  You can access the press release &lt;a href="http://www.microsoft.com/presspass/press/2006/apr06/04-03ProClarityPR.mspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Where does this leave Panorama and IntelligentApps. Microsoft might give at least some of it free.&lt;br /&gt;&lt;br /&gt;Very interesting move by MS.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114413607618000427?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114413607618000427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114413607618000427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114413607618000427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114413607618000427'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/04/microsoft-bought-proclarity.html' title='Microsoft Bought ProClarity'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114382153653607413</id><published>2006-03-31T07:13:00.000-08:00</published><updated>2006-03-31T08:13:41.640-08:00</updated><title type='text'>TransactionOption In SSIS</title><content type='html'>I had a 3 simple packages get called from master package. First package populates time dimension (stored proc), second one populates transaction type dimension(stored proc) and the final one populates date dimension.&lt;br /&gt;&lt;br /&gt;I set the TransactionOption = Required in the Master package, every thing else (package &amp;amp; component) set TransactionOption = Supported.&lt;br /&gt;&lt;br /&gt;I have been testing transactions, basically I made time and transaction type dimension to fail and the package did roll back. I am stuck in the date dimension.Within Date dimension I got a stored procedure which populates calendar date attributes into Wrk_Date table. Then I have a data flow task which reads from thats working table, but it cant access it. I tried running SP_WHO2 command, and the status is SUSPENDED, being blocked by id -2.&lt;br /&gt;&lt;br /&gt;I was going through step by step and identified the reason for locks. During step 2, if date table exist in stage database it TRUNCATES the table else it creates the table. Truncate statement seems to hold the lock and it is not releasing it further down the line. I have managed to get the rollback to work after removing truncate.&lt;br /&gt;&lt;br /&gt;Therefore conclusion is you can't have Truncate and cant populate the same table in a single transaction in SSIS.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114382153653607413?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114382153653607413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114382153653607413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114382153653607413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114382153653607413'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/03/transactionoption-in-ssis.html' title='TransactionOption In SSIS'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114292833739381521</id><published>2006-03-20T23:25:00.000-08:00</published><updated>2006-03-21T00:05:37.433-08:00</updated><title type='text'>Most Powerful Sort Component So Far</title><content type='html'>As everyone knows the SSIS sort component out of the box is not known for its higher performance. There are couple of third party Sort components available.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ExtraSort&lt;/strong&gt; component was available for a while. It is a freeware. You can access ExtraSort &lt;a href="http://www.ivolva.com/extrasort.html"&gt;here&lt;/a&gt;. Ivolva Digital is behind this component.&lt;br /&gt;&lt;br /&gt;During last few days another Sort component was made available. This one is called &lt;strong&gt;NSort&lt;/strong&gt;. You can download the trial version &lt;a href="http://www.ordinal.com/ssis.html"&gt;here&lt;/a&gt;. Ordinal Technology Corp is behind this component. This is not memory hungry as it uses temporary files. It accepts multiple inputs and provides multiple outputs.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114292833739381521?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114292833739381521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114292833739381521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114292833739381521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114292833739381521'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/03/most-powerful-sort-component-so-far.html' title='Most Powerful Sort Component So Far'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114242780486725329</id><published>2006-03-15T04:42:00.000-08:00</published><updated>2006-03-30T10:25:30.223-08:00</updated><title type='text'>Single Source File With Multiple Files</title><content type='html'>One of the requirments I came across today was interesting. Each outlet has a specific menu file. Therefore we receive aournd 2000 menu files. Each menu file from system does have 8 different file types. I need to shread the data send 8 files out to different destinations. First 2 characters identifies the file type.&lt;br /&gt;&lt;br /&gt;I have written a script component to do this. Script Component is the source. I have attached the sample package and sample text file I have used. In this example I have used 2 types of files just to prove the point that it works. You can download sample package from &lt;a href="http://www.smart-bi-solutions.com/blogstuff/MultipleFilesInOneFile.Zip"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114242780486725329?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114242780486725329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114242780486725329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114242780486725329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114242780486725329'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/03/single-source-file-with-multiple-files.html' title='Single Source File With Multiple Files'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114233389346649156</id><published>2006-03-14T02:53:00.001-08:00</published><updated>2006-03-17T01:15:19.873-08:00</updated><title type='text'>Null field in Fixed Length File Which Should be an Integer Column</title><content type='html'>The project I am currently working get source files in a fixed length format. Some fields allowed to have nulls, and some are integer fields.&lt;br /&gt;&lt;br /&gt;I ran into a problem if I define the field as integer column in the connection manager. The reason for that is that those fields which supposed to be nulls, are not really nulls, they are spaces. To overcome this I did the following&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;* Define the column as DB_STR in the flat file connection manager.&lt;br /&gt;* Once the data is read from the data source I added &lt;strong&gt;Derived Column&lt;/strong&gt; in the next step.&lt;br /&gt;* I added a new derived column with the following expression&lt;br /&gt;&lt;strong&gt;   (DT_UI4)((TRIM([GrpId]) == "") ? NULL(DT_WSTR,0) : [GrpId])&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The above statement will TRIM the spaces out from a column called GrpId and if GrpId is equal to “”, then it will set it to be null, else it will assign the value of GrpId. Finally (DT_UI4) statement will convert the return result set to Four Byte Unsigned Integer.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114233389346649156?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114233389346649156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114233389346649156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114233389346649156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114233389346649156'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/03/null-field-in-fixed-length-file-which_14.html' title='Null field in Fixed Length File Which Should be an Integer Column'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114233184968233968</id><published>2006-03-14T02:22:00.000-08:00</published><updated>2006-03-28T22:56:09.173-08:00</updated><title type='text'>Date Source File in US Format. Database Locale is Set to British. Need to Get Surrogate Key?</title><content type='html'>&lt;p&gt;If you are receiving the date source file with US format (MM/DD/YYYY). It may sound odd, but in the project I am currently working on I had to overcome this issue. The date dimension is stored in the table using DD/MM/YYYY format. You wish to get Surrogate Key using Lookup feature within SSIS.&lt;br /&gt;&lt;br /&gt;Source File As shown below:&lt;br /&gt;Col1 Col2 Col3 Col4&lt;br /&gt;1 USD 01/01/2006 0:00 0.99980004&lt;br /&gt;1 USD 01/02/2006 0:00 1.000900811&lt;br /&gt;1 USD 01/21/2006 0:00 0.99960016&lt;br /&gt;&lt;br /&gt;I would suggest you define the column3 as STRING in the flat file connection manager. Once you have defined the data type you can use Derived Column component to convert the string into the correct format as shown below :&lt;br /&gt;&lt;strong&gt;(DT_DBTIMESTAMP)(SUBSTRING([Column 2],4,2) + "/" + SUBSTRING([Column 2],1,2) + "/" + SUBSTRING([Column 2],7,4))&lt;/strong&gt; &lt;/p&gt;&lt;p&gt;You can download the sample package from &lt;a href="http://www.smart-bi-solutions.com/blogstuff/USUKDates.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Try to avoid using DATEPART. If you wish to use DATEPART then you would have to set the source field (in this example Column 2 need to be defined as DATETIMESTAMP instead of STRING). The statement below will give you similar result, but there is &lt;u&gt;&lt;strong&gt;GOTCHA&lt;/strong&gt;&lt;/u&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;(DT_STR,2,1252)DATEPART("dd",[Column 2]) + "/" + (DT_STR,2,1252)DATEPART("mm",[Column 2]) + "/" + (DT_STR,5,1252)DATEPART("yyyy",[Column 2])&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The above script will produce the following result set.&lt;/p&gt;&lt;p&gt;1 USD 01/01/2006 0:00 0.99980004 &lt;strong&gt;01/01/2006 - This is right&lt;/strong&gt;&lt;br /&gt;&lt;u&gt;1 USD 01/02/2006 0:00 1.000900811 &lt;strong&gt;01/02/2006 - This is NOT right&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;1 USD 01/21/2006 0:00 0.99960016 &lt;strong&gt;21/01/2006 - This is right&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;First of January worked fine. &lt;u&gt;Second of January didn't work fine&lt;/u&gt;. Twenty first worked fine. Therefore be aware when you use it.&lt;/p&gt;&lt;p&gt;If you receive date in the following format 01-JAN-2006 then you can use the following syntax to convert it to date. You would need to define the source as String.&lt;br /&gt;&lt;strong&gt;(DT_DBTIMESTAMP)(SUBSTRING([Column 2],1,2) + "/" + SUBSTRING([Column 2],4,3) + "/" + SUBSTRING([Column 2],8,2))&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Thanks&lt;br /&gt;Sutha&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114233184968233968?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114233184968233968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114233184968233968' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114233184968233968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114233184968233968'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/03/date-source-file-in-us-format-database.html' title='Date Source File in US Format. Database Locale is Set to British. Need to Get Surrogate Key?'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19716801.post-114192900945231154</id><published>2006-03-09T09:46:00.000-08:00</published><updated>2006-03-30T10:28:40.450-08:00</updated><title type='text'>Moving Files - Source to Working Dir</title><content type='html'>The project currently I am working on had the following directory structure.&lt;br /&gt;&lt;br /&gt;C:\Data\SourceFiles - This dir will have source files.&lt;br /&gt;C:\Data\ArchiveFiles - Once the data is loaded move it from working to archive dir.&lt;br /&gt;C:\Data\WorkingFiles - Move source files to working dir.&lt;br /&gt;C:\Data\ControlFiles - Single control file per dimension.&lt;br /&gt;&lt;br /&gt;One of the dimension we have is payment type which is made out of 2 files, such as paytype and paytygrp. Each time we receive files with different names, but first 8 characters of the file is fixed. Some of our dimension has upto 24 different files, therefore we decided to use a control file with the delimiter of "-". In the control file we have source file name and final source file name.&lt;br /&gt;&lt;br /&gt;One of my collegue(Rastko) wrote a script to move the files from source directory to working directory. You can download the entire script &lt;a href="http://www.smart-bi-solutions.com/blogstuff/09032006_Doc1.doc"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114192900945231154?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114192900945231154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114192900945231154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114192900945231154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114192900945231154'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/03/moving-files-source-to-working-dir.html' title='Moving Files - Source to Working Dir'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114050520325354814</id><published>2006-02-20T22:52:00.000-08:00</published><updated>2006-03-28T23:51:02.950-08:00</updated><title type='text'>SSIS - Clustered Service</title><content type='html'>As everyone knows that SSIS is not Cluster-Aware. There is a work around for it.&lt;br /&gt;&lt;br /&gt;Kirk did a brilliant post with the help from Ranjeeta and Nick. You can access the post &lt;a href="http://www.sqljunkies.com/WebLog/knight_reign/archive/2005/07/06/16015.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114050520325354814?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114050520325354814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114050520325354814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114050520325354814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114050520325354814'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/02/ssis-clustered-service.html' title='SSIS - Clustered Service'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-114002525554943026</id><published>2006-02-15T09:34:00.000-08:00</published><updated>2006-02-15T09:40:55.606-08:00</updated><title type='text'>More New SSIS Transforms</title><content type='html'>I have posted couple of Transforms last week, but there are few more appeared on the web. They are developed and provided by SSIS Team @ Microsoft. Here is the full list (so far).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=E603BDE7-44BB-409A-890F-ED94A20B6710&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=E603BDE7-44BB-409A-890F-ED94A20B6710&amp;amp;displaylang=en&lt;/a&gt; - CalendarTransform&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=91E24D1D-ACF0-45B1-A9A5-9EA1C7BD0463&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=91E24D1D-ACF0-45B1-A9A5-9EA1C7BD0463&amp;amp;displaylang=en&lt;/a&gt; - UnDoubleOut&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=C16F11AD-150A-4091-B3A2-83D21D3E0973&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=C16F11AD-150A-4091-B3A2-83D21D3E0973&amp;amp;displaylang=en&lt;/a&gt; - Regex&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=19DF22A2-7A5E-4E09-B447-B9DC503D407A&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=19DF22A2-7A5E-4E09-B447-B9DC503D407A&amp;amp;displaylang=en&lt;/a&gt; - RTrimPlus&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=2A1686D7-2EAC-4CA3-8F5F-AE78D86C0D8F&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=2A1686D7-2EAC-4CA3-8F5F-AE78D86C0D8F&amp;amp;displaylang=en&lt;/a&gt; - NullDetector&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=FC4DE21D-9C5B-4B1D-AEEF-CE43AADAB4E4&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=FC4DE21D-9C5B-4B1D-AEEF-CE43AADAB4E4&amp;amp;displaylang=en&lt;/a&gt; - SeeBuffer&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=0E4BBA52-CC52-4D89-8590-CDA297FF7FBD&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=0E4BBA52-CC52-4D89-8590-CDA297FF7FBD&amp;amp;displaylang=en&lt;/a&gt; - UnpackDecimal&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=9E56417E-23D1-4FD3-8D6D-61314FAA2DE3&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=9E56417E-23D1-4FD3-8D6D-61314FAA2DE3&amp;amp;displaylang=en&lt;/a&gt; - CodePageConvert&lt;br /&gt;&lt;br /&gt;I am sure there will be more coming on the market soon . &lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-114002525554943026?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/114002525554943026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=114002525554943026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114002525554943026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/114002525554943026'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/02/more-new-ssis-transforms.html' title='More New SSIS Transforms'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113994062707711873</id><published>2006-02-14T10:00:00.000-08:00</published><updated>2006-02-14T10:10:51.360-08:00</updated><title type='text'>Performance When Loading Data into Oracle Using SSIS</title><content type='html'>It is a known fact that the Microsoft OLE DB for Oracle / Oracle's their own OLE DB drivers does not perform well during data load. They are extremly slow.&lt;br /&gt;&lt;br /&gt;You can see vaious people have difficulties with this provider(s).&lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=130786&amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=130786&amp;amp;SiteID=1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forums.microsoft.com/msdn/showpost.aspx?postid=117014&amp;siteid=1"&gt;http://forums.microsoft.com/msdn/showpost.aspx?postid=117014&amp;amp;siteid=1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124921&amp;SiteID=1&amp;amp;mode=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124921&amp;SiteID=1&amp;amp;mode=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Donald has written a blog about the stance within Microsoft. You might find it surprising what are about to read:&lt;br /&gt;&lt;a href="http://www.sqljunkies.com/WebLog/donald_farmer/archive/2005/03/13/8819.aspx"&gt;http://www.sqljunkies.com/WebLog/donald_farmer/archive/2005/03/13/8819.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The solution is provided by a company called Persistent Systems. The numbers are impressive with their Oracle Bulk Load Connector. Check how impressive the numbers compares for yourself at &lt;a href="http://www.persistentsys.com/products/ssisoracleconn/ssisoracleconn.htm"&gt;http://www.persistentsys.com/products/ssisoracleconn/ssisoracleconn.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I am putting all these in here for my furture reference.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113994062707711873?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113994062707711873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113994062707711873' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113994062707711873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113994062707711873'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/02/performance-when-loading-data-into.html' title='Performance When Loading Data into Oracle Using SSIS'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19716801.post-113982057232544395</id><published>2006-02-13T00:44:00.000-08:00</published><updated>2006-02-13T00:50:59.676-08:00</updated><title type='text'>SQL2005 Profiler Trace Definitions</title><content type='html'>While I have been involved in PoC, I have learnt lot about SQL Profiler and Performance Monitor.&lt;br /&gt;&lt;br /&gt;There are 6 Trace files available out of the box, which is located at &lt;strong&gt;C:\Program Files\Microsoft SQL Server\90\Tools\Profiler\TraceDefinitions\1033&lt;/strong&gt;. These definition files are in XML format. There is defintion file for SQL Server, Analysis Services and Integration Services.&lt;br /&gt;&lt;br /&gt;This XML will give you the textual definition of a SQL Profiler event class number that I have captured.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113982057232544395?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113982057232544395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113982057232544395' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113982057232544395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113982057232544395'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/02/sql2005-profiler-trace-definitions.html' title='SQL2005 Profiler Trace Definitions'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113981974533610972</id><published>2006-02-13T00:19:00.000-08:00</published><updated>2006-02-13T00:41:05.710-08:00</updated><title type='text'>Incremental Cube Processing</title><content type='html'>AS2005 will NOT process aggregations automatically when you process the partition. During used partition processing it used to process the data and it also built the aggregations for that partition. It is changed in AS2005. You can process partition incrementally using "Process Incremental" option. If you want to build index you have to do that using "Process Index" option.&lt;br /&gt;&lt;br /&gt;If you wish, you can put these two in 2 separate steps within SSIS after data is loaded.&lt;br /&gt;&lt;br /&gt;Its all about how quickly you want the data presented to the users. If you do the Process Incremental first and made the data available for users first and then build the aggregations while users are using the data. This way will give you maximum availability, but impacts performance while building aggregations and indices. UI in SSMS does not support "Process Incremental" and "Process Index" in one single transaction. You can achieve that using simple XMLA scripts as shown below:&lt;br /&gt;&lt;a href="http://www.smart-bi-solutions.com/BlogStuff/incremental_process.xmla"&gt;http://www.smart-bi-solutions.com/BlogStuff/incremental_process.xmla&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This example uses Adventure Works. &lt;strong&gt;&lt;type&gt;ProcessAdd&lt;/type&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;type&gt;ProcessIndexes&lt;/type&gt; &lt;/strong&gt;are the key things to look out for in the XMLA doc.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113981974533610972?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113981974533610972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113981974533610972' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113981974533610972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113981974533610972'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/02/incremental-cube-processing.html' title='Incremental Cube Processing'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113981760687354307</id><published>2006-02-12T23:41:00.000-08:00</published><updated>2006-02-13T00:01:37.503-08:00</updated><title type='text'>Can you load 74 million rows in 2 Minutes using SSIS (Bulk Insert Task)?</title><content type='html'>&lt;p&gt;&lt;strong&gt;The simple answer is “Yes”. &lt;/strong&gt;I have loaded 74 million rows in just under 2 minutes.&lt;br /&gt;&lt;br /&gt;I was working on a Proof of Concept (PoC), where I had to load about 10 billion rows into a fact table. Each file had 6,170,000 rows and they belong to single day transactions in the outlets (~3000). As it was PoC we generated each day’s fact data into text files and RAR them up. I had to load this data very rapidly into the table and then only we can process the cube and continue with the rest of the testing.&lt;br /&gt;&lt;br /&gt;We created the database with the maximum possible size, in other words it does not have to grow during data load. SQL Server Table was partitioned by month. We had 61 partitions (60 partitions for 5 years worth of data + 1 empty in the end). We also set the database to go across 3 file groups. We built the table without an index (I know that having an index will slow down the data load). Loaded the data using 8 Way Unisys ES7000 with 32GB of memory with 1.5GHz Processor.&lt;br /&gt;&lt;br /&gt;I have used 12 parallel Foreach tasks to load data. I was loading 4 files (24,680,000 rows) into a single file group. You can see what I have done below (12 of those):&lt;br /&gt;&lt;a href="http://www.smart-bi-solutions.com/BlogStuff/09_02_06_Pic1.JPG"&gt;http://www.smart-bi-solutions.com/BlogStuff/09_02_06_Pic1.JPG&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To get the best out of the Bulk Insert Task, we did the following settings.&lt;br /&gt;&lt;/strong&gt;Set the Code Page to 1252 (ANSI - Latin I)&lt;br /&gt;Set the batch size to 1,000,000. Varies depending on the memory.&lt;br /&gt;Set Options – Uncheck Check Constraints (default)&lt;br /&gt;                      - Check Table Lock. It is not physical lock on the table.&lt;/p&gt;&lt;p&gt;Once the whole data set was loaded we built a clustered index on DateId, which took on ES7000 5 hours to build. It took around 1 hour to drop clustered index on this fact table. &lt;/p&gt;&lt;p&gt;If you have any questions on this feel free to contact me on &lt;a href="mailto:sutha@smart-bi-solutions.com"&gt;sutha@smart-bi-solutions.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113981760687354307?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113981760687354307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113981760687354307' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113981760687354307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113981760687354307'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/02/can-you-load-74-million-rows-in-2.html' title='Can you load 74 million rows in 2 Minutes using SSIS (Bulk Insert Task)?'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113921946649248460</id><published>2006-02-06T01:46:00.000-08:00</published><updated>2006-02-06T01:51:06.503-08:00</updated><title type='text'>Calendar Transform and UnDoubleOut</title><content type='html'>There are couple of SSIS components which we can download from Microsoft site for free.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;UnDoubleOut&lt;/strong&gt; is an SSIS dataflow component that removes qualifiers from quoted text, either in place, or via the creation of a new output column. This component removes quotes that bracket input strings if present. Replaces doubled quotes with single quotes inside the string.&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=91E24D1D-ACF0-45B1-A9A5-9EA1C7BD0463&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=91E24D1D-ACF0-45B1-A9A5-9EA1C7BD0463&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CalendarTransform&lt;/strong&gt; is an SSIS dataflow transform component that generates standard calendar attributes.&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=E603BDE7-44BB-409A-890F-ED94A20B6710&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=E603BDE7-44BB-409A-890F-ED94A20B6710&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113921946649248460?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113921946649248460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113921946649248460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113921946649248460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113921946649248460'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/02/calendar-transform-and-undoubleout.html' title='Calendar Transform and UnDoubleOut'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113890522832817050</id><published>2006-02-02T10:24:00.000-08:00</published><updated>2006-02-13T12:04:25.623-08:00</updated><title type='text'>How can you validate XML Schema against incoming XML document?</title><content type='html'>For example if you are getting customers in an XML file format to load into your data warehouse using SSIS. Initial file you have received was in a perfect format. You built Schema using a specified XML location. Generate the schema using “Generate XSD” and saved it to a given location. You mapped the XML Output to a destination table in SQL Server. All ran through fine during first week. Second week the XML file that was sent to you by source system has been changed. You want to validate the XML source against XML Schema. How can I do that? If there is a difference between the source file and schema I want to fail the package.&lt;br /&gt;&lt;br /&gt;There is a component called XML Task in Control Flow, which could help you to do that. You can do the following using the XML Task like Diff, XSLT, XPATH, Merge, Patch &amp; Validate.&lt;br /&gt;&lt;a href="http://www.smart-bi-solutions.com/BlogStuff/020206_Pic1.jpg"&gt;http://www.smart-bi-solutions.com/BlogStuff/020206_Pic1.jpg&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;Validate &lt;/strong&gt;is the Operation Type you would you to validate the XML Source file against XML Schema. Once you have selected the OperationType, make sure XSD is selected in ValidationType (which is default). Please be aware that the FailOnValidationFail is set to False by default. If you leave it with default value for FailOnValidationFail, the package will NOT fail even if the XSD and XML doesn’t match. Therefore you need to change FailOnValidationFail value to True if you want your package to fail.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113890522832817050?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113890522832817050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113890522832817050' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113890522832817050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113890522832817050'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/02/how-can-you-validate-xml-schema.html' title='How can you validate XML Schema against incoming XML document?'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113830742360653117</id><published>2006-01-26T12:26:00.000-08:00</published><updated>2006-01-26T12:30:30.850-08:00</updated><title type='text'>Steps Involved in Loading Text File Into SQL Server Using SSIS</title><content type='html'>How many steps involved in loading a simple text file straight into a SQL Server table using SSIS?&lt;br /&gt;&lt;br /&gt;6 steps involved to complete this process and they are listed below:&lt;br /&gt;1. Read data from the text file – Disk speed is significant.&lt;br /&gt;2. Load data from the text file into the transport (SSIS) – Network speed is significant.&lt;br /&gt;3. Open a transaction on SQL Server – Server contention is significant.&lt;br /&gt;4. Pass data to the SQL Server interface&lt;br /&gt;5. Load the data into SQL Server – Memory resource is significant.&lt;br /&gt;6. Commit the transaction – Disk performance is important.&lt;br /&gt;&lt;br /&gt;When loading from text to typed SQL Server columns (int, datetime etc) the data conversion must take place somewhere either step 2 or 5 in this above example. Is it necessary to use SSIS for this? Are the operations simple enough for BCP / BULK Import? With low volume of data the overhead of starting up SSIS package process may offset any performance gain over BCP or Bulk Insert. Where should SSIS run (Server1 or Server2)? SSIS On Server1 – Competes for memory and processor resources with other applications. Will data conversion on server1 reduce or increase the volume of data transferred across the network? But can not use the fast SSIS SQL server Destination. Where should SSIS run (Server1 or Server2)? SSIS On Server2 – Competes for memory and processor resources with SQL Server. Will pulling text over conversion be expensive (also consider transferring the file unparsed to server2 and read it locally from there). You can use the fast SSIS SQL Server Destination. If you were going to run in two servers you would need SQL Server licensee in both servers.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113830742360653117?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113830742360653117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113830742360653117' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113830742360653117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113830742360653117'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/01/steps-involved-in-loading-text-file.html' title='Steps Involved in Loading Text File Into SQL Server Using SSIS'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113735624637862583</id><published>2006-01-15T12:15:00.000-08:00</published><updated>2006-02-13T00:19:07.133-08:00</updated><title type='text'>SSIS Service</title><content type='html'>&lt;strong&gt;SSIS Windows Service &lt;/strong&gt;– Monitors and manages running as well as stored packages, via SQL management studio.&lt;br /&gt;&lt;br /&gt;It is installed when you install SSIS. Service is not required to design or execute packages. Windows events for service (Service start, service fail to start, package started, package stopped…).&lt;br /&gt;&lt;br /&gt;In Management Studio you can see Stored Packages. When you create a folder(s) they are stored in MSDB database. In Management Studio you can see Running Packages.&lt;br /&gt;&lt;br /&gt;As default it only shows the name(s) of the package(s) which are running at present. If you click on a “Report” button on the top menu, it will display information such as Package name, Executed by, Execution Instance Id, Execution Started, Execution duration, Package ID and Description. In Running Packages you can select the package and right click and “Stop” the package.&lt;br /&gt;&lt;br /&gt;When you connect to SSIS server within Management Studio, you can select the server and Right click on it and select “View Logs”. This is limited Windows events.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113735624637862583?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113735624637862583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113735624637862583' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113735624637862583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113735624637862583'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/01/ssis-service.html' title='SSIS Service'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113735607961498961</id><published>2006-01-15T12:06:00.000-08:00</published><updated>2006-01-15T12:18:44.553-08:00</updated><title type='text'>How does SSIS work?</title><content type='html'>SSIS is a replacement product to SQL 2000 DTS. New archutecture and design. I have tried to give a summary explaining how SSIS works :&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;All data is loaded in tabular form into a memory buffer.&lt;/li&gt;&lt;li&gt;Data sources can be diverse, including custom or scripted adapters.&lt;/li&gt;&lt;li&gt;Transformation components shape and modify data in many ways.&lt;/li&gt;&lt;li&gt;Data is routed by rules or error conditions for cleansing and conforming.&lt;/li&gt;&lt;li&gt;Flows can be as complex as your business rules, but highly concurrent.&lt;/li&gt;&lt;li&gt;Finally data can be loaded in parallel to many varied destinations. As far as possible no copying of data (even in memory)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;All in all more memory you have the better it is for performance of SSIS.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113735607961498961?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113735607961498961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113735607961498961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113735607961498961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113735607961498961'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/01/how-does-ssis-work.html' title='How does SSIS work?'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113698569094329663</id><published>2006-01-11T05:06:00.000-08:00</published><updated>2006-01-11T05:21:30.953-08:00</updated><title type='text'>Cannot Set Connection String For Bulk Insert Source Connection</title><content type='html'>I want to go through a directory in my local machine and get files and assign the Fully Qualified File Name to a User Variable using Foreach Component from SSIS.&lt;br /&gt;&lt;br /&gt;I want to use that variable as a connection string within Expression in Bulk Insert Task Source Connection,  Data Flow Task and File System Task. It is working fine within Data Flow and File System task. &lt;strong&gt;It is NOT working for Bulk Insert&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;- Expressions    ConnectionString  @[User::FileName]&lt;br /&gt;&lt;br /&gt;This is the expression I want to use within ConnectionString in Bulk Insert, File System Task and Data Flow Task. Same expression works fine in all except Bulk Insert. You can see the same issue being raised in Forum.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=188886&amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=188886&amp;amp;SiteID=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From the forum I found out that I need to use Script within Foreach to set the connection string and then call Bulk Insert. You can set the connection strings as shown below (thanks to Mark)&lt;br /&gt;&lt;br /&gt;------------------------------------------------------&lt;br /&gt;&lt;em&gt;Dim connmgr As ConnectionManager = Dts.Connections("[your connection name]")connmgr.ConnectionString = Dts.Variables("User::filename").Value.ToString()connmgr.AcquireConnection(Nothing)&lt;/em&gt;&lt;br /&gt;------------------------------------------------------&lt;br /&gt;&lt;br /&gt;I hope this helps&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113698569094329663?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113698569094329663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113698569094329663' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113698569094329663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113698569094329663'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/01/cannot-set-connection-string-for-bulk.html' title='Cannot Set Connection String For Bulk Insert Source Connection'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113656362970687895</id><published>2006-01-06T08:00:00.000-08:00</published><updated>2006-01-11T07:35:27.176-08:00</updated><title type='text'>SSIS Package Template</title><content type='html'>The project I am working currently needed a template all ETL developers can use as a standard package. This will be the beginning point of each package. I have written a simple package to act as a template.&lt;br /&gt;&lt;br /&gt;I wrote the package and called it as “Pkg_Template.dtsx”. Template package(s) need to locate in certain location for it to work. You would need to put this SSIS package in the following location on your machine&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Once you have placed the template package in the above location you can open the template package by Right click on a project and select “Add” and “New Item”. This will bring a screen like the one in the link below :&lt;br /&gt;&lt;a href="http://www.smart-bi-solutions.com/BlogStuff/06012005_Pic1.jpg"&gt;http://www.smart-bi-solutions.com/BlogStuff/06012005_Pic1.jpg&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;As you can see from the above screen shot the Pkg_Template does appear within BIDS template section. You can give new name at this point or it will give a default name of “Pkg_Template1.dtsx”.&lt;br /&gt;&lt;br /&gt;The screen shot in the link below explains what template package does:&lt;br /&gt;&lt;a href="http://www.smart-bi-solutions.com/BlogStuff/06012005_Pic2.jpg"&gt;http://www.smart-bi-solutions.com/BlogStuff/06012005_Pic2.jpg&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The above template does the following:&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Retrieves LoadId from SQL Server using Stored Procedure.&lt;/li&gt;&lt;li&gt;Checks for LoadId Validity.&lt;/li&gt;&lt;li&gt;Configures SSIS auditing using Execute SQL Task (Expressions),&lt;/li&gt;&lt;li&gt;Uses “Environments.dtsconfig” to set the SQL Server connections.&lt;/li&gt;&lt;li&gt;Package is configured to log to Windows Event Viewer if the package errors out.&lt;/li&gt;&lt;li&gt;Event Handler to do auditing, for example, it logs what time task started and completed etc.&lt;/li&gt;&lt;li&gt;I have put some comments for the new developers in the future to see what the package does etc.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I hope this is useful.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113656362970687895?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113656362970687895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113656362970687895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113656362970687895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113656362970687895'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/01/ssis-package-template.html' title='SSIS Package Template'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113653982744024856</id><published>2006-01-06T01:20:00.000-08:00</published><updated>2006-01-06T01:30:27.453-08:00</updated><title type='text'>IDENTITY_INSERT</title><content type='html'>If you have a Dimension table for example with Identity column. You want to insert a default record with the Surrogate Key of -1 with description "Unknown".&lt;br /&gt;&lt;br /&gt;Table with the following structure:&lt;br /&gt;CREATE TABLE Dim_Manager  &lt;br /&gt;(  &lt;br /&gt;     ManagerId  INT IDENTITY (1,1) NOT NULL,      &lt;br /&gt;     Name   VARCHAR(50) NOT NULL&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;If you create the table with the above statement and would like to insert default dimension record. You can do that by doing the following:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SET IDENTITY_INSERT dbo.Dim_Manager ON&lt;/strong&gt; &lt;br /&gt;   INSERT INTO Dim_Manager (ManagerId, Name)&lt;br /&gt;   VALUES('-1','Unknown')   &lt;br /&gt;&lt;strong&gt;SET IDENTITY_INSERT dbo.Dim_Manager OFF&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;You need to set the IDENTITY_INSERT to ON before inserting into Identity colum. Once you have inserted the record you need to set IDENTITY_INSERT to OFF as shown above.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113653982744024856?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113653982744024856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113653982744024856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113653982744024856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113653982744024856'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2006/01/identityinsert.html' title='IDENTITY_INSERT'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113605090800238877</id><published>2005-12-31T09:32:00.000-08:00</published><updated>2006-01-11T07:42:36.836-08:00</updated><title type='text'>Package Configurations - DTSConfig File</title><content type='html'>&lt;p&gt;SSIS supports 5 different types of sources to use the setting the properties of objects and they are :&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;XML Configuration File&lt;/li&gt;&lt;li&gt;Environment Variable&lt;/li&gt;&lt;li&gt;Registry Entry&lt;/li&gt;&lt;li&gt;Parent Package Variable&lt;/li&gt;&lt;li&gt;SQL Server&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I have used XML configuration file to do all the SQL Server connection settings. In the future if you wish to include more connections / settings you can add to this configuration file. If you continue to use this method, you can execute SSIS Packages in different environments without making any changes to the packages. Environments.dtsconfig is the only file you would have to change between environments.&lt;br /&gt;&lt;br /&gt;Configuration file is located at C:\Config\Enironments.dtsconfig&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;This configuration file should exist at the same place in all environments.&lt;/strong&gt; During runtime SSIS package will pickup the setting from that location and update the connection settings according to the XML configuration file.&lt;br /&gt;&lt;br /&gt;XML configuration file will look like the one in the link below:&lt;br /&gt;&lt;a href="http://www.smart-bi-solutions.com/BlogStuff/31122005_01.jpg"&gt;http://www.smart-bi-solutions.com/BlogStuff/31122005_01.jpg&lt;/a&gt;&lt;/p&gt;&lt;p&gt;When you migrate the SSIS packages from one environment (Dev) to the other (UAT), you would need to do the following to the configuration file : &lt;/p&gt;&lt;ol&gt;&lt;li&gt;Copy “Enironments.dtsconfig” from your dev environment to UAT environment. Please make sure that you place this configuration file in the same location as development. &lt;/li&gt;&lt;li&gt;Edit “Enironments.dtsconfig” using WordPad or something similar. &lt;/li&gt;&lt;li&gt;Rename Data Source values. For example if your development environment is called “Beast\SQL2005” and UAT environment is called “Sql2005\Uat”. You need to search and replace the value for data source. &lt;/li&gt;&lt;li&gt;Save the file. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Thanks&lt;br /&gt;Sutha &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113605090800238877?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113605090800238877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113605090800238877' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113605090800238877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113605090800238877'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/package-configurations-dtsconfig-file.html' title='Package Configurations - DTSConfig File'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19716801.post-113604220570642067</id><published>2005-12-31T07:12:00.000-08:00</published><updated>2006-03-28T22:54:32.096-08:00</updated><title type='text'>MSDTC - What a pain</title><content type='html'>Yes I admit that I am not an expert in MSDTC, but still so difficult to figure this damn thing. If Windows Firewall is ON it wont work. I didnt have that turned on, but I have had Norton on my machine, which would stop MSDTC working as well. &lt;strong&gt;If you get this kind of message please try to disable your firewall and try before anythign else&lt;/strong&gt;. You will get the message below even though you have configured MSDTC correctly and started successfully.&lt;br /&gt;&lt;br /&gt;------------------------------&lt;br /&gt;Error: The SSIS Runtime has failed to start the distributed transaction due to error 0x8004D01B "The Transaction Manager is not available.". The DTC transaction failed to start. This could occur because the MSDTC Service is not running.&lt;br /&gt;------------------------------&lt;br /&gt;&lt;br /&gt;Useful posts when you try to resolve MSDTC issue :&lt;br /&gt;&lt;a href="http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2339.aspx"&gt;http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2339.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.conchango.com/paulmcmillan/archive/2005/10/17/2277.aspx"&gt;http://blogs.conchango.com/paulmcmillan/archive/2005/10/17/2277.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q293799"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q293799&lt;/a&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q306843"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q306843&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It is advisable to run MSDTC with DTC Logon Account such as "NT AUTHORITY\NETWORK SERVICE". Also select "Allow Inbound" and "Allow Outbound" under Transaction Manager Communication.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113604220570642067?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113604220570642067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113604220570642067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113604220570642067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113604220570642067'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/msdtc-what-pain.html' title='MSDTC - What a pain'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113596529119125701</id><published>2005-12-30T09:32:00.000-08:00</published><updated>2005-12-30T09:54:51.200-08:00</updated><title type='text'>Creating Random Data From Given Dimensions</title><content type='html'>I had to create millions of rows dummy fact table for testing purpose. I have got valid dimensions, but not fact. I had a requirement to create facts using random products (roughly 160 products across whole day). The fact table stored data to the minute. Each shop in average have 2000 transactions / day.&lt;br /&gt;&lt;br /&gt;Each day shop in average sells 160 products. This is populated into a Tmp table as shown below:&lt;br /&gt;&lt;br /&gt;SELECT TOP 160 productid&lt;br /&gt;INTO TmpProduct&lt;br /&gt;FROM dim_product&lt;br /&gt;ORDER BY  NEWID()&lt;br /&gt;&lt;br /&gt;I have written couple of SQL statements to achieve this. They produced right result but unfortunately they are slow for my requirement.  Therefore we have to do in C#.&lt;br /&gt;&lt;br /&gt;Option 1&lt;br /&gt;---------&lt;br /&gt;SELECT TOP 2000 RANK() OVER (order by newid()) as RankRec,&lt;br /&gt;dateid,&lt;br /&gt;timeid,&lt;br /&gt;shopid,&lt;br /&gt;managerid,&lt;br /&gt;TmpProduct.productid,&lt;br /&gt;1 as Qty,&lt;br /&gt;(timeid*rand()) as Amount&lt;br /&gt;FROM dim_date&lt;br /&gt;CROSS JOIN dim_shop&lt;br /&gt;CROSS JOIN dim_time&lt;br /&gt;CROSS JOIN dim_manager&lt;br /&gt;CROSS JOIN dim_product&lt;br /&gt;INNER JOIN TmpProduct&lt;br /&gt;ON dim_product.productid = TmpProduct.productid&lt;br /&gt;WHERE shopid = 39&lt;br /&gt;AND dateid = 1&lt;br /&gt;AND dim_shop.shopno = dim_manager.shopno&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Option 2&lt;br /&gt;---------&lt;br /&gt;&lt;br /&gt;SELECT TOP 2000&lt;br /&gt;dateid,&lt;br /&gt;timeid,&lt;br /&gt;shopid,&lt;br /&gt;managerid,&lt;br /&gt;TmpProduct.productid,&lt;br /&gt;1 as Qty,&lt;br /&gt;(timeid*rand()) as Amount&lt;br /&gt;FROM dim_date&lt;br /&gt;CROSS JOIN dim_shop&lt;br /&gt;CROSS JOIN dim_time&lt;br /&gt;CROSS JOIN dim_manager&lt;br /&gt;CROSS JOIN dim_product&lt;br /&gt;INNER JOIN TmpProduct&lt;br /&gt;ON dim_product.productid = TmpProduct.productid&lt;br /&gt;WHERE shopid = 39&lt;br /&gt;AND dateid = 1&lt;br /&gt;AND dim_shop.shopno = dim_manager.shopno&lt;br /&gt;order by newid()&lt;br /&gt;&lt;br /&gt;I am posting this for me as it will come handy during future projects.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113596529119125701?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113596529119125701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113596529119125701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113596529119125701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113596529119125701'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/creating-random-data-from-given.html' title='Creating Random Data From Given Dimensions'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113576471492954779</id><published>2005-12-28T02:04:00.000-08:00</published><updated>2005-12-28T02:11:54.940-08:00</updated><title type='text'>Random data</title><content type='html'>I had a request from a client to use random products (for example 100 products per customer) when I create a dummy set of data for testing purpose. I didn't realise that there is a simple way to get random set of products being returned at each time, until I Googled it.&lt;br /&gt;&lt;br /&gt;SELECT  TOP 100 ProductId&lt;br /&gt;FROM Dim_Products&lt;br /&gt;ORDER BY &lt;strong&gt;NEWID()&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;NEWID() returns a UniqueIdentifier every time it runs and therefore it will return different product list each time.&lt;br /&gt;&lt;br /&gt;Very useful when you create random data.&lt;br /&gt;&lt;br /&gt;I am sure most people knew this, but I learnt this yesterday. So I thought I would post it as it would be useful for me in the future.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113576471492954779?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113576471492954779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113576471492954779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113576471492954779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113576471492954779'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/random-data.html' title='Random data'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113569873697413089</id><published>2005-12-27T07:50:00.000-08:00</published><updated>2005-12-27T08:39:01.566-08:00</updated><title type='text'>Auditing</title><content type='html'>As part of best practice I have kept all the auditing details in a separate database. I have given database name as Audit. There are couple of tables, one for auditing of SSIS package and the other for stored procedure auditing.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;SSIS Audit table structure&lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;CREATE TABLE dbo.SSIS_Audit&lt;br /&gt;(&lt;br /&gt;LoadId int NOT NULL,&lt;br /&gt;PackageName varchar(100) NOT NULL,&lt;br /&gt;TaskName varchar(100) NOT NULL,&lt;br /&gt;[Type] varchar(100) NOT NULL,&lt;br /&gt;MachineName varchar(50) NOT NULL,&lt;br /&gt;UserName varchar(50) NOT NULL,&lt;br /&gt;NoOfRowsRead int NOT NULL CONSTRAINT DF_MBA_Audit_NoOfRowsProcessed DEFAULT ((0)),&lt;br /&gt;NoOfRowsInserted int NOT NULL CONSTRAINT DF_MAB_Audit_NoOfRowsInserted DEFAULT ((0)),&lt;br /&gt;NoOfRowsUpdated int NOT NULL CONSTRAINT DF_MAB_Audit_NoOfRowsUpdated DEFAULT ((0)),&lt;br /&gt;StartTime datetime NOT NULL,&lt;br /&gt;PackageDuration int NULL&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Stored Procedure Audit table structure&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE dbo.Error_Audit&lt;br /&gt;(&lt;br /&gt;ErrorNumber numeric(18, 0) NOT NULL,&lt;br /&gt;ErrorSeverity numeric(18, 0) NOT NULL,&lt;br /&gt;ErrorState numeric(18, 0) NOT NULL,&lt;br /&gt;ErrorProcedure varchar(60) NOT NULL,&lt;br /&gt;ErrorLine numeric(18, 0) NOT NULL,&lt;br /&gt;ErrorMessage varchar(250) NOT NULL,&lt;br /&gt;ErrorDate datetime NOT NULL&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Within SSIS package I used SQL Expression to achieve auditing. I have used Event Handler wherever possible (On Pre-Execute / On Post-Execute) and sometimes I have used Execute SQL Task to achieve this. I couldn’t use event handler on package itself as it is triggering twice. The reason it triggers twice is “it will fire the event handler scoped to the task AND the event handler scoped to the package. So your event actually gets handled twice”. Therefore I use Execute SQL Task to log audit details at the beginning and end of the package to log auditing details.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Example expression to populate SSIS audit table&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;"INSERT INTO SSIS_Audit (LoadId,PackageName, TaskName, Type, MachineName, UserName, NoOfRowsRead, NoOfRowsInserted, PackageDuration, StartTime)&lt;br /&gt;VALUES ('"+(DT_STR,50,1252)@[User::LocalLoadId] +"',&lt;br /&gt;'"+ @[System::PackageName] + "', '" + @[System::TaskName] + "',&lt;br /&gt;'Package Completed', '" + @[System::MachineName] + "',&lt;br /&gt;'" + @[System::UserName] + "', '"+(DT_STR,50,1252)@[User::RowsRead] +"','"+(DT_STR,50,1252)@[User::RowsInserted] +"',"+(DT_STR,4,1252)DATEDIFF("ss",@[System::StartTime],getdate()) + ", getdate() )"&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;u&gt;When the above expression is evaluated it will display something similar to this as SQLStatement&lt;br /&gt;&lt;/u&gt;&lt;/em&gt;&lt;br /&gt;INSERT INTO SSIS_Audit (LoadId,PackageName, TaskName, Type, MachineName, UserName, NoOfRowsRead, NoOfRowsInserted, PackageDuration, StartTime)&lt;br /&gt;VALUES&lt;br /&gt;( '0','Pkg_Fct_Summary_Initial_Load', 'End SSIS Pkg Audit Log',&lt;br /&gt;'Package Completed', 'BEAST', 'BEAST\Sutha', '0', '0',14, getdate()&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Within stored procedure I have used the following stored procedure to call if anything fails. This Stored procedure will log it into a table which I have specified above (Error_Audit)&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE dbo.prc_LogErrorInfo&lt;br /&gt;AS&lt;br /&gt;BEGIN TRY&lt;br /&gt;INSERT INTO Error_Audit&lt;br /&gt;VALUES&lt;br /&gt;(&lt;br /&gt;ERROR_NUMBER(),&lt;br /&gt;ERROR_SEVERITY() ,&lt;br /&gt;ERROR_STATE() ,&lt;br /&gt;ERROR_PROCEDURE() ,&lt;br /&gt;ERROR_LINE() ,&lt;br /&gt;ERROR_MESSAGE(),&lt;br /&gt;GETDATE()&lt;br /&gt;)&lt;br /&gt;END TRY&lt;br /&gt;&lt;br /&gt;BEGIN CATCH&lt;br /&gt;SELECT ERROR_NUMBER() AS ErrorNumber,&lt;br /&gt;ERROR_SEVERITY() AS ErrorSeverity,&lt;br /&gt;ERROR_STATE() AS ErrorState,&lt;br /&gt;ERROR_PROCEDURE() AS ErrorProcedure,&lt;br /&gt;ERROR_LINE() AS ErrorLine,&lt;br /&gt;ERROR_MESSAGE() AS ErrorMessage,&lt;br /&gt;GETDATE() AS ErrorDate&lt;br /&gt;&lt;br /&gt;END CATCH&lt;br /&gt;&lt;br /&gt;As usual comments welcome.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113569873697413089?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113569873697413089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113569873697413089' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113569873697413089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113569873697413089'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/auditing.html' title='Auditing'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19716801.post-113569697568400148</id><published>2005-12-27T07:13:00.000-08:00</published><updated>2005-12-27T08:39:20.596-08:00</updated><title type='text'>LoadId</title><content type='html'>I thought I would explain the load id mechanism I have been using in my current project. I have stored couple of tables within "Stage" database. Decision was made to put it in the Stage database, against Audit database as these are not auditing tables.&lt;br /&gt;&lt;br /&gt;The structure of the tables as follows:&lt;br /&gt;&lt;br /&gt;CREATE TABLE dbo.Ctl_Load_Summary&lt;br /&gt;(&lt;br /&gt;LoadId int NOT NULL,&lt;br /&gt;StartDate datetime NOT NULL,&lt;br /&gt;EndDate datetime NULL,&lt;br /&gt;Duration int NOT NULL CONSTRAINT DF_Ctl_Load_Summary_Duration DEFAULT ((0))&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE TABLE dbo.Ctl_Load_Batch_State&lt;br /&gt;(&lt;br /&gt;LoadId int NOT NULL,&lt;br /&gt;InProgress varchar(1) NOT NULL&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;"Ctl_Load_Batch_State" table always hold single record, which is controlled by a stored procedure (Code is below). This table will hold last successful load id OR current load id which is in progress. If it is in progress it will have the current load id and ‘Y’ as Progress flag. If the load is successful it will have the load id and ‘N’ as progress flag. During any unforeseen problems if the SSIS package fails during data warehouse load progress flag will remain as ‘Y’. When we rerun the package it will pick the same load id as the transaction within the package would have rolled the data back.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;“Ctl_Load_Summary” table holds the summary details of the load. For example when we load data everyday it will have the loaded we have used for the day along with when the package started and ended. The duration of the package is calculated in seconds and stored in the duration column. This is mainly done to meet the client’s requirement.&lt;br /&gt;&lt;br /&gt;Commets welcome.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;Stored Procedure To Retrieve Load ID&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;-- =============================================&lt;br /&gt;-- Author : Sutha Thiru&lt;br /&gt;-- Create date : 12/12/2005&lt;br /&gt;-- Description : This SP will return the latest .&lt;br /&gt;-- =============================================&lt;br /&gt;ALTER PROCEDURE [dbo].[prc_get_loadid] (@loadid INT OUTPUT)&lt;br /&gt;AS&lt;br /&gt;&lt;br /&gt;SET NOCOUNT ON&lt;br /&gt;&lt;br /&gt;DECLARE @inprogress VARCHAR(1)&lt;br /&gt;DECLARE @statecount INT&lt;br /&gt;DECLARE @summarycount INT&lt;br /&gt;&lt;br /&gt;SET @loadid = 0&lt;br /&gt;SET @summarycount = 0&lt;br /&gt;SET @statecount = 0&lt;br /&gt;&lt;br /&gt;BEGIN TRY&lt;br /&gt;&lt;br /&gt;BEGIN TRAN&lt;br /&gt;SELECT @summarycount = count(*)&lt;br /&gt;FROM Ctl_Load_Summary&lt;br /&gt;&lt;br /&gt;SELECT @statecount = count(*)&lt;br /&gt;FROM Ctl_Load_Batch_State&lt;br /&gt;&lt;br /&gt;IF @summarycount &lt;&gt; 0 and @statecount = 0&lt;br /&gt;BEGIN&lt;br /&gt;RETURN 0&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;SELECT @loadid = loadid,&lt;br /&gt;@inprogress = inprogress&lt;br /&gt;FROM Ctl_Load_Batch_State&lt;br /&gt;&lt;br /&gt;IF @inprogress = 'Y'&lt;br /&gt;BEGIN&lt;br /&gt;set @loadid = @loadid&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;SET @loadid = @loadid+1&lt;br /&gt;IF @statecount = 0&lt;br /&gt;BEGIN&lt;br /&gt;INSERT&lt;br /&gt;INTO Ctl_Load_Batch_State&lt;br /&gt;VALUES (@loadid,'Y')&lt;br /&gt;IF @@ERROR = 0&lt;br /&gt;BEGIN&lt;br /&gt;set @loadid = @loadid&lt;br /&gt;END&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;BEGIN&lt;br /&gt;UPDATE Ctl_Load_Batch_State&lt;br /&gt;SET loadid = @loadid,&lt;br /&gt;inprogress ='Y'&lt;br /&gt;IF @@ERROR = 0&lt;br /&gt;BEGIN&lt;br /&gt;set @loadid = @loadid&lt;br /&gt;END&lt;br /&gt;END&lt;br /&gt;COMMIT TRAN&lt;br /&gt;&lt;br /&gt;RETURN @loadid&lt;br /&gt;END TRY&lt;br /&gt;&lt;br /&gt;BEGIN CATCH&lt;br /&gt;ROLLBACK TRAN&lt;br /&gt;--EXEC Audit.dbo.prc_LogErrorInfo -- This calls another SP for auditing&lt;br /&gt;END CATCH&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113569697568400148?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113569697568400148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113569697568400148' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113569697568400148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113569697568400148'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/loadid.html' title='LoadId'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113450842923488671</id><published>2005-12-13T12:58:00.000-08:00</published><updated>2006-01-11T07:45:26.396-08:00</updated><title type='text'>Execute SQL Task - Retrieving LoadId &amp; Assigning To User Variable</title><content type='html'>During daily load of data warehouse I wanted to get the LoadID from a table for that load and assign it to a user variable. I wanted to execute a stored procedure which will return an output value which will be the LoadID. I wanted to assign it to a variable.&lt;br /&gt;&lt;br /&gt;The SQLStatement would be “&lt;span style="color:#ff0000;"&gt;EXEC prc_get_loadid ? OUTPUT&lt;/span&gt;”. You can see from the link below:&lt;br /&gt;&lt;a href="http://www.smart-bi-solutions.com/BlogStuff/13122005_01.jpg"&gt;http://www.smart-bi-solutions.com/BlogStuff/13122005_01.jpg&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From the link below below you can see that I am assigning the output value from stored procedure to user defined variable. Please note that the variables are case sensitive within SSIS.&lt;br /&gt;&lt;a href="http://www.smart-bi-solutions.com/BlogStuff/13122005_02.jpg"&gt;http://www.smart-bi-solutions.com/BlogStuff/13122005_02.jpg&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now I assigned the output (LoadId) from a stored procedure to user variable, I can use that variable anywhere within the calling SSIS (parent / child) package which handles the daily load.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113450842923488671?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113450842923488671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113450842923488671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113450842923488671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113450842923488671'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/execute-sql-task-retrieving-loadid.html' title='Execute SQL Task - Retrieving LoadId &amp; Assigning To User Variable'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113412869169005102</id><published>2005-12-09T03:35:00.000-08:00</published><updated>2005-12-13T13:20:00.160-08:00</updated><title type='text'>Auditing Data Flow Task</title><content type='html'>I would like to audit number of rows read from source, inserted, updated etc. You can use out of the box Row Count component to get the number of rows processed at a given point and time and assign it to a variable as &lt;a href="http://blogs.conchango.com/jamiethomson/"&gt;Jamie&lt;/a&gt; explained well in his &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2005/06/11/1593.aspx"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I was talking to &lt;a href="http://markiehill.blogspot.com/"&gt;Mark&lt;/a&gt; and said it would be nice if we could have something to do this using an Event Handler, which means we don’t have to have multiple variables in a package etc. We discussed it and the wiz-kid wrong a component which lets me do what I wanted to achieve. Using this component I can get the number of rows processed into a single variable at a given time and fire an event handler to insert it into an audit table. You can see what Mark has done &lt;a href="http://markiehillmsis.blogspot.com/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I will do a blog soon, with simple demo explaining all the details.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113412869169005102?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113412869169005102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113412869169005102' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113412869169005102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113412869169005102'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/auditing-data-flow-task.html' title='Auditing Data Flow Task'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113412806393456170</id><published>2005-12-09T03:22:00.000-08:00</published><updated>2005-12-13T13:19:44.700-08:00</updated><title type='text'>SQL Server 2005</title><content type='html'>While I was working for Reuters I had the opportunity to have access to SQL Server 2005 as Reuters was one of the Technology Adoption Programme (TAP) partners. I have been working with SQL Server 2005 over 2 years now.&lt;br /&gt;&lt;br /&gt;I have concentrated mainly on SQL Server Integration Services (SSIS), but have spend time in understanding new features with SQL Server database as well as SQL Server Analysis Service (SSAS).&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113412806393456170?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113412806393456170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113412806393456170' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113412806393456170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113412806393456170'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/sql-server-2005.html' title='SQL Server 2005'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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-19716801.post-113412718509420031</id><published>2005-12-09T03:12:00.000-08:00</published><updated>2005-12-13T13:19:28.386-08:00</updated><title type='text'>Lets Give it a go....</title><content type='html'>I have been working with SQL Server for nearly 8 years now. I have concentrated on BI front all these years. I never bothered to setup my own blog.&lt;br /&gt;&lt;br /&gt;After all these years couple of my collegues (Steve &amp; Mark) nagging me for a long time, I have decided to go ahead with my own blog today.&lt;br /&gt;&lt;br /&gt;I am setting this as a knowledge base for me more than anything else. If I get to share some valuable information during that process it would be bonus. There are some great blogs out there as you all aware.&lt;br /&gt;&lt;br /&gt;I am ready to rock..... Lets start blogging....&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Sutha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19716801-113412718509420031?l=tsutha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tsutha.blogspot.com/feeds/113412718509420031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19716801&amp;postID=113412718509420031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113412718509420031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19716801/posts/default/113412718509420031'/><link rel='alternate' type='text/html' href='http://tsutha.blogspot.com/2005/12/lets-give-it-go.html' title='Lets Give it a go....'/><author><name>Sutha Thiru</name><uri>http://www.blogger.com/profile/07959661143956792781</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>
