<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BI Monkey &#187; Integration Services</title>
	<atom:link href="http://www.bimonkey.com/tag/ssis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bimonkey.com</link>
	<description>James Beresford on Microsoft BI and Consulting in Sydney, Australia</description>
	<lastBuildDate>Mon, 06 Sep 2010 00:59:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Convert Text Stream to String</title>
		<link>http://www.bimonkey.com/2010/09/convert-text-stream-to-string/</link>
		<comments>http://www.bimonkey.com/2010/09/convert-text-stream-to-string/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 00:59:17 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Microsoft BI]]></category>
		<category><![CDATA[Flat File]]></category>
		<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Text Stream]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=809</guid>
		<description><![CDATA[One of the ongoing challenges with SSIS is its difficulty in handling complex or damaged text files. One approach to dealing with such files is to bring them all in as one wide text column and then split them using code. Sometimes, the file is too wide for that approach, so below is an extension of [...]]]></description>
			<content:encoded><![CDATA[<p>One of the ongoing challenges with SSIS is its difficulty in handling complex or damaged text files. One approach to dealing with such files is to <a title="Importing the entire contents of the file into a single column, then parsing it in a script task" href="http://www.bimonkey.com/2009/06/flat-file-source-error-the-column-delimiter-for-column-columnname-was-not-found/">bring them all in as one wide text column and then split them using code</a>. Sometimes, the file is too wide for that approach, so below is an extension of that method where you import the column as a text stream (DT_TEXT, or Unicode DT_NTEXT) and then split the text stream in a script transformation:</p>
<blockquote><p>        <span style="color: #008000;">&#8216; Declare variables</span><br />
        <span style="color: #0000ff;">Dim </span>TextStream <span style="color: #0000ff;">As</span> <span style="color: #0000ff;">Byte</span>()            <span style="color: #008000;">&#8216; To hold Text Stream</span><br />
        <span style="color: #0000ff;">Dim</span> TextStreamAsString <span style="color: #0000ff;">As String</span>  <span style="color: #008000;">  &#8216; To Hold Text Stream converted to String</span><br />
        <span style="color: #0000ff;">Dim</span> StringArray() <span style="color: #0000ff;">As String</span>       <span style="color: #008000;">  &#8216; To contain split Text Stream</span></p>
<p><strong>       <span style="color: #008000;"> &#8216; Load Text Stream into variable</span><br />
        TextStream = Row.TextStreamColumn.GetBlobData(0, <span style="color: #0000ff;">CInt</span>(Row.Column0.Length))</strong></p>
<p><strong>     <span style="color: #008000;">   &#8216; Convert Text Stream to string</span><br />
        TextStreamAsString = System.Text.Encoding.ASCII.GetString(TextStream)</strong></p>
<p>        <span style="color: #008000;">&#8216; Split string into array and output</span><br />
        StringArray = TextStreamAsString.Split(<span style="color: #800000;">&#8220;#&#8221;</span>)        </p>
<p>        Row.Column1 = StringArray(1).ToString<br />
        Row.Column2 = StringArray(2).ToString<br />
        Row.Column3 = StringArray(3).ToString  </p></blockquote>
<p>An important thing to note is that in the step where the Text Stream is converted to a string, the Encoding will depend on the type of text stream you are bringing in &#8211; Unicode files will need &#8221;Unicode&#8221; instead of &#8220;ASCII&#8221;. Also I have used a hash (&#8221;#&#8221;) as the column delimiter but that value will vary depending on what type of file you are bringing in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2010/09/convert-text-stream-to-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying an SSIS Package through code</title>
		<link>http://www.bimonkey.com/2010/09/modifying-an-ssis-package-through-code/</link>
		<comments>http://www.bimonkey.com/2010/09/modifying-an-ssis-package-through-code/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 11:16:12 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=806</guid>
		<description><![CDATA[Part of any SSIS development experience inevitably results in you discovering a minor mistake or something that was missed a long way into the development cycle &#8211; or even after, in testing (you do test your code, right?). Then you are faced with the tedious job of opening every single package, making a change in [...]]]></description>
			<content:encoded><![CDATA[<p>Part of any SSIS development experience inevitably results in you discovering a minor mistake or something that was missed a long way into the development cycle &#8211; or even after, in testing (you do test your code, right?). Then you are faced with the tedious job of opening every single package, making a change in every one&#8230; and getting some serious mouse finger. Much like I once did when I learned about <a title="SQL Server SSIS BufferTempStoragePath andBLOBTempStoragePath" href="http://www.bimonkey.com/2008/04/blobtempstoragepath-and-buffertempstoragepath/">BufferTempStoragePath</a>.</p>
<p>Fortunately, there is a way to automate these fixes. The SSIS Object model is (relatively) easily manipulated through .NET languages &#8211; so it&#8217;s not too difficult to write a small program that will change your package. Below is a sample I knocked up that will add a variable to an existing package and save the change:</p>
<blockquote><p><span style="color: #0000ff;">using </span>System;<br />
<span style="color: #0000ff;">using</span>Microsoft.SqlServer.Server;<br />
<span style="color: #0000ff;">using</span>Microsoft.SqlServer.Dts.Runtime;</p>
<p><span style="color: #0000ff;">namespace</span> Package_Modifier<br />
{<br />
    <span style="color: #0000ff;">class</span> Program<br />
    {<br />
        <span style="color: #0000ff;">static void</span> Main(<span style="color: #0000ff;">string</span>[] args)<br />
        {<br />
            <span style="color: #008000;">// Initialize an Application and Package object</span><br />
            <span style="color: #33cccc;">Application </span>app = <span style="color: #0000ff;">new</span> <span style="color: #33cccc;">Application</span>();<br />
            <span style="color: #33cccc;">Package</span> package = <span style="color: #0000ff;">null</span>;</p>
<p>            <span style="color: #008000;">// Set a package path</span><br />
            <span style="color: #33cccc;">String</span>pkgPath = <span style="color: #800000;">&#8220;C:\\BI Monkey\\SamplePackage.dtsx&#8221;</span>;</p>
<p>            <span style="color: #008000;">// Load the package in package object</span><br />
            package = app.LoadPackage(pkgPath, <span style="color: #0000ff;">null</span>);</p>
<p><strong>            <span style="color: #008000;">// Add the new variable</span><br />
            package.Variables.Add(<span style="color: #800000;">&#8220;NewVar&#8221;</span>, <span style="color: #0000ff;">false</span>, <span style="color: #800000;">&#8220;User&#8221;</span>, 0);</strong></p>
<p>            <span style="color: #008000;">// Save the package</span><br />
            app.SaveToXml(pkgPath, package, <span style="color: #0000ff;">null</span>);<br />
          }<br />
    }<br />
}</p></blockquote>
<p>You can essentially make any change you like to a package &#8211; I&#8217;ve chosen adding a variable because it&#8217;s an easy manipulation of the package object and I&#8217;ve got a long way to go before I work out how to do anything much harder <img src='http://www.bimonkey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2010/09/modifying-an-ssis-package-through-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Row Sampling Transformation</title>
		<link>http://www.bimonkey.com/2010/06/the-row-sampling-transformation/</link>
		<comments>http://www.bimonkey.com/2010/06/the-row-sampling-transformation/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 12:30:40 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Row Sampling]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=683</guid>
		<description><![CDATA[It&#8217;s been a long time since I did one of these! In this post I will be covering the Row Sampling Transformation. The sample package can be found here for 2005 and guidelines on use are here.
What does the Row Sampling Transformation do?
The Row Sampling Transformation takes a fixed number of rows from a source [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 179px"><img class="  " title="Row Sampling Transformation" src="http://www.bimonkey.com/uploads/componentreview/rowsampling1.jpg" alt="Fig 1: The Row Sampling Transformation" width="169" height="64" /><p class="wp-caption-text">Fig 1: The Row Sampling Transformation</p></div>
<p>It&#8217;s been a long time since I did one of these! In this post I will be covering the Row Sampling Transformation. The sample package can be found <a title="SQL 2005 SSIS Row Sampling Transformation Sample (Right Click, Save As)" href="http://www.bimonkey.com/uploads/componentreview/Row%20Sampling%20Transformation%20Basics%202005.dtsx">here for 2005</a> and guidelines on use are <a title="Using samples from BI Monkey" href="http://www.bimonkey.com/support/using-ssis-samples-from-this-site/">here</a>.</p>
<h2>What does the Row Sampling Transformation do?</h2>
<p>The Row Sampling Transformation takes a fixed number of rows from a source data set &#8211; in a similar manner to the <a title="The Percentage Sampling Transformation" href="http://www.bimonkey.com/2009/06/the-percentage-sampling-transformation/">Percentage Sampling Transformation</a>, except that instead of a proportion of your data, it takes a fixed number of rows. It splits your data set into two sets, the Sampled and Unsampled outputs, as below where 10 rows of a 100 row data set have been sampled:</p>
<div class="wp-caption alignnone" style="width: 629px"><img class=" " title="The Row Sampling Transformation outputs" src="http://www.bimonkey.com/uploads/componentreview/rowsampling3.jpg" alt="The Row Sampling Transformation outputs" width="619" height="235" /><p class="wp-caption-text">Fig 2: The Row Sampling Transformation outputs</p></div>
<p>The assigning of rows to an output is nominally random, but given the same data set and random seed (explained below), the same rows will always be selected each time you run the package.</p>
<h2>Configuring the Row Sampling Transformation</h2>
<p>There are two important properties to configure on the transformation. First is the Number of rows, which determines how many rows will fall into the Sample output. Second is the random seed. This seed tells the random selection algorithm which rows to choose. If you fix the seed, you will get consistent results &#8211; if you understand a little about randomisation in computing, you will understand randomness is a bit of a relative concept to a computer. If you leave the checkbox unselected, the package will pick a random seed based on the OSes&#8217; tick count, so results will appear to change.</p>
<p>You can also name your Sample and Unselected outputs, should you wish. It&#8217;s worth noting that you aren&#8217;t obliged to actually use either output downstream of the component, so you can use this component to select a fixed number of rows from your source &#8211; or ignore a fixed number of rows from your source, by only using the Unselected output.</p>
<div class="wp-caption alignnone" style="width: 481px"><img class="   " title="Configuring the Row Sampling Transformation" src="http://www.bimonkey.com/uploads/componentreview/rowsampling2.jpg" alt="Configuring the Row Sampling Transformation" width="471" height="356" /><p class="wp-caption-text">Fig 3: Configuring the Row Sampling Transformation</p></div>
<h2>Where should you use the Row Sampling Transformation?</h2>
<p>The main use for this would be to select a fixed size subset of data. This subset could be used for Data Mining test sets, or for limiting your data set size when testing packages &#8211; e.g. if you are running against a multimillion row data source, you could just run the package with 100 rows to see if your processes worked.</p>
<p>MSDN Documentation for the Row Sampling Transformation can be found here for <a title="SQL 2008 Row Sampling Transformation Documentation on MSDN" href="http://msdn.microsoft.com/en-us/library/ms141200.aspx">2008</a> and here for <a title="SQL 2005 Row Sampling Transformation Documentation on MSDN" href="http://msdn.microsoft.com/en-us/library/ms141200(SQL.90).aspx">2005</a>.</p>
<p>If you need specific help or advice, or have suggestions on the post, please leave a comment and I will do my best to help you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2010/06/the-row-sampling-transformation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Other Blog roundup</title>
		<link>http://www.bimonkey.com/2010/05/other-blog-roundup/</link>
		<comments>http://www.bimonkey.com/2010/05/other-blog-roundup/#comments</comments>
		<pubDate>Fri, 28 May 2010 04:32:46 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Integration Services]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=768</guid>
		<description><![CDATA[Shockingly, it appears it&#8217;s not just me on the Internet blogging about Microsoft BI  
I&#8217;ve added a couple of new links to by Relevant blogs. First up is Boyan Penev&#8217;s blog- a good blog that I&#8217;ve been referencing in my recent excursions into MDX. He&#8217;s also just joined the consultancy that I work for, [...]]]></description>
			<content:encoded><![CDATA[<p>Shockingly, it appears it&#8217;s not just me on the Internet blogging about Microsoft BI <img src='http://www.bimonkey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve added a couple of new links to by Relevant blogs. First up is <a title="Boyan Penev on Microsoft BI" href="http://www.bp-msbi.com/">Boyan Penev&#8217;s blog</a>- a good blog that I&#8217;ve been referencing in my recent excursions into MDX. He&#8217;s also just joined the consultancy that I work for, which is a happy coincidence.</p>
<p>Next is <a title="A blog about SSIS and Business Intelligence" href="http://ssisbi.com/">Duane Douglas&#8217;s SSISBI.com</a>- particularly for his posts on programmatically building SSIS packages which is a 12 part series starting <a title="Building SSIS Packages Programatically" href="http://ssisbi.com/building-ssis-packages-programmatically-part-1/">here</a>. It is comparatively easy to build packages from code. One of the extensions of my <a title="BI Monkey SSIS ETL Framework " href="http://ssisetlframework.codeplex.com/">ETL Framework project</a> that I&#8217;m very keen on doing is getting a utility built that generates packages that conform to the framework, rather than using templates which are easier to break. Hence my current fervent studies in C# which will no doubt please Todd McDermid.</p>
<p>On the subject of <a title="Todd McDermid's blog" href="http://toddmcdermid.blogspot.com/">Todd</a>, he recently presented at a <a title="SQL Saturday 27" href="http://toddmcdermid.blogspot.com/2010/05/sql-saturday-27-recap.html">SQL Saturday</a>, and put up a few presentations which I think were pretty on the nose about their subjects. First of those was a <strong>Business Intelligence and Data Warehouse Primer</strong> &#8211; which for newcomers to DW/BI laid out the landscape nicely. The second was on the options available for <strong>Dimension Processing in SSIS</strong>. Finally there was one on the guts of SSIS which is in the same territory as my own ABC of ETL with SSIS. Follow <a title="SQL Saturday 27 recap" href="http://toddmcdermid.blogspot.com/2010/05/sql-saturday-27-recap.html">this link</a> to get to the post with the presentations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2010/05/other-blog-roundup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The BI Monkey SSIS ETL Framework</title>
		<link>http://www.bimonkey.com/2010/04/the-bi-monkey-ssis-etl-framework/</link>
		<comments>http://www.bimonkey.com/2010/04/the-bi-monkey-ssis-etl-framework/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 11:01:34 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[BI Monkey News]]></category>
		<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Framework]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=749</guid>
		<description><![CDATA[I have, after at least 3 incarnations of building SSIS based ETL control frameworks, decided to do a fourth and (possibly) final one &#8211; for all to share. The alpha release of this is available now on CodePlex @ http://ssisetlframework.codeplex.com. I&#8217;ve put an aplha up, rather than a better tested Beta because the youngest BI [...]]]></description>
			<content:encoded><![CDATA[<p>I have, after at least 3 incarnations of building SSIS based ETL control frameworks, decided to do a fourth and (possibly) final one &#8211; for all to share. The alpha release of this is available now on CodePlex @ <a title="BI Monkey SSIS ETL Framework" href="http://ssisetlframework.codeplex.com">http://ssisetlframework.codeplex.com</a>. I&#8217;ve put an aplha up, rather than a better tested Beta because the youngest BI Monkey in my household appears to be unhappy being a baby right now and is taking me away from this side project.</p>
<p>It&#8217;s fairly standard stuff from my point of view &#8211; it&#8217;s metadata driven framework that consists of a single control package and a template execution package. I&#8217;ve aimed to include the following features, all of which can be turned on or off in the metadata without altering any code.</p>
<ul>
<li>Recoverability</li>
<li>Extraction constraints</li>
<li>Execution order</li>
<li>Dependencies</li>
<li>Failure handling</li>
</ul>
<p>The SSIS packages are pretty much a simple interface for where the meat of the decision making is occurring &#8211; in a bundle of stored procedures where it&#8217;s a lot easier to write and maintain complex decisions about processing than in SSIS.</p>
<p>I&#8217;m adhering to my own self-set principles on usability as well, namely to hit these targets:</p>
<ul>
<li>High visibility of operation via reports</li>
<li>Fully commented code</li>
<li>No acronynms in table and field names</li>
<li>Any codes used exposed in a metadata table</li>
</ul>
<p>I will be doing a demo of it at the AUSSUG session in Sydney this coming Tuesday as part of the SSIS round table which is taking place:</p>
<blockquote><p><strong>James Beresford:  ETL Frameworks</strong></p>
<p>Design and Implementation considerations when building ETL Control Frameworks, Including the debut demo of the BI Monkey ETL Framework</p>
<p><strong>Kevin Wong:  Practical ADO. NET</strong></p>
<p>Three practical showcases using ADO.NET in SSIS including re-usable in memory resultsets</p>
<p><strong>Glyn Llewellyn:  Putting the T back into ETL</strong></p>
<p>Looking at alternative ways in SSIS to perform data transformations and correction and discussing the advantages and disadvantages of each method</p>
<p><em>(Full details at the <a title="Australian SQL Server User Group" href="http://www.sqlserver.org.au/">AUSSUG website</a></em>)</p></blockquote>
<p>I hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2010/04/the-bi-monkey-ssis-etl-framework/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Loops and Lookups &#8211; a performance problem</title>
		<link>http://www.bimonkey.com/2010/03/loops-and-lookups-a-performance-problem/</link>
		<comments>http://www.bimonkey.com/2010/03/loops-and-lookups-a-performance-problem/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 23:29:16 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Lookup]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=742</guid>
		<description><![CDATA[A bit of a performance tuning nugget around loops and lookups which I faced recently.
We have a scenario where we are looping a few hundred times to execute a series of changing SQL statements, then passing the data through lookups before writing to target. We are doing this with a mix of the standard lookup and [...]]]></description>
			<content:encoded><![CDATA[<p>A bit of a performance tuning nugget around loops and lookups which I faced recently.</p>
<p>We have a scenario where we are looping a few hundred times to execute a series of changing SQL statements, then passing the data through lookups before writing to target. We are doing this with a mix of the standard lookup and <a title="Lookup Plus Component" href="http://www.cozyroc.com/ssis/lookup">Cozyroc&#8217;s Lookup Plus</a> task. However we were finding that while executing each SQL query took less than a second, the SSIS package was taking a long time to run each loop.</p>
<p>The loop was taking the query and then pausing for a while before moving any data. Eventually we realised this pause was SSIS building up the caches for the lookups. The standard lookups were running off a pre-built cache but the CozyRoc task doesn&#8217;t support caching and had to rebuild each lookup cache every time the loop was instantiated &#8211; not a big job but repeated a few hundred times those few seconds soon mount up.</p>
<p>The lessons here are:</p>
<ol>
<li>If you are reusing a lookup multiple times, use the <a title="Cache Transform" href="http://msdn.microsoft.com/en-us/library/bb895264.aspx">Cache Transform</a> to preload the cache into memory (2008 onwards)</li>
<li>Be aware of the performance implication of caching lookups and the fact that they will be rebuilt each time the Data Flow is started</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2010/03/loops-and-lookups-a-performance-problem/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SSIS Command Line Utilities part 2: dtexec</title>
		<link>http://www.bimonkey.com/2010/03/ssis-command-line-utilities-part-2-dtexec/</link>
		<comments>http://www.bimonkey.com/2010/03/ssis-command-line-utilities-part-2-dtexec/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 09:57:06 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dtexec]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=712</guid>
		<description><![CDATA[In my previous post on dtutil, I looked at the command line utility to move and alter SSIS packages. In this post I will be looking at dtexec, the command line utility that executes packages. It allows for significant alteration of run-time options, including configured values, connections, logging and so on.
dtexec: Basic Package Execution
Like dtutil, [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a title="SSIS Command Line Utilities part 1: dtutil" href="http://www.bimonkey.com/2010/01/ssis-command-line-utilities-part-1-dtutil/">previous post on dtutil</a>, I looked at the command line utility to move and alter SSIS packages. In this post I will be looking at <strong>dtexec</strong>, the command line utility that executes packages. It allows for significant alteration of run-time options, including configured values, connections, logging and so on.</p>
<h2>dtexec: Basic Package Execution</h2>
<p>Like dtutil, dtexec uses a similar set of basic options to identify where the package you are operating on is located: <strong>/F</strong>ile, <strong>/D</strong>TS &amp; <strong>/SQ</strong>L. The eagle eyed among you will note that while the full option name is the same the abbreviated is slightly different, though their operation is the same. There is also a slight difference in the /SQL additional options &#8211; because no movement of the package is taking place, you only need to specify the <strong>/Ser</strong>ver, <strong>/P</strong>assword and <strong>/U</strong>ser for the package being executed (rather than separate identification of the Source and Destination package). Similarly there is a <strong>/De</strong>crypt option for providing the password to encrypted packages. For details on this, check either my previous post or MSDN documentation.</p>
<p>There are two important options around basic execution. First is the <strong>/X86</strong> option. This forces SQL Agent to to execute the package in 32-bit mode on a 64-bit server, which can be important in scenarios where 64-bit compatibility isn&#8217;t available. This commonly is an issue with drivers &#8211; however this is ignored when running from the command line. When running scenarios where you have SSIS servers in your environment running in 32 and 64-bit you probably want to read this MSDN article first: <a title="64-bit Considerations for Integration Services" href="http://msdn.microsoft.com/en-us/library/ms141766.aspx">64-bit Considerations for Integration Services</a>.</p>
<p>The second is the the option to <strong>/Va</strong>lidate the package instead of executing it. What this does is halt the package after the validation phase &#8211; this can be useful for testing in deployment scenarios. How I sometimes use it is following deployment with a dtutil script, I run a dtexec script to validate the deployed packages, which helps catch any issues with missing / incorrect configurations etc. before you do a test run. This can be used in conjunction with the <strong>/W</strong>[arnAsError] option, which will treat a warning as an Error and cause validation to fail.</p>
<p>As a side note, you can place comments in the dtexec command line using the <strong>/Rem</strong> option.</p>
<h2>dtexec: Configuring Execution</h2>
<p>Execution can be configured using a number of options. First up is the ability to get dtexec to reference a file with all your dtexec options set in it, using the <strong>/Com</strong>[mandFile] {filespec} option. This can be handy if you are in an environment where you call dtexec via a remote tool such as Control M that has a character limit in terms of the batch command it can send.</p>
<p>You can provide or override the configurations used in execution using the <strong>/Conf</strong>[igFile] {filespec} to point at an XML configuration file. Similarly you can override specified connection settings using the <strong>/Conn</strong>[ection] id_or_name;{connection_string} option &#8211; multiple instances of this option are allowed and you can either point at a connection name or the GUID of the connection. You can associate an SSIS logging type with package execution using the <strong>/L</strong>[ogger] classid_orprogid;{configstring} option &#8211; this could be useful in troubleshooting if you don&#8217;t want logging enabled during normal execution but want to be able to turn it on for debug.</p>
<p>Individual Package properties such as variable values can be <strong>/Set</strong> &#8211; and you can set as many as is required. Finally you can set the Maximum number of executables permitted using the <strong>/M</strong>[axConcurrent] {concurrent_executables} option.</p>
<h2>dtexec: Using Checkpoints</h2>
<p>dtexec can make a package override its defined checkpoint usage settings &#8211; though as i&#8217;ve alluded to before, be very careful when using checkpointing as you won&#8217;t always get the expected results. But the options available are to turn <strong>/CheckP</strong>ointing {on\off}, specify the actual file using <strong>/CheckF</strong>ile and specify the usage of Checkpoints at package start using <strong>/Res</strong>tart {deny | force | ifPossible}. These options match the settings in the package of SaveCheckpoints, CheckpointFile and CheckpointUsage.</p>
<h2>dtexec: Execution Logging and Reporting</h2>
<p>When running packages from dtexec, you get some additional logging options which can be useful when you are trying to do a more detailed debug on a package. Some are useful for immediate visualisation in the console window as you execute while others create file based logs.</p>
<p>The first console option is <strong>/Cons</strong>oleLog, which allows you to write to the console window the same entries that would normally be captured by SSIS execution logging. You can select which of these columns you want to capture, the most important of these likely to be <strong>M</strong>essage. Further fine tuning in the settings for this option allow you to tighten the logging to a specific task or event &#8211; again as per standard logging. Next is <strong>/Rep</strong>orting  level, which tunes what type of event to capture &#8211; <strong>E</strong>rrors, <strong>I</strong>nformation, <strong>W</strong>arnings and so on. Usually when you want this level of reporting i&#8217;d advise using the <strong>V</strong>erbose switch to just capture everything. There is also the capability to create an event exclusion list for this option. Finally, <strong>/Su</strong>m will put a count of the number of rows the next component will receive in the log.</p>
<p>If you want to push all this logging out to a file (and the logs can get pretty big so they can blow out the console window pretty quickly) you can write them out using the <strong>/VLog</strong> option. If you need to venture further into debugging you can create the dump files <span><span>.mdmp and .tmp using either the </span></span><strong>/DumpOnError</strong> option to dump on any error<strong> </strong>or <strong>/Dump</strong> with a specified error to only generate the files under certain circumstances. These are advanced options and to understand the output i&#8217;d advise reading the MSDN article <a title="Working with Debug Dump Files" href="http://msdn.microsoft.com/en-us/library/cc280548.aspx">Working with Debug Dump Files</a> first.</p>
<h2>dtexec: Package Verification</h2>
<p>The dtexec utility offers a few options to verify the package you are pointing at is the one you intend to execute. First up is the option to verify the build versions using the <strong>/VerifyB</strong>uild option which allows you to tell dtexec to only run the package if it has the specified Major (and optionally Minor) build version. These are the values set at the control flow level in the SSIS package you are calling. You can check the package has a valid digital signature using <strong>/VerifyS</strong>igned option. Finally are the options to match the GUID of the package you are executing using <strong>/VerifyP</strong>ackageId and the version GUID of the package using the <strong>/VerifyV</strong>ersionID option.</p>
<p>All of the options above are interesting additional protections to ensure your system is running the code that it should be, but realistically they are poor and fiddly substitutes for a proper release management process.</p>
<h2>Why use dtexec?</h2>
<p>Most of the options above are of course covered in SQL Agent execution options, but there are scenarios where dtexec can prove useful &#8211; most commonly where SQL Agent isn&#8217;t available or isn&#8217;t permitted to be used by IT policy. It also has value in deployment and testing scenarios. Most of the time I would advocate using SQL Agent to schedule and automate your jobs, but it&#8217;s good to have such a flexible tool available.</p>
<p>There is also a GUI option, dtexecui.exe which allows for the configuration of almost all the above options using a simple GUI. It also has the advantage of being able to generate the dtexec command line prompt as well, making syntax errors much more avoidable.</p>
<p>Official MSDN documentation can be found <a title="dtexec Utility for SQL2008" href="http://msdn.microsoft.com/en-us/library/ms162810.aspx">here for 2008</a> and <a title="dtexec Utility for SQL2005" href="http://msdn.microsoft.com/en-us/library/ms162810(SQL.90).aspx">here for 2005</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2010/03/ssis-command-line-utilities-part-2-dtexec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AUSSUG Upcoming Sessions</title>
		<link>http://www.bimonkey.com/2010/02/aussug-upcoming-sessions/</link>
		<comments>http://www.bimonkey.com/2010/02/aussug-upcoming-sessions/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 10:54:45 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[BI Monkey News]]></category>
		<category><![CDATA[Microsoft BI]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[PerformancePoint]]></category>
		<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=734</guid>
		<description><![CDATA[In case you aren&#8217;t in the Australian SQL Server User Group, AUSSUG, there are a few upcoming sessions in Sydney which will be pretty useful &#8211; check out the official site to register. Sessions are free and always useful.
Lunchtime Wed 3rd March, 2010 &#8211; Ensuring Optimal Performance in SQL Server 2008 Based Applications with Viktor [...]]]></description>
			<content:encoded><![CDATA[<p>In case you aren&#8217;t in the Australian SQL Server User Group, <a title="Australian SQL Server User Group" href="http://www.sqlserver.org.au/">AUSSUG</a>, there are a few upcoming sessions in Sydney which will be pretty useful &#8211; check out the official site to register. Sessions are free and always useful.</p>
<p><strong>Lunchtime Wed 3rd March, 2010</strong> &#8211; Ensuring Optimal Performance in SQL Server 2008 Based Applications with Viktor Isakov</p>
<p><strong>Evening * Thu * 4th Mar 2010</strong> &#8211; What&#8217;s new in Reporting Services 2008 R2 and PerformancePoint Services 2010 with Peter Myers, presenting what&#8217;s new in the upcoming release of Reporting Services 2008 R2 and PerformancePoint Services 2010</p>
<p>And TBA date in <strong>April 2010</strong> &#8211; Knights of the SSIS Round Table &#8211; Kevin Wong, Glyn Llewelyn and <strong>myself </strong>will be presenting a series of mini demos followed by Q&amp;A, so a chance to pick some expert brains</p>
<p>Hope to catch you at one of the sessions!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2010/02/aussug-upcoming-sessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSIS Command Line Utilities part 1: dtutil</title>
		<link>http://www.bimonkey.com/2010/01/ssis-command-line-utilities-part-1-dtutil/</link>
		<comments>http://www.bimonkey.com/2010/01/ssis-command-line-utilities-part-1-dtutil/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 09:16:45 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dtutil]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=703</guid>
		<description><![CDATA[I am back on the study wagon, getting ready for Exam 70-448: TS: Microsoft SQL Server 2008, Business Intelligence Development and Maintenance. One topic that is key for is understanding the command line utilities that allow you to carry out various functions across all the BI technologies. Possibly in excessive depth, but no-one can accuse [...]]]></description>
			<content:encoded><![CDATA[<p>I am back on the study wagon, getting ready for Exam <a title="Exam 70-448: TS: Microsoft SQL Server 2008, Business Intelligence Development and Maintenance" href="http://www.microsoft.com/learning/en/us/Exam.aspx?ID=70-448&amp;locale=en-us">70-448: TS: Microsoft SQL Server 2008, Business Intelligence Development and Maintenance</a>. One topic that is key for is understanding the command line utilities that allow you to carry out various functions across all the BI technologies. Possibly in excessive depth, but no-one can accuse the MS BI certifications of being easy.</p>
<p>There are two that impact SSIS &#8211; <strong>dtutil</strong> and <strong>dtexec</strong>. In simple terms, dtutil moves packages, and dtexec executes them. In this post I will be focussing on dtutil. dtexec will be covered in a later post.</p>
<h2>dtutil: deploying packages</h2>
<p>The main use of dtutil is to script the deployment of packages. For file operations it is equivalent to a simple copy operation, though you can add SSIS specific operations, such as changing the package GUID. However it also allows for movement to and from the SQL Server msdb store, which can&#8217;t be done via copy / paste.</p>
<p>Deploying a package requires you specify its source location using one of the following options:</p>
<ul>
<li><strong>/Fi</strong> (or /File) + File Path + Package Name.dtsx &#8211; for packages in the File System</li>
<li><strong>/DT</strong> (or /DTS) + Package Name &#8211; for packages in the SSIS Package Store</li>
<li><strong>/SQ</strong> (or /SQL) + Package Name &#8211; for packages in msdb</li>
</ul>
<p>There are a few important things to note about the above options. Firstly for File System operations, you need to specify the .dtsx extension. Secondly, for SSIS Package store operations you don&#8217;t need to, even though it is still strictly speaking a file system operation. Finally, you don&#8217;t need to know where the Package Store is &#8211; dtutil works that out for you, which is handy if you have custom setups of the package store.</p>
<p>For packages located in msdb, you may also need to provide connection details using the following options:</p>
<ul>
<li><strong>/SourceS </strong>(or /SourceServer) &#8211; the source server name. If not used, it assumes localhost</li>
<li><strong>/SourceU</strong> (or /SourceUser) &#8211; the SQL Authentication user name</li>
<li><strong>/SourceP</strong> (or /SourcePassword) &#8211; the SQL Authentication Password</li>
</ul>
<p>Note that the username and password options are only required if SQL Authentication is being used. If left out, dtutil will try and authenticate to msdb using Windows Authentication for the current user. </p>
<p>Next up, you need to tell dtutil to copy the package and specify the destination. The option to move it is <strong>/C</strong> or (/Copy). This is then followed by the same options as specifying the source - though without the preceding backslash (i.e. Fi, DT or SQ) &#8211; then a semicolon, and finally the destination path. If you are using a SQL Server destination you may also need to provide connection details with the /DestS, /DestU and /DestP options.</p>
<p>As usual, an example is worth its weight in gold, so heres some to help you understand. In each case I will give the Full and Abbreviated versions &#8211; both of which do exactly the same job.</p>
<p>Moving a package from File to SSIS Package Store:</p>
<blockquote><p>dtutil <strong>/File</strong> C:\Package.dtsx <strong>/Copy</strong> DTS;Package</p>
<p>dtutil <strong>/Fi</strong> C:\Package.dtsx <strong>/C</strong> DT;Package</p></blockquote>
<p>Moving a package from msdb on a Named Instance of SQL Server using SQL Server Authentication to the file system</p>
<blockquote><p>dtutil <strong>/SQL</strong> Folder\Package <strong>/SourceServer</strong> SQLSERVER.INSTANCE <strong>/SourceUser</strong> Monkey_User <strong>/SourcePassword</strong> P@$$word <strong>/Copy</strong> File;C:\Package.dtsx</p>
<p>dtutil <strong>/SQ</strong> Folder\Package <strong>/SourceS</strong> SQLSERVER.INSTANCE <strong>/SourceU</strong> Monkey_User <strong>/SourceP </strong>P@$$word<strong> /C</strong> FI;C:\Package.dtsx</p></blockquote>
<p>Using a little batch scripting these can easily be converted into jobs which will deploy a bundle of packages quickly and easily.</p>
<h2>dtutil: altering packages</h2>
<p>dtutil is more than a deployment tool &#8211; it can also alter packages using the following options:</p>
<ul>
<li><strong>/En</strong>crypt &#8211; copies and encrypts the package with a specified password and protection level</li>
<li><strong>/I</strong>DRegenerate &#8211; Generates a new GUID for the package</li>
<li><strong>/Si</strong>gn  &#8211; Applies a digital signature to a package</li>
</ul>
<p>The last two can be useful as options within the deployment process, where the Encrypt can replace the Copy operation if you want the deployed environments packages to be more secure.</p>
<h2>dtutil: file and folder operations</h2>
<p>Finally, dtutil can work components of the file system or MSDB folder structures, creating and deleting files and folders</p>
<ul>
<li><strong>/Del</strong>ete &#8211; Delete a package</li>
<li><strong>/Ex</strong>ists &#8211; Test if a package exists</li>
<li><strong>/FC</strong>reate &#8211; Create a folder</li>
<li><strong>/FDe</strong>lete &#8211; Delete a folder</li>
<li><strong>/FDi</strong>rectory &#8211; List the contents of a folder</li>
<li><strong>/FE</strong>xists &#8211; Test if a folder exists</li>
<li><strong>/FR</strong>ename &#8211; Rename a folder</li>
<li><strong>/M</strong>ove &#8211; Move a package from one location to another</li>
</ul>
<p>Most of these would be useful in an initial deployment or for tidying up.</p>
<h2>dtutil: other things</h2>
<p>There are a few leftover functions which I don&#8217;t have a categorisation, so here they are.</p>
<ul>
<li><strong>/Q</strong>uiet &#8211; suppress prompts</li>
<li><strong>/R</strong>emark &#8211; add a comment</li>
<li><strong>/Dec</strong>rypt &#8211; decrypt a package as an operation is performed</li>
</ul>
<h2>Why use dtutil?</h2>
<p>The main reason for using dtutil is simply that the BIDS supplied deployment options, and all that mucking about with Deployment Manifests, is limited, not as scriptable, and also has been buggy, having problems with configuration files (though I believe this is now fixed in 2008, but since I stopped using it long ago, I can&#8217;t be sure). dtutil also offers additional functionality, such as being able to script package operations such as encryption.</p>
<p>Official MSDN documentation can be found <a title="SQL 2008: dtutil Utility" href="http://msdn.microsoft.com/en-us/library/ms162820.aspx">here for 2008</a> and here for <a title="SQL 2005: dtutil Utility" href="http://msdn.microsoft.com/en-us/library/ms162820(SQL.90).aspx">here for 2005</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2010/01/ssis-command-line-utilities-part-1-dtutil/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>BIDS Helper</title>
		<link>http://www.bimonkey.com/2009/12/bids-helper/</link>
		<comments>http://www.bimonkey.com/2009/12/bids-helper/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 05:16:29 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Microsoft BI]]></category>
		<category><![CDATA[BIDS]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=701</guid>
		<description><![CDATA[When you are a BI Monkey like me, you probably spend a fair bit of your time buried deep in Business Intelligence Development Studio (BIDS) and probably wishing it was a little less frustrating to work with.
Enter&#8230; BIDS Helper
Over at codeplex there is a project called BIDS Helper, which adds some useful additional functionality to the standard BIDS [...]]]></description>
			<content:encoded><![CDATA[<p>When you are a BI Monkey like me, you probably spend a fair bit of your time buried deep in Business Intelligence Development Studio (BIDS) and probably wishing it was a little less frustrating to work with.</p>
<h2>Enter&#8230; BIDS Helper</h2>
<p>Over at codeplex there is a project called <a title="BIDS Helper" href="http://bidshelper.codeplex.com/">BIDS Helper</a>, which adds some useful additional functionality to the standard BIDS environment.  It improves the development environment for integration, analysis and reporting services.  In this post I will focus more on the SSIS capabilities that are added.  The additional functionality is fully documented on the codeplex site, and I will highlight some of the more useful functions below &#8211; the links are to the documentation which is nice and visual, making it easy to understand.</p>
<p><a href="http://bidshelper.codeplex.com/wikipage?title=Expression%20and%20Configuration%20Highlighter&amp;referringTitle=Home">Expression and Configuration Highlighter</a> - this adds a highlight to components, connection managers and variables that are controlled by an expression and / or configuration, which allows you to rapidly see what is subject to change at runtime.</p>
<p><a href="http://bidshelper.codeplex.com/wikipage?title=Expression%20List&amp;referringTitle=Home">Expression List</a> &#8211; this lists every property that is set by a variable (though currently not expressions that set the value of variables) &#8211; great for finding out what is actually in the package, as these things can be easily overlooked otherwise</p>
<p><a href="http://bidshelper.codeplex.com/wikipage?title=Non-Default%20Properties%20Report&amp;referringTitle=Home">Non-Default Properties Report</a> &#8211; this lists any property in the package that is set to a non-default value. Very handy for debugging and seeing what is non standard.</p>
<p><a href="http://bidshelper.codeplex.com/wikipage?title=SSIS%20Performance%20Visualization&amp;referringTitle=Home">SSIS Performance Visualization</a>- this executes the package and presents a gantt chart of the execution time, and also can present performance over time &#8211; useful when performance tuning.</p>
<p><a href="http://bidshelper.codeplex.com/wikipage?title=Variables%20Window%20Extensions&amp;referringTitle=Home">Variables Window Extensions</a> - this adds the functionality of being able to change a variables scope &#8211; very handy for when you create a variable at the wrong scope (something I do all the time).</p>
<p><a title="BIDS Helper" href="http://bidshelper.codeplex.com/">BIDS Helper</a> is a handy little tool that adds a few nice functions for SSIS developers without intefering with the existing UI or design environment &#8211; I thoroughly recommend installing it, especially as it&#8217;s free!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2009/12/bids-helper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
