<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0"><channel><title>IN2BI</title><link>http://blog.in2bi.eu/</link><description>data, stories &amp;amp; insights</description><generator>Graffiti CMS 1.1 (build 1.1.0.1114)</generator><lastBuildDate>Sat, 18 May 2013 06:58:00 GMT</lastBuildDate><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/in2bi" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="in2bi" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">in2bi</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item><title>Logging in SSIS with BIML 2 – Logging Package Execution in the Control Flow</title><link>http://blog.in2bi.eu/biml/logging-in-ssis-with-biml-2-ndash-logging-package-execution-in-the-control-flow/</link><pubDate>Sat, 18 May 2013 06:58:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/biml/logging-in-ssis-with-biml-2-ndash-logging-package-execution-in-the-control-flow/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>0</slash:comments><category domain="http://blog.in2bi.eu/biml/">Biml</category><description>&lt;p&gt;This is the second post in a series on on logging in SSIS. In the first post I described &lt;a href="http://blog.in2bi.com/microsoft-business-intelligence/logging-in-ssis-with-biml-1-ndash-logging-task-execution/"&gt;logging package and tasks within a package by using an event handler&lt;/a&gt;. In this post I’ll describe a second method: Logging Package Execution in the control flow. It’s a very common pattern: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;At the start of the package create a record in an audit table. &lt;/li&gt;    &lt;li&gt;Use the identity of this row in the dataflow and add it to every row you insert in the target table. &lt;/li&gt;    &lt;li&gt;Use several counter to count the rows passing through the dataflow. &lt;/li&gt;    &lt;li&gt;At the end of the package update the audit row that we created in the first step with the end time and the row counters. &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Data Lineage&lt;/h4&gt;  &lt;p&gt;The most important advantage of this method lies in step 2 by adding a reference to the audit row in every row that we insert into the target table we will be able to track back every row to when and how it was inserted. This has saved my ass several times by be being able to roll back a faulty import 2 weeks ago and repopulate it with the correct data.&lt;/p&gt;  &lt;p&gt;Andy Leonard wrote a nice &lt;a href="http://sqlblog.com/blogs/andy_leonard/archive/2007/08/03/ssis-design-pattern-etl-instrumentation-part-1.aspx"&gt;blog post&lt;/a&gt; on how you can set this up in SSIS. In this post I’ll focus on creating a similar package with BIML. My package will look like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/1592b168430c_91F5/image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/1592b168430c_91F5/image_thumb.png" width="484" height="388" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h4&gt;The Audit Table&lt;/h4&gt;  &lt;p&gt;To store the package execution information we need an audit table. Create it with the following statement:&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;CREATE TABLE meta.SsisAudit(      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; AuditID int IDENTITY(1,1) NOT NULL       &lt;br /&gt;&amp;#160; , PackageName&amp;#160; varchar(50)       &lt;br /&gt;&amp;#160; , PackageGUID uniqueidentifier       &lt;br /&gt;&amp;#160; , PackageVersionGUID uniqueidentifier       &lt;br /&gt;&amp;#160; , ExecutionID uniqueidentifier       &lt;br /&gt;&amp;#160; , StartDate datetime       &lt;br /&gt;&amp;#160; , Enddate datetime       &lt;br /&gt;&amp;#160; , PackageDuration AS DATEDIFF(second, StartDate       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; , EndDate) PERSISTED       &lt;br /&gt;&amp;#160; , ExtractRowCount int       &lt;br /&gt;&amp;#160; , InsertRowCount int       &lt;br /&gt;&amp;#160; , UpdateRowCount int       &lt;br /&gt;&amp;#160; , IsProcessed bit DEFAULT(0)       &lt;br /&gt;&amp;#160; , CONSTRAINT PK_SsisAudit PRIMARY KEY CLUSTERED       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ( AuditID ASC));      &lt;br /&gt;GO&lt;/font&gt;&lt;/p&gt;  &lt;h4&gt;The Stored Procedures&lt;/h4&gt;  &lt;p&gt;To log the package execution information we’ll use two stored procedures that write the information to the SsisAudit table. The first one is used at the start of the package and will return the id of the inserted row. The second is used to update this row with the end date and the row counters .&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;CREATE PROCEDURE [meta].[uspNewAuditRow]      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; @PackageName varchar(50)       &lt;br /&gt;&amp;#160; , @PackageGUID uniqueidentifier       &lt;br /&gt;&amp;#160; , @PackageVersionGUID uniqueidentifier       &lt;br /&gt;&amp;#160; , @ExecutionID uniqueidentifier       &lt;br /&gt;&amp;#160; , @StartDate datetime       &lt;br /&gt;AS       &lt;br /&gt;INSERT INTO meta.SsisAudit       &lt;br /&gt;&amp;#160; ( PackageName       &lt;br /&gt;&amp;#160; , PackageGUID       &lt;br /&gt;&amp;#160; , PackageVersionGUID       &lt;br /&gt;&amp;#160; , ExecutionID       &lt;br /&gt;&amp;#160; , StartDate       &lt;br /&gt;&amp;#160; , IsProcessed)       &lt;br /&gt;VALUES       &lt;br /&gt;&amp;#160; ( @PackageName       &lt;br /&gt;&amp;#160; , @PackageGUID       &lt;br /&gt;&amp;#160; , @PackageVersionGUID       &lt;br /&gt;&amp;#160; , @ExecutionID       &lt;br /&gt;&amp;#160; , @StartDate       &lt;br /&gt;&amp;#160; ,0);&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;/* Return the id of the inserted row*/      &lt;br /&gt;SELECT CAST(SCOPE_IDENTITY() AS int) AS AuditID       &lt;br /&gt;GO&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;     &lt;br /&gt;CREATE PROCEDURE [meta].[uspUpdateAuditRow]&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; @ExtractRowCount int       &lt;br /&gt;&amp;#160; , @InsertRowCount int       &lt;br /&gt;&amp;#160; , @UpdateRowCount int       &lt;br /&gt;&amp;#160; , @AuditID int       &lt;br /&gt;AS       &lt;br /&gt;UPDATE meta.SsisAudit       &lt;br /&gt;SET EndDate = SYSDATETIME()&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160; , ExtractRowCount = @ExtractRowCount       &lt;br /&gt;&amp;#160; , InsertRowCount = @InsertRowCount       &lt;br /&gt;&amp;#160; , UpdateRowCount = @UpdateRowCount       &lt;br /&gt;&amp;#160; , IsProcessed = 1       &lt;br /&gt;WHERE AuditID = @AuditID      &lt;br /&gt;GO&lt;/font&gt;&lt;/p&gt;  &lt;h5&gt;BIML Snippets &lt;/h5&gt;  &lt;p&gt;To create the logging facility in an SSIS Package use the following code snippets in the BIMLScript that creates the package:&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;lt;!--Variables--&amp;gt;      &lt;br /&gt;&amp;lt;Variables&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;RcExtract&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Namespace=&amp;quot;User&amp;quot; &amp;gt;0&amp;lt;/Variable&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;RcInsert&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Namespace=&amp;quot;User&amp;quot; &amp;gt;0&amp;lt;/Variable&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;RcUpdate&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Namespace=&amp;quot;User&amp;quot; &amp;gt;0&amp;lt;/Variable&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;AuditID&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot; Namespace=&amp;quot;User&amp;quot; &amp;gt;0&amp;lt;/Variable&amp;gt;       &lt;br /&gt;&amp;lt;/Variables&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;lt;Tasks&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;!--Create audit row and get id--&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;ExecuteSQL Name=&amp;quot;SQL Create AuditRow and Get AuditID&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ConnectionName=&amp;quot;metaDB&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ResultSet=&amp;quot;SingleRow&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DirectInput&amp;gt;       &lt;br /&gt;EXEC [meta].[uspNewAuditRow] ?,?,?,?,?       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DirectInput&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameters&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;0&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.PackageName&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;1&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Guid&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.PackageID&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;2&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Guid&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.VersionGUID&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;3&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Guid&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.ExecutionInstanceGUID&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;4&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;DateTime&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.StartTime&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Parameters&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Results&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Result Name=&amp;quot;0&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.AuditID&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Results&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/ExecuteSQL&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;#160;&amp;#160; &amp;lt;!--In Dataflow:--&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Dataflow&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Transformations&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!--Add meta data –&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DerivedColumns Name=&amp;quot;DC add meta data&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Columns&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Column Name=&amp;quot;AuditID&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ReplaceExisting=&amp;quot;false&amp;quot;&amp;gt;       &lt;br /&gt;@AuditID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Column&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Columns&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DerivedColumns&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Transformation&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/Dataflow&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;#160;&amp;#160; &amp;lt;!--Update audit row--&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;ExecuteSQL Name=&amp;quot;SQL Update Audit Row&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ConnectionName=&amp;quot;metaDB&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ResultSet=&amp;quot;None&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DirectInput&amp;gt;       &lt;br /&gt;EXEC [meta].[uspUpdateAuditRow] ?,?,?,?       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DirectInput&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameters&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;0&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.AuditID&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;1&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RcExtract&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;2&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RcInsert&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;3&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RcUpdate&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Parameters&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/ExecuteSQL&amp;gt;       &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;h5&gt;ABOUT BIML&lt;/h5&gt;  &lt;p&gt;You can leverage Business Intelligence Markup Language – or BIML – to automate the creation of &lt;a href="http://www.microsoft.com/sqlserver/en/us/solutions-technologies/enterprise-information-management/integration-services.aspx"&gt;Microsoft SQL Server Integration Services (SSIS) Packages&lt;/a&gt;. BIML is a creation of &lt;a href="http://www.varigence.com/"&gt;Varigence, Inc&lt;/a&gt;. and is available in proprietary products, open source projects, and has been published as an &lt;a href="http://www.varigence.com/documentation/biml/biml_Varigence.Languages.Biml.AstRootNode.html"&gt;open language specification&lt;/a&gt;. The popular open source &lt;a href="http://bidshelper.codeplex.com/"&gt;BIDSHelper project&lt;/a&gt; includes &lt;a href="http://bidshelper.codeplex.com/wikipage?title=Biml%20Package%20Generator&amp;amp;referringTitle=Documentation"&gt;Biml functionality&lt;/a&gt;, enabling anyone to write and execute Biml code for free.&lt;/p&gt;  &lt;p&gt;Do you need a head start with the automation of SSIS packages: consider my &lt;a href="http://blog.in2bi.com/biml-workshop/"&gt;BIML Workshop&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Logging in SSIS with BIML 1 – Logging Task Execution</title><link>http://blog.in2bi.eu/biml/logging-in-ssis-with-biml-1-ndash-logging-task-execution/</link><pubDate>Thu, 03 Jan 2013 14:13:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/biml/logging-in-ssis-with-biml-1-ndash-logging-task-execution/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>0</slash:comments><category domain="http://blog.in2bi.eu/biml/">Biml</category><description>&lt;p&gt;The project deployment model in SSIS (2012) &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2011/07/16/ssis-logging-in-denali.aspx"&gt;offers great default logging functionality&lt;/a&gt;. However you may find yourself in need of additional functionality, especially if you use the package deployment model or an earlier version of SQL Server. In this series on logging I dive into 3 methods:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Logging Task Execution using the OnPostExecute Event      &lt;br /&gt;(this post) &lt;/li&gt;    &lt;li&gt;Logging Package Execution in the control flow. &lt;/li&gt;    &lt;li&gt;Logging Errors using the OnError Event. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;In this post I’ll describe the first method: Logging Task Execution using the &lt;strong&gt;OnPostExecute&lt;/strong&gt; Event. This event is fired after the execution of each task and package. And thus provides a great way to log relevant information like package duration and row counts in the data flow.&lt;/p&gt;  &lt;h4&gt;The SsisEventLog Table&lt;/h4&gt;  &lt;p&gt;To store these events we need a table:&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;CREATE TABLE&amp;#160; meta.SsisEventLog (      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; EventID int IDENTITY(1,1) NOT NULL       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , ExecutionID uniqueidentifier&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , EventLogDate datetime&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , PackageStartDate datetime&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , PackageDuration AS datediff(second, PackageStartDate       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; , EventLogDate) PERSISTED       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , PackageGUID uniqueidentifier&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , PackageVersionGUID&amp;#160;&amp;#160; uniqueidentifier&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , PackageName&amp;#160; varchar(50)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , TaskGUID&amp;#160;&amp;#160; uniqueidentifier&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , TaskName&amp;#160;&amp;#160; varchar(50)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , ExtractRowCount int&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , InsertRowCount int&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , UpdateRowCount int&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , CONSTRAINT&amp;#160; PK_SsisEventLog&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; PRIMARY KEY CLUSTERED (EventID)       &lt;br /&gt;)&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Some remarks:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The PackageDuration column is calculated using the datediff function. It calculates the difference in seconds between the time the event was fired and the start date of the package. &lt;/li&gt;    &lt;li&gt;If the TaskGUID equals to the PackageGUID the event is fired directly after the package was executed. &lt;/li&gt;    &lt;li&gt;The row count columns will be filled by variables we define in the package and we’ll have to find a way to reset them after logging the event. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;To log this information we’ll use a stored procedures that writes the information in the SsisEventLog table and returns a row with 3 columns, all with the value of 0 to reset the variables after logging.&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;CREATE PROCEDURE [meta].[uspLogEvent]&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @ExecutionID [uniqueidentifier]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @PackageStartDate [datetime]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @PackageGUID [uniqueidentifier]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @PackageVersionGUID [uniqueidentifier]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @PackageName [varchar](50)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @TaskGUID [uniqueidentifier]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @TaskName [varchar](50)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @ExtractRowCount [int]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @InsertRowCount [int]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @UpdateRowCount [int]       &lt;br /&gt;AS&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;INSERT INTO [meta].[SsisEventLog](      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ExecutionID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , EventLogDate       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , PackageStartDate       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , PackageGUID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , PackageVersionGUID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , PackageName       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , TaskGUID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , TaskName       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , ExtractRowCount       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , InsertRowCount       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , UpdateRowCount       &lt;br /&gt;)       &lt;br /&gt;VALUES(       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @ExecutionID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , SYSDATETIME()&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @PackageStartDate       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @PackageGUID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @PackageVersionGUID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @PackageName       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @TaskGUID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @TaskName       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @ExtractRowCount       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @InsertRowCount       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , @UpdateRowCount       &lt;br /&gt;);       &lt;br /&gt;SELECT 0 AS ExtractRowCount       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , 0 AS InsertRowCount       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; , 0 AS UpdateRowCount       &lt;br /&gt;;&lt;/font&gt;&lt;/p&gt;  &lt;h4&gt;Creating the log event handler in the package&lt;/h4&gt;  &lt;p&gt;Before we can create this event handler you have to create three variables of type&lt;strong&gt; Int32&lt;/strong&gt; with value &lt;strong&gt;0&lt;/strong&gt; as in this image:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecuteVariables.png"&gt;&lt;img title="OnPostExecuteVariables" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="OnPostExecuteVariables" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecuteVariables_thumb.png" width="404" height="139" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To create the event handler in a package open the Event Handlers tab and select the &lt;strong&gt;package&lt;/strong&gt; in the Executable dropdown box and select the &lt;strong&gt;OnPostExecute&lt;/strong&gt; in the Event handler dropdown box.&lt;/p&gt;  &lt;p&gt;Next drop a &lt;strong&gt;Execute SQL Task&lt;/strong&gt; from the toolbox on the canvas and use the following setting in the &lt;strong&gt;General&lt;/strong&gt; tab:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Name: SQL Log Event &lt;/li&gt;    &lt;li&gt;ResultSet: Single row &lt;/li&gt;    &lt;li&gt;ConnectionType: OLE DB &lt;/li&gt;    &lt;li&gt;Connection: The name of the connection with your log table &lt;/li&gt;    &lt;li&gt;SQLSourceType: Direct imput &lt;/li&gt;    &lt;li&gt;SQLStatement:      &lt;br /&gt;&lt;font size="1" face="Lucida Console"&gt;EXEC [meta].[uspLogEvent] ?,?,?,?,?,?,?,?,?,?&lt;/font&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecute1.png"&gt;&lt;img title="OnPostExecute1" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="OnPostExecute1" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecute1_thumb.png" width="554" height="323" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the &lt;strong&gt;Parameter Mapping&lt;/strong&gt; tab add 9 mappings using the following variable names:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;System:: ExecutionInstanceGUID &lt;/li&gt;    &lt;li&gt;System:: StartTime &lt;/li&gt;    &lt;li&gt;System:: PackageID &lt;/li&gt;    &lt;li&gt;System:: VersionGUID &lt;/li&gt;    &lt;li&gt;System:: PackageName &lt;/li&gt;    &lt;li&gt;System:: SourceID &lt;/li&gt;    &lt;li&gt;System:: SourceName &lt;/li&gt;    &lt;li&gt;User:: RcExtract &lt;/li&gt;    &lt;li&gt;User:: RcInsert &lt;/li&gt;    &lt;li&gt;User:: RcUpdate &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecute2.png"&gt;&lt;img title="OnPostExecute2" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="OnPostExecute2" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecute2_thumb.png" width="554" height="325" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the &lt;strong&gt;Result Set&lt;/strong&gt; tab add 3 results as in the image below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecute3.png"&gt;&lt;img title="OnPostExecute3" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="OnPostExecute3" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecute3_thumb.png" width="554" height="249" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And we are ready with the implementation of the event handler in the SSIS Package.&lt;/p&gt;  &lt;h4&gt;The Results&lt;/h4&gt;  &lt;p&gt;After executing a package with one &lt;strong&gt;Execute SQL Task&lt;/strong&gt; and one &lt;strong&gt;Data Flow Task&lt;/strong&gt; you will see three rows in the SsisEventLog table. Two for the tasks and one for the package:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecuteResult.png"&gt;&lt;img title="OnPostExecuteResult" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="OnPostExecuteResult" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecuteResult_thumb.png" width="554" height="64" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecuteResult2.png"&gt;&lt;img title="OnPostExecuteResult2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="OnPostExecuteResult2" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Logging-in-SSIS-with-BIML-1_98BA/OnPostExecuteResult2_thumb.png" width="554" height="59" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Using this method you can now easily troubleshoot any (performance) issues with the package.&lt;/p&gt;  &lt;h3&gt;Using BIML to implement the event handler&lt;/h3&gt;  &lt;p&gt;To implement this event handler with BIML use the following code snippets in the BIMLScript that creates the package:&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;lt;!--Variables--&amp;gt;      &lt;br /&gt;&amp;lt;Variables&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;RcExtract&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Namespace=&amp;quot;User&amp;quot; &amp;gt;0&amp;lt;/Variable&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;RcInsert&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Namespace=&amp;quot;User&amp;quot; &amp;gt;0&amp;lt;/Variable&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;RcUpdate&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Namespace=&amp;quot;User&amp;quot; &amp;gt;0&amp;lt;/Variable&amp;gt;       &lt;br /&gt;&amp;lt;/Variables&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;lt;!--Events--&amp;gt;      &lt;br /&gt;&amp;lt;Events&amp;gt;       &lt;br /&gt;&amp;lt;Event EventType=&amp;quot;OnPostExecute&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Name=&amp;quot;OnPostExecute&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ConstraintMode=&amp;quot;Linear&amp;quot;&amp;gt;       &lt;br /&gt;&amp;lt;Tasks&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ExecuteSQL Name=&amp;quot;SQL Log Event&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ConnectionName=&amp;quot;NorthwindSales&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ResultSet=&amp;quot;SingleRow&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DirectInput&amp;gt;       &lt;br /&gt;EXEC [meta].[uspLogEvent] 'OnPostExecute',?,?,?,?,?,?,?,?,?,?       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DirectInput&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameters&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;0&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Guid&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.ExecutionInstanceGUID&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;1&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;DateTime&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.StartTime&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;2&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Guid&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.PackageID&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;3&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Guid&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.VersionGUID&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;4&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;String&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.PackageName&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;5&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Guid&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.SourceID&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;6&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;String&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;System.SourceName&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;7&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RcExtract&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;8&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RcInsert&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Parameter Name=&amp;quot;9&amp;quot; Direction=&amp;quot;Input&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DataType=&amp;quot;Int32&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RcUpdate&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Parameters&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Results&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Result Name=&amp;quot;0&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RcExtract&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Result Name=&amp;quot;0&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RcInsert&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Result Name=&amp;quot;0&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RcUpdate&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Results&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ExecuteSQL&amp;gt;       &lt;br /&gt;&amp;lt;/Tasks&amp;gt;       &lt;br /&gt;&amp;lt;/Event&amp;gt;       &lt;br /&gt;&amp;lt;/Events&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;h5&gt;ABOUT BIML&lt;/h5&gt;  &lt;p&gt;You can leverage Business Intelligence Markup Language – or BIML – to automate the creation of &lt;a href="http://www.microsoft.com/sqlserver/en/us/solutions-technologies/enterprise-information-management/integration-services.aspx"&gt;Microsoft SQL Server Integration Services (SSIS) Packages&lt;/a&gt;. BIML is a creation of &lt;a href="http://www.varigence.com/"&gt;Varigence, Inc&lt;/a&gt;. and is available in proprietary products, open source projects, and has been published as an &lt;a href="http://www.varigence.com/documentation/biml/biml_Varigence.Languages.Biml.AstRootNode.html"&gt;open language specification&lt;/a&gt;. The popular open source &lt;a href="http://bidshelper.codeplex.com/"&gt;BIDSHelper project&lt;/a&gt; includes &lt;a href="http://bidshelper.codeplex.com/wikipage?title=Biml%20Package%20Generator&amp;amp;referringTitle=Documentation"&gt;Biml functionality&lt;/a&gt;, enabling anyone to write and execute Biml code for free.&lt;/p&gt;  &lt;p&gt;Do you need a head start with the automation of SSIS packages: consider my &lt;a href="http://blog.in2bi.com/biml-workshop/"&gt;BIML Workshop&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>SQL Server, SSIS, SSAS and SSRS on ONE Server</title><link>http://blog.in2bi.eu/microsoft-business-intelligence/sql-server-ssis-ssas-and-ssrs-on-one-server/</link><pubDate>Tue, 18 Dec 2012 07:26:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/microsoft-business-intelligence/sql-server-ssis-ssas-and-ssrs-on-one-server/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>1</slash:comments><category domain="http://blog.in2bi.eu/microsoft-business-intelligence/">Microsoft Business Intelligence</category><description>&lt;p&gt;Best practice dictates that we use a separate server for each of these SQL Server Services. And this seems logical because otherwise these services will compete over server resources. In IT we call this competition: contention.&lt;/p&gt;  &lt;p&gt;However there are some great reasons to put these services on one box:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Licensing: SQL Server licensing can be expensive. And you need licenses for every server on which a services runs. &lt;/li&gt;    &lt;li&gt;Better resource utilization: Less servers, less power usage, less maintenance and -monitoring cost. &lt;/li&gt;    &lt;li&gt;Sometimes the network is the problem as a lot of data moves from the SQL Engine to SSIS or SSAS resulting in network congesting. If services run on the same machine, SQL Server uses the &lt;a href="http://technet.microsoft.com/en-us/library/ms187892(v=sql.105).aspx"&gt;Shared Memory Protocol&lt;/a&gt; which is faster and leads to less network congestion. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In a scenario with all SQL/BI Services on one server we need some strategies to diminish the described contention. This is of course a big subject and I can only touch the basics in this post and give you some tips.&lt;/p&gt;  &lt;h4&gt;TIP 1: Limit the software and services on the server&lt;/h4&gt;  &lt;p&gt;This seems logical but I have been to several sites where developers remote desktop into the production server to do maintenance- and other jobs. This is certainly not a best practice. Better is to not install any client tools on the server and use a separate developer/test server to do maintenance.&lt;/p&gt;  &lt;h4&gt;TIP 2: Get an overview of your typical daily workload&lt;/h4&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/SQL-SSIS-SSAS-And_86C1/image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/SQL-SSIS-SSAS-And_86C1/image_thumb_1.png" width="544" height="204" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this image I have mapped a typical daily workload to the services needed to perform the workload:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;From 07:00 AM to 23:00 is the extended working day window. Some users start early, others end late: all are extensively opening SSRS reports and querying SSAS cubes. &lt;/li&gt;    &lt;li&gt;From 23:00 to 01:00 AM backups are running for all (source) systems. This is the period we do our own SSAS and SQL Server backups. &lt;/li&gt;    &lt;li&gt;From 01:00 AM tot 07:00 AM is our process window &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In this period:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;we use SSIS to land data from our source systems into the staging database &lt;/li&gt;    &lt;li&gt;we use SSIS to load data from our staging database into the data warehouse &lt;/li&gt;    &lt;li&gt;we’ll process the dimensions and cubes of our SSAS databases. &lt;/li&gt;    &lt;li&gt;we warm the cache of our SSAS database and start distributing reports using SSRS subscriptions and SSIS for large Excel reports. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;With this knowledge we have a clear understanding of potential contention issues. Furthermore we can schedule to stop and start services on a need to use basis. We can use the operating system commands &lt;a href="http://blog.in2bi.com/microsoft-business-intelligence/batch-file-to-start-stop-sql-server/"&gt;NET START and NET STOP&lt;/a&gt; for this purpose.&lt;/p&gt;  &lt;h4&gt;TIP 3 Set Maximum Memory Setting for SQL Server&lt;/h4&gt;  &lt;p&gt;With the &lt;a href="http://msdn.microsoft.com/en-us/library/ms178067.aspx"&gt;max server memory&lt;/a&gt; setting you can place a limit to the amount of buffer pool memory used by SQL Server. Which leads to the question to what amount should we limit the buffer pool memory?&lt;/p&gt;  &lt;p&gt;During our extended working day window we will probably not benefit from a large buffer pool memory: Most queries will probably be answered by Analysis Services. However in the process windows we will benefit from a larger buffer pool memory. We can change this property during the day and schedule these changes by using the sp_configure system stored procedure. Based on 24GB of RAM, reserve 4 GB for the operating system and:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;During working day window set max server memory to 4 GB, reserve 8 GB for SSAS and 8 GB for SSRS. &lt;/li&gt;    &lt;li&gt;During the process window set max server memory to 10 GB, reserving 10GB for SSIS and 8GB for SSAS. &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;TIP 4 Set SSAS Memory Settings&lt;/h4&gt;  &lt;p&gt;The SSAS memory settings are available in the &lt;strong&gt;msmdsrv.ini&lt;/strong&gt; file and in properties window of the server. If the value is between 0 and 100 than this means a percentage of total available physical memory. Above 100 means &lt;u&gt;bytes&lt;/u&gt;. Change these settings to:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Memory\HardMemoryLimit: from the default of 0 to 32 &lt;/li&gt;    &lt;li&gt;Memory\TotalMemoryLimit: from the default of 80 to 28 &lt;/li&gt;    &lt;li&gt;Memory\LowMemoryLimit:from the default of 65 to 24 &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This means that Analysis Services will start freeing up memory once its has reached the LowMemoryLimit threshold of 24% of physical memory. This process will get more aggressive if it reaches the other thresholds.    &lt;br /&gt;While you’re at it change some other memory properties:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;OLAP\Process\BufferMemoryLimit from 60 to 20 &lt;/li&gt;    &lt;li&gt;OLAP\Process\AggregationMemoryLimitMax from 80 to 14 &lt;/li&gt;    &lt;li&gt;OLAP\Process\AggregationMemoryLimitMin from 10 to 4 &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;TIP 5 Set SSRS Memory Settings&lt;/h4&gt;  &lt;p&gt;In the &lt;strong&gt;RSReportServer.config&lt;/strong&gt; file add the WorkingSetMaximum property and set it to 8GB (for our 24GB example):     &lt;br /&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;lt;WorkingSetMaximum&amp;gt;8000000&amp;lt;/WorkingSetMaximum&amp;gt;      &lt;br /&gt;&lt;/font&gt;Restart the reporting services service, so other memory related properties that are based on WorkingSetMaximum get set.&lt;/p&gt;  &lt;h4&gt;TIP 6 Monitor and adapt the memory setting&lt;/h4&gt;  &lt;p&gt;Use the settings in tip 3, 4 en 5 as a starting point but monitor memory usage and change these properties to map them to your workload.&lt;/p&gt;  &lt;h4&gt;TIP 7 Use Windows System Resource Manager to restrict CPU utilization&lt;/h4&gt;  &lt;p&gt;With &lt;a href="http://technet.microsoft.com/en-us/library/hh997019.aspx"&gt;Windows System Resource Manager&lt;/a&gt; (WSRM) you can create custom resource allocation policies to restrict resources (CPU, RAM) to an application. You can map your workload windows to policies and define these policies e.g.: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;policy P&lt;strong&gt;rocessData&lt;/strong&gt; which runs when Analysis Services is processing data, set the CPU percentage for SQL to 45% and 45% for SSAS &lt;/li&gt;    &lt;li&gt;policy &lt;strong&gt;ProcessIndex&lt;/strong&gt; which runs when Analysis Services is processing aggregations, set the CPU percentage for SQL to 10% and 80% for SSAS &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/SQL-SSIS-SSAS-And_86C1/wsrm_resource_allocation_2.png"&gt;&lt;img title="wsrm_resource_allocation" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="wsrm_resource_allocation" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/SQL-SSIS-SSAS-And_86C1/wsrm_resource_allocation_thumb.png" width="554" height="549" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next you can setup calendar rules to apply the different policies to the correct time frames. &lt;/p&gt;  &lt;p&gt;However this has the drawback that you have two calendar schemes: one in SQL agent and one in WSRM that you have to keep in sync. Furthermore it’s possible that there aren’t any CPU contention issues. My advice would be to monitor CPU usage and plan resource allocation policies if necessary based on the monitoring results.&lt;/p&gt;  &lt;h4&gt;TIP 8 Don’t write to the same disk you’re reading from&lt;/h4&gt;  &lt;p&gt;In the daily process window we will typically load large amount of data in our data warehouse:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;We load data from the source system in a staging database. &lt;/li&gt;    &lt;li&gt;From the staging database we load the data in the data warehouse. &lt;/li&gt;    &lt;li&gt;From the data warehouse we load the Analysis Services cubes. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In this scenario put the data warehouse database files on another drive as the staging database and the Analysis Services cubes. &lt;/p&gt;  &lt;h4&gt;Conclusion&lt;/h4&gt;  &lt;p&gt;In this post I focused on diminishing contention issues when using one server for your BI Solution running SQL Server, Analysis Services, Integration Services and Reporting Services. Key aspect is understanding your workload and the role the different applications play as well as the properties you can tweak to diminish contention.&lt;/p&gt;  &lt;h4&gt;References&lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://sqlcat.com/sqlcat/b/technicalnotes/archive/2010/02/08/microsoft-sql-server-2008-analysis-services-consolidation-best-practices.aspx"&gt;Microsoft SQL Server 2008 Analysis Services Consolidation Best Practices&lt;/a&gt;, by the SQLCat team &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh226085.aspx"&gt;SQL Server 2008 R2 Analysis Services Operations Guide&lt;/a&gt;, by the SQLCat team. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms159206.aspx"&gt;Configure Available Memory for Report Server Application&lt;/a&gt;, on MSDN &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc719165(v=SQL.100).aspx"&gt;Best Practices for Data Warehousing with SQL Server 2008&lt;/a&gt;, on MSDN &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd425070(v=SQL.100).aspx"&gt;The Data Loading Performance Guide&lt;/a&gt;, by the SQLCat team. &lt;/li&gt; &lt;/ul&gt;</description></item><item><title>The Red Light Focus</title><link>http://blog.in2bi.eu/data-vizualization/the-red-light-focus/</link><pubDate>Thu, 06 Dec 2012 11:48:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/data-vizualization/the-red-light-focus/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>0</slash:comments><category domain="http://blog.in2bi.eu/data-vizualization/">Data Visualization</category><description>&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Red-Light-Syndrome_AE96/Red%20Light%20District_2.jpg"&gt;&lt;img title="Red Light District" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Red Light District" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/Red-Light-Syndrome_AE96/Red%20Light%20District_thumb.jpg" width="404" height="271" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’m a big fan of Stephen Few who has written some nice &lt;a href="http://www.perceptualedge.com/library.php"&gt;books on data visualization and dashboard design.&lt;/a&gt; What I dislike in his writings (and that of a lot of other business intelligence practitioners) is the overemphasize on bad performance.&lt;/p&gt;  &lt;p&gt;The &lt;a href="http://www.perceptualedge.com/blog/?p=1374"&gt;winner and runner-up of the recently held dashboard competition&lt;/a&gt; by Stephen Few both overemphasize the worst performers of a fictitious high school mathematics class. This is done by ranking them from worst to good grades and by adding additional (red) signs marking the worst performers.&lt;/p&gt;  &lt;p&gt;Of course this overemphasizing isn’t that strange because our analytical mind has a problem-solving attitude. And yes: bad performers are a problem. And most of the time the solution to tackle these underachievers is easy: fire them.&lt;/p&gt;  &lt;p&gt;But the good- and top performers are much more interesting. If you analyze these sweet-spots you may find interesting behavior that can be repeated on more places in your organization, e.g.:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;In department XYZ a strict quality control on incoming key products is conducted, resulting in far less scrap and rework. &lt;/li&gt;    &lt;li&gt;In company ABC management enforces a great service identity resulting in less headcount turnover and great customer satisfaction. &lt;/li&gt;    &lt;li&gt;Sales representative Brit has found a great way to identify prospective buyers with significant budgets and her new customers realize 200% more than the average new customer. &lt;/li&gt;    &lt;li&gt;James uses the &lt;a href="http://www.khanacademy.org/"&gt;online colleges of Khan Academy&lt;/a&gt; to deepen his understanding of Mathematics which contributed to his better grades. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;These best practices can probably be reproduced by others in your company or class. And can potentially cause much more impact than firing underachievers. However identifying the root cause of top performing actions is more difficult: You probably need to ask a lot of questions to these overachievers to determine better- and best practices.&lt;/p&gt;  &lt;p&gt;This difficulty shouldn’t be a reason to ignore them!&lt;/p&gt;</description></item><item><title>BIML Script To Disable Indexes And Later Rebuild Indexes</title><link>http://blog.in2bi.eu/biml/biml-script-to-disable-indexes-and-later-rebuild-indexes/</link><pubDate>Sun, 02 Dec 2012 15:49:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/biml/biml-script-to-disable-indexes-and-later-rebuild-indexes/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>0</slash:comments><category domain="http://blog.in2bi.eu/biml/">Biml</category><description>&lt;div&gt;&lt;biml xmlns="http://schemas.varigence.com/biml.xsd"&gt;In an &lt;a href="http://blog.in2bi.com/microsoft-business-intelligence/ssis-pattern-drop-and-rebuilt-indexes-dynamically/"&gt;earlier post&lt;/a&gt; I described the necessity to drop non-clustered indexes before loading data in your data warehouse and rebuilding them afterwards. Later I found a better approach: Instead of dropping the indexes you can just disable them with:&lt;/biml&gt;&lt;/div&gt;  &lt;div&gt;&lt;biml xmlns="http://schemas.varigence.com/biml.xsd"&gt;&lt;font size="1" face="Lucida Console"&gt;ALTER INDEX &amp;lt;IndexName&amp;gt; ON &amp;lt;TableName&amp;gt; DISABLE&lt;/font&gt;&lt;/biml&gt;&lt;/div&gt;  &lt;div&gt;The loading process will now perform faster because SQL Server won’t update these indexes when you are loading. After completion of loading you can rebuild them with:&lt;/div&gt;  &lt;div&gt;&lt;biml xmlns="http://schemas.varigence.com/biml.xsd"&gt;&lt;font size="1" face="Lucida Console"&gt;ALTER INDEX &amp;lt;IndexName&amp;gt; ON &amp;lt;TableName&amp;gt; REBUILD&lt;/font&gt;&lt;/biml&gt;&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;The BIML code at the bottom of this post is part of a larger script in which I loop through a dataset that describe a series of packages. In relevant packages this script is added and executed. In the image of the package you can see what happens:&lt;/div&gt;  &lt;ul&gt;   &lt;li&gt;With the Execute SQL Task ‘SQL GetIndexList’ I will get a list of statements I need to disable and rebuild the non-clustered indexes of the target table. The result (Full result set) of this SQL statement is stored in an object variable with the name IndexList &lt;/li&gt;    &lt;li&gt;In the For Each Loop Container ‘FELC Disable Index’ I loop through the rows of this IndexList and use the Execute SQL Task ‘SQL Disable Index’ for each row and thus disabling the relevant non-clustered indexes. &lt;/li&gt;    &lt;li&gt;Next is the DataFlow Task … which I have kept empty for this purpose. &lt;/li&gt;    &lt;li&gt;I end with a For Each Loop Container ‘FELC Rebuild Indexes’ in which I rebuild every index I disabled earlier.      &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/33e3fc577e4a_8E38/HandleIndexesWithBiml_8.png"&gt;&lt;img title="HandleIndexesWithBiml" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="HandleIndexesWithBiml" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/33e3fc577e4a_8E38/HandleIndexesWithBiml_thumb_3.png" width="304" height="609" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h3&gt;WARNING&lt;/h3&gt;  &lt;p&gt;In most data warehouse scenarios this is a viable pattern. However in a scenario were you load relatively few rows in a large table with many non-clustered indexes, the rebuild of these indexes can take very long.&lt;/p&gt;  &lt;h3&gt;&lt;biml xmlns="http://schemas.varigence.com/biml.xsd"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/biml&gt;&lt;/h3&gt; &lt;biml xmlns="http://schemas.varigence.com/biml.xsd"&gt;   &lt;h3&gt;The Biml Script to create this package:&lt;/h3&gt;    &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;#160; &amp;lt;Biml xmlns=&amp;quot;&lt;/font&gt;&lt;a href="http://schemas.varigence.com/biml.xsd&amp;quot;"&gt;&lt;font size="1" face="Lucida Console"&gt;http://schemas.varigence.com/biml.xsd&amp;quot;&lt;/font&gt;&lt;/a&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;# string TableName=&amp;quot;[Production].[ProductCategory]&amp;quot;;#&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Connections&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;OleDbConnection Name=&amp;quot;TargetDatabase&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ConnectionString=&amp;quot;Data Source=.\SQL2012; Initial Catalog=AdventureWorks2012; Provider=SQLNCLI10.1; Integrated Security=SSPI;&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CreatePackageConfiguration=&amp;quot;true&amp;quot;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/OleDbConnection&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Connections&amp;gt;         &lt;br /&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Packages&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Package Name=&amp;quot;PKG Handle Indexes Gracefully&amp;quot; ConstraintMode=&amp;quot;Linear&amp;quot;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Variables&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;IndexList&amp;quot; DataType=&amp;quot;Object&amp;quot; /&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;DisableStatement&amp;quot; DataType=&amp;quot;String&amp;quot; /&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Variable Name=&amp;quot;RebuildStatement&amp;quot; DataType=&amp;quot;String&amp;quot; /&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Variables&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Tasks&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ExecuteSQL Name=&amp;quot;SQL GetIndexList&amp;quot; ConnectionName=&amp;quot;TargetDatabase&amp;quot; ResultSet=&amp;quot;Full&amp;quot;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DirectInput&amp;gt;         &lt;br /&gt;SELECT         &lt;br /&gt;&amp;#160;&amp;#160; DisableStatement = 'ALTER INDEX ' + QUOTENAME(i.Name) + ' ON '         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; + QUOTENAME(SCHEMA_NAME (o.SCHEMA_ID)) + '.'         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; + QUOTENAME(o.name) + ' DISABLE'         &lt;br /&gt;&amp;#160;&amp;#160; ,RebuildStatement = 'ALTER INDEX ' + QUOTENAME(i.Name) + ' ON '         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; + QUOTENAME(SCHEMA_NAME (o.SCHEMA_ID)) + '.'         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; + QUOTENAME(o.name) + ' REBUILD'         &lt;br /&gt;FROM sys.indexes i         &lt;br /&gt;JOIN sys.objects o         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ON o.object_id=i.object_id         &lt;br /&gt;WHERE i.is_primary_key = 0&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;AND i.is_unique_constraint = 0&amp;#160;&amp;#160; &lt;br /&gt;AND i.is_disabled = 0&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;AND i.type_desc = N'NONCLUSTERED'&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;AND o.TYPE = N'U'&amp;#160;&amp;#160; &lt;br /&gt;AND QUOTENAME(SCHEMA_NAME (o.SCHEMA_ID)) + '.'         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; + QUOTENAME(o.name)='&amp;lt;#=TableName#&amp;gt;'         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DirectInput&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Results&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Result Name=&amp;quot;0&amp;quot; VariableName=&amp;quot;User.IndexList&amp;quot; /&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Results&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ExecuteSQL&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!--Loop through indexes and disable them--&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ForEachAdoLoop Name=&amp;quot;FELC Disable Indexes&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SourceVariableName=&amp;quot;User.IndexList&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ConstraintMode=&amp;quot;Linear&amp;quot; &amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;VariableMappings&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;VariableMapping Name=&amp;quot;0&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.DisableStatement&amp;quot; /&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/VariableMappings&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Tasks&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ExecuteSQL Name=&amp;quot;SQL Disable Index&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ConnectionName=&amp;quot;TargetDatabase&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ResultSet=&amp;quot;None&amp;quot; &amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;VariableInput VariableName=&amp;quot;User.DisableStatement&amp;quot; /&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ExecuteSQL&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Tasks&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ForEachAdoLoop&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Dataflow Name=&amp;quot;DFT YourDataFlowTask&amp;quot; /&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!--DataFlow Logic--&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!--Loop through indexes and rebuild them--&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ForEachAdoLoop Name=&amp;quot;FELC Rebuild Indexes&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SourceVariableName=&amp;quot;User.IndexList&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ConstraintMode=&amp;quot;Linear&amp;quot; &amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;VariableMappings&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;VariableMapping Name=&amp;quot;1&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; VariableName=&amp;quot;User.RebuildStatement&amp;quot; /&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/VariableMappings&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Tasks&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ExecuteSQL Name=&amp;quot;SQL Rebuild Index&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ConnectionName=&amp;quot;TargetDatabase&amp;quot;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ResultSet=&amp;quot;None&amp;quot; &amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;VariableInput VariableName=&amp;quot;User.RebuildStatement&amp;quot; /&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ExecuteSQL&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Tasks&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ForEachAdoLoop&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Tasks&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Package&amp;gt;         &lt;br /&gt;&amp;#160; &amp;lt;/Packages&amp;gt;         &lt;br /&gt;&amp;lt;/Biml&amp;gt;         &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;    &lt;h3&gt;ABOUT BIML&lt;/h3&gt;    &lt;p&gt;You can leverage Business Intelligence Markup Language – or BIML – to automate the creation of &lt;a href="http://www.microsoft.com/sqlserver/en/us/solutions-technologies/enterprise-information-management/integration-services.aspx"&gt;Microsoft SQL Server Integration Services (SSIS) Packages&lt;/a&gt;. BIML is a creation of &lt;a href="http://www.varigence.com/"&gt;Varigence, Inc&lt;/a&gt;. and is available in proprietary products, open source projects, and has been published as an &lt;a href="http://www.varigence.com/documentation/biml/biml_Varigence.Languages.Biml.AstRootNode.html"&gt;open language specification&lt;/a&gt;. The popular open source &lt;a href="http://bidshelper.codeplex.com/"&gt;BIDSHelper project&lt;/a&gt; includes &lt;a href="http://bidshelper.codeplex.com/wikipage?title=Biml%20Package%20Generator&amp;amp;referringTitle=Documentation"&gt;Biml functionality&lt;/a&gt;, enabling anyone to write and execute Biml code for free.&lt;/p&gt;    &lt;p&gt;Do you need a head start with the automation of SSIS packages: consider my &lt;a href="http://blog.in2bi.com/biml-workshop/"&gt;BIML Workshop&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>DWH Deck 2.0</title><link>http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0/</link><pubDate>Thu, 15 Nov 2012 22:21:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>1</slash:comments><category domain="http://blog.in2bi.eu/dwh-deck/">DWH Deck</category><description>&lt;p&gt;In&amp;nbsp; my presentation at the &lt;a href="http://www.dwhautomation.com/"&gt;DWHAutomation conference&lt;/a&gt; in Amsterdam on 20.09.2012 I gave a demo of the new version of the DWH Deck: DWH Deck 2.0. Here are the slides of that presentation:&lt;/p&gt;
&lt;p&gt;&lt;iframe width="427" height="356" src="http://www.slideshare.net/slideshow/embed_code/14481239" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border-width: 1px 1px 0px; border-style: solid; border-color: rgb(204, 204, 204); margin-bottom: 5px;" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen"&gt; &lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;This new release is &lt;u&gt;now available&lt;/u&gt; for interested parties.     &lt;br /&gt;
(If you are interested send me an e-mail: &lt;a href="mailto:marco@in2bi.nl"&gt;marco@in2bi.nl&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;The DWH Deck is a simple tool that allows you to build and maintain your data warehouse better and faster. The basic idea is best described by looking at the input and the output:&lt;/p&gt;
&lt;h4&gt;INPUT:&lt;/h4&gt;
&lt;ul&gt;
    &lt;li&gt;Meta data that describes the the source object&lt;/li&gt;
    &lt;li&gt;Templates that describe target table and load pattern      &lt;br /&gt;
    (I have provided 9, but you can change these and add additional templates)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;OUTPUT:&lt;/h4&gt;
&lt;ul&gt;
    &lt;li&gt;SQL Statements to create target tables and additional objects,&lt;/li&gt;
    &lt;li&gt;SQL Statements to create stored procedures to load the data&lt;/li&gt;
    &lt;li&gt;BIML Files to create SSIS Packages that will handle the data load      &lt;br /&gt;
    &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In these blog posts you&amp;rsquo;ll find additional information:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://blog.dwhdeck.com/dwh-deck/support/"&gt;Support&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-step-1-create-solution-database-and-other-connections/"&gt;1. Create solution database and other connections&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-step-2-add-jobs-by-selecting-source-objects-and-applying-a-template/"&gt;2. Add Jobs by selecting source objects and applying a template&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-step-3-publish-the-jobs-to-create-the-sql-statements-and-biml-files/"&gt;3. Publish the jobs to create the SQL Statements and BIML Files&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-step-2-add-jobs-by-selecting-source-objects-and-applying-a-template/"&gt;4. Create SSIS packages from the created BIML Files&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-how-to-change-or-add-templates/"&gt;How to change or add templates&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>DWH Deck 2.0: How to change or add templates</title><link>http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0-how-to-change-or-add-templates/</link><pubDate>Thu, 15 Nov 2012 22:15:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0-how-to-change-or-add-templates/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>0</slash:comments><category domain="http://blog.in2bi.eu/dwh-deck/">DWH Deck</category><description>&lt;p&gt;In &lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0/"&gt;previous blog posts&lt;/a&gt; I described the basics of working with the DWH Deck. In this post I&amp;rsquo;ll dive a bit deeper into the templates.&lt;/p&gt;
&lt;h3&gt;Importance of templates&lt;/h3&gt;
&lt;p&gt;The template concept is the basis of the DWH Deck:    &lt;br /&gt;
The DWH Deck combines the information from the source system with the selected templates to create the target data warehouse and the necessary ETL.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/572df33891f3_B651/image_2.png"&gt;&lt;img width="554" height="306" title="image" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/572df33891f3_B651/image_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the template tab of the DWH Deck there are 3 areas, indicated above:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;The area that describes the naming conventions you want to use for your target schema, target table and job.&lt;/li&gt;
    &lt;li&gt;The area where you can define additional (housekeeping) columns that you want to add to the target table:
    &lt;ul&gt;
        &lt;li&gt;AuditID&lt;/li&gt;
        &lt;li&gt;Start date&lt;/li&gt;
        &lt;li&gt;End date&lt;/li&gt;
        &lt;li&gt;Record source&lt;/li&gt;
        &lt;li&gt;Surrogate key&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;The template statement area. In this part you can edit the selected template statement. You can choose between:
    &lt;ul&gt;
        &lt;li&gt;Create target objects,        &lt;br /&gt;
        to create target tables, indexes and views&lt;/li&gt;
        &lt;li&gt;Create load procedure,       &lt;br /&gt;
        to create the stored procedure to load the data&lt;/li&gt;
        &lt;li&gt;Create BIML Package,       &lt;br /&gt;
        to create the &lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-step-2-add-jobs-by-selecting-source-objects-and-applying-a-template/"&gt;BIML files that you can use to create SSIS Packages&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Placeholder tokens&lt;/h3&gt;
&lt;p&gt;At several places you can use placeholders that are replaced with the actual value when a job is created.&lt;/p&gt;
&lt;p&gt;In the next image of the dimension template the placeholder @ObjectName is marked. When you create a job for the Customer dimension this placeholder is replaced with the name of the source object. (Customer) Which will result in:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Load_dimCustomer for the job name&lt;/li&gt;
    &lt;li&gt;Customer for the target table name (in schema dim)&lt;/li&gt;
    &lt;li&gt;Additional surrogate key column with the name: dimCustomerKey&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/572df33891f3_B651/image_4.png"&gt;&lt;img width="554" height="169" title="image" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/572df33891f3_B651/image_thumb_1.png" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the template statement 2 types of placeholders are used:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Type A starts with one @ character (e.g.: @SourceConnection)&lt;/li&gt;
    &lt;li&gt;Type B representing a column list that starts with two @@ characters (e.g.: @@SourceColumns)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The current Type A placeholders are:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;@CreatedOn, the date the job was created&lt;/li&gt;
    &lt;li&gt;@TemplateID, the id of the template used&lt;/li&gt;
    &lt;li&gt;@TemplateName, the name of the template used&lt;/li&gt;
    &lt;li&gt;@MetaConnection, the name of the connection with the solution (meta) tables&lt;/li&gt;
    &lt;li&gt;@MetaServer, the name and instance of the server for the meta connection&lt;/li&gt;
    &lt;li&gt;@MetaDatabase, the name of the database for the meta connection&lt;/li&gt;
    &lt;li&gt;@SourceConnection, the name of the source connection&lt;/li&gt;
    &lt;li&gt;@SourceServer, the name of the database for the source connection&lt;/li&gt;
    &lt;li&gt;@SourceDatabase, the name of the source database&lt;/li&gt;
    &lt;li&gt;@SourceObject, the source object e.g: [dbo].[vw_Customers]&lt;/li&gt;
    &lt;li&gt;@ObjectName, the name of the source object e.g.: Customers&lt;/li&gt;
    &lt;li&gt;@JobID, the id of the job&lt;/li&gt;
    &lt;li&gt;@JobName, the name of the job&lt;/li&gt;
    &lt;li&gt;@TargetConnection, the name of the target connection&lt;/li&gt;
    &lt;li&gt;@TargetServer, the name and instance of the server for the target connection&lt;/li&gt;
    &lt;li&gt;@TargetDatabase, the name of the target database&lt;/li&gt;
    &lt;li&gt;@TargetSchema, the name of the target schema&lt;/li&gt;
    &lt;li&gt;@TargetTable, the name of the target table&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The current Type B placeholders are:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;@@SourceColumns      &lt;br /&gt;
    ... [col1], [col2]..&lt;/li&gt;
    &lt;li&gt;@@NotSelectedSourceColumns&lt;/li&gt;
    &lt;li&gt;@@TargetColumns&lt;/li&gt;
    &lt;li&gt;@@DefintionTargetColumns      &lt;br /&gt;
    &amp;hellip; [col1] INT IDENTiTY(1,1), [col2] varchar(50) ..&lt;/li&gt;
    &lt;li&gt;@@PKColumns&lt;/li&gt;
    &lt;li&gt;@@BKColumns&lt;/li&gt;
    &lt;li&gt;@@srcColumns      &lt;br /&gt;
    &amp;hellip; src.[col1], src.[col2]&lt;/li&gt;
    &lt;li&gt;@@tgtColumns      &lt;br /&gt;
    &amp;hellip; tgt.[col1], tgt.[col2]&lt;/li&gt;
    &lt;li&gt;@@WhereList      &lt;br /&gt;
    &amp;hellip; src.[col1]=tgt.[col1] AND src.[col2]=tgt.[col2]&lt;/li&gt;
    &lt;li&gt;@@DimWhereList      &lt;br /&gt;
    &amp;hellip; his.[col1]=cur.[col1] AND his.[col2]=cur.[col2]&lt;/li&gt;
    &lt;li&gt;@@LKPColumns     &lt;br /&gt;
    &amp;hellip; &amp;lt;Column SourceColumn=col1 TargetColumn=col1 /&amp;gt;&lt;/li&gt;
    &lt;li&gt;@@SCDColumns     &lt;br /&gt;
    &amp;hellip; &amp;lt;Column SourceColumn=col1 TargetColumn=col1&amp;nbsp; MappingType=Key /&amp;gt;&lt;/li&gt;
    &lt;li&gt;@@DimViewColumns     &lt;br /&gt;
    &amp;hellip; cur.[col1], his.[col1] as col1_his&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Type B placeholders are defined in a separate stored procedure: meta.usp_ColumnLists.    &lt;br /&gt;
You can view and add definitions that are used for these placeholders.&lt;/p&gt;
&lt;p&gt;In this blog post I described the templates.   &lt;br /&gt;
This concludes my first &lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0/"&gt;series of post&lt;/a&gt; on this version of the DWH Deck.&lt;/p&gt;</description></item><item><title>DWH Deck 2.0: Step 1 Create solution database and other connections</title><link>http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0-step-1-create-solution-database-and-other-connections/</link><pubDate>Wed, 14 Nov 2012 06:42:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0-step-1-create-solution-database-and-other-connections/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>0</slash:comments><category domain="http://blog.in2bi.eu/dwh-deck/">DWH Deck</category><description>&lt;p&gt;The DWH Deck is a simple tool that allows you to build and maintain your data warehouse better and faster.&lt;/p&gt;
&lt;p&gt;In this blog post I&amp;rsquo;ll describe the steps necessary to create the solution database and other connections that will be used as source or target connection.&lt;/p&gt;
&lt;p&gt;In this sample we will use the &lt;strong&gt;Northwind&lt;/strong&gt; database as the source connection.     &lt;br /&gt;
And an empty database &lt;strong&gt;NorthwindDW1 &lt;/strong&gt;which we will use as the solution- and target database.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/e9ee038c2aab_BE89/image_2.png"&gt;&lt;img width="288" height="352" title="image" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/e9ee038c2aab_BE89/image_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the DWH Deck first create the solution:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Enter &lt;b&gt;DW1&lt;/b&gt; in the Name Textbox&lt;/li&gt;
    &lt;li&gt;Enter &lt;b&gt;Server[\Instance] &lt;/b&gt;in the Server Textbox       &lt;br /&gt;
    (Do not use &amp;ldquo;localhost&amp;rdquo; or &amp;ldquo; .&amp;rdquo; for your server name)&lt;/li&gt;
    &lt;li&gt;Choose &lt;b&gt;NorthwindDW1&lt;/b&gt; in the Database Listbox.&lt;/li&gt;
    &lt;li&gt;Click the &lt;b&gt;Create solution &lt;/b&gt;button&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/e9ee038c2aab_BE89/image_4.png"&gt;&lt;img width="504" height="339" title="image" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/e9ee038c2aab_BE89/image_thumb_1.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The DW1 connection is added to the tree view, beneath Connections.    &lt;br /&gt;
In the Message text box feedback is provided about the actions performed by the DWHDeck.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Next check in SQL Server Management Studio that the tables and stored procedures are added to the database.&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;In Object Explorer open the &lt;b&gt;NorthwindDW1&lt;/b&gt; database.&lt;/li&gt;
    &lt;li&gt;Open &lt;b&gt;Tables&lt;/b&gt;, &lt;b&gt;Programmability&lt;/b&gt; and &lt;strong&gt;Stored Procedures &lt;/strong&gt;and check the tables and stored procedures that are added to the solution database.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/e9ee038c2aab_BE89/image_6.png"&gt;&lt;img width="272" height="352" title="image" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/e9ee038c2aab_BE89/image_thumb_2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Next we will create the source connection to the Northwind database:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Click &lt;strong&gt;Connection&lt;/strong&gt; in the menu bar.&lt;/li&gt;
    &lt;li&gt;Enter &lt;b&gt;Northwind&lt;/b&gt; in the Name Textbox&lt;/li&gt;
    &lt;li&gt;Enter &lt;b&gt;Server[\Instance] &lt;/b&gt;in the Server Textbox&lt;/li&gt;
    &lt;li&gt;Choose &lt;b&gt;Northwind&lt;/b&gt; in the Database Listbox.&lt;/li&gt;
    &lt;li&gt;Click &lt;b&gt;Save&lt;/b&gt; in the menu bar.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/e9ee038c2aab_BE89/image_8.png"&gt;&lt;img width="504" height="339" title="image" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/e9ee038c2aab_BE89/image_thumb_3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After we have created the connections we can start creating the jobs.    &lt;br /&gt;
This will be the subject of my &lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-step-2-add-jobs-by-selecting-source-objects-and-applying-a-template/"&gt;next blog post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0/"&gt;Overview of the DWH Deck 2.0&lt;/a&gt;&lt;/p&gt;</description></item><item><title>DWH Deck 2.0: Step 2 Add Jobs by selecting source objects and applying a template</title><link>http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0-step-2-add-jobs-by-selecting-source-objects-and-applying-a-template/</link><pubDate>Wed, 14 Nov 2012 06:41:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0-step-2-add-jobs-by-selecting-source-objects-and-applying-a-template/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>0</slash:comments><category domain="http://blog.in2bi.eu/dwh-deck/">DWH Deck</category><description>&lt;p&gt;The DWH Deck is a simple tool that allows you to build and maintain your data warehouse better and faster.&lt;/p&gt;
&lt;p&gt;In a &lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-step-1-create-solution-database-and-other-connections/"&gt;previous blog post&lt;/a&gt; we created the solution database and added connections which we&amp;rsquo;ll use as source or target connection in this post.     &lt;br /&gt;
In this post we will create jobs that will describe a source to target mapping.&lt;/p&gt;
&lt;p&gt;Add the first job with the DWH Deck&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Click &lt;b&gt;Job&lt;/b&gt; in the menu bar&lt;/li&gt;
    &lt;li&gt;Select &lt;b&gt;Northwind&lt;/b&gt; in the Source connection listbox&lt;/li&gt;
    &lt;li&gt;Select &lt;b&gt;[dbo].[Categories]&lt;/b&gt; in the Source table listbox&lt;/li&gt;
    &lt;li&gt;Select &lt;strong&gt;1 Staging in&lt;/strong&gt; in the Template listbox&lt;/li&gt;
    &lt;li&gt;Select &lt;strong&gt;DW1&lt;/strong&gt; in the Target connection listbox&lt;/li&gt;
    &lt;li&gt;Click &lt;b&gt;Save&lt;/b&gt; in the menu bar&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/a95351a6b02b_CD4B/image_2.png"&gt;&lt;img width="504" height="339" title="image" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/a95351a6b02b_CD4B/image_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Repeat above steps for the following tables:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Customers&lt;/li&gt;
    &lt;li&gt;Employees&lt;/li&gt;
    &lt;li&gt;OrderDetails&lt;/li&gt;
    &lt;li&gt;Orders&lt;/li&gt;
    &lt;li&gt;Products&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/a95351a6b02b_CD4B/image_4.png"&gt;&lt;img width="504" height="339" title="image" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/a95351a6b02b_CD4B/image_thumb_1.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this step we created the jobs that describe the source to target mapping.    &lt;br /&gt;
After we have created these jobs we can publish them.     &lt;br /&gt;
This will be the subject of my &lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-step-3-publish-the-jobs-to-create-the-sql-statements-and-biml-files/"&gt;next blog post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0/"&gt;Overview of the DWH Deck 2.0&lt;/a&gt;&lt;/p&gt;</description></item><item><title>DWH Deck 2.0: Step 3 Publish the jobs to create the SQL Statements and BIML Files</title><link>http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0-step-3-publish-the-jobs-to-create-the-sql-statements-and-biml-files/</link><pubDate>Wed, 14 Nov 2012 06:40:00 GMT</pubDate><guid isPermaLink="true">http://blog.in2bi.eu/dwh-deck/dwh-deck-2-0-step-3-publish-the-jobs-to-create-the-sql-statements-and-biml-files/</guid><dc:creator>Marco Schreuder</dc:creator><slash:comments>0</slash:comments><category domain="http://blog.in2bi.eu/dwh-deck/">DWH Deck</category><description>&lt;p&gt;The DWH Deck is a simple tool that allows you to build and maintain your data warehouse better and faster.&lt;/p&gt;
&lt;p&gt;In &lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0/"&gt;previous blog posts&lt;/a&gt; we created connections and jobs that describe the source to target mapping. In this blog post we&amp;rsquo;ll examine the effects of publishing the jobs.&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Click &lt;b&gt;Publish&lt;/b&gt; on the menu bar&lt;/li&gt;
    &lt;li&gt;Check the created files in (default location:) &lt;b&gt;C:\in2bi\DWHDeck&lt;/b&gt;&lt;/li&gt;
    &lt;li&gt;Check the created tables and stored procedures in the &lt;b&gt;NorthwindDW1&lt;/b&gt; database.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/a95351a6b02b_CD4B/image_6.png"&gt;&lt;img width="504" height="142" title="image" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/a95351a6b02b_CD4B/image_thumb_2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/a95351a6b02b_CD4B/image_8.png"&gt;&lt;img width="304" height="478" title="image" alt="image" border="0" src="http://blog.in2bi.com/files/media/image/Windows-Live-Writer/a95351a6b02b_CD4B/image_thumb_3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this step we examined the effects of publishing the jobs: The SQL statements that are executed and the BIML files that are build.    &lt;br /&gt;
In the &lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0-step-2-add-jobs-by-selecting-source-objects-and-applying-a-template/"&gt;next post&lt;/a&gt; I&amp;rsquo;ll describe how you create SSIS Packages from these BIML files.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.in2bi.com/dwh-deck/dwh-deck-2-0/"&gt;Overview of the DWH Deck 2.0&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>
