<?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>SQL Fool &#187; Business Intelligence</title>
	<atom:link href="http://sqlfool.com/category/business-intelligence/feed/" rel="self" type="application/rss+xml" />
	<link>http://sqlfool.com</link>
	<description>Adventures in SQL Tuning - a blog for the rest of us</description>
	<lastBuildDate>Fri, 16 Jul 2010 14:34:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Why I&#8217;m Blogging Less</title>
		<link>http://sqlfool.com/2009/10/why-im-blogging-less/</link>
		<comments>http://sqlfool.com/2009/10/why-im-blogging-less/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 14:50:35 +0000</pubDate>
		<dc:creator>Michelle Ufford</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Syndication]]></category>
		<category><![CDATA[380PASS]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[SQL Saturday]]></category>

		<guid isPermaLink="false">http://sqlfool.com/?p=1174</guid>
		<description><![CDATA[I've received a few questions asking why I've been blogging less frequently, and even one inquiry after my health. Rest assured, I'm completely fine. But there are 2 perfectly good reasons why I've been blogging less these days. East Iowa SQL Saturday: I'm the event organizer for East Iowa SQL Saturday, which is eating up [...]]]></description>
			<content:encoded><![CDATA[<p>I've received a few questions asking why I've been blogging less frequently, and even one inquiry after my health.  Rest assured, I'm completely fine.  But there are 2 perfectly good reasons why I've been blogging less these days.</p>
<p><strong>East Iowa SQL Saturday:</strong></p>
<p>I'm the event organizer for <a href="http://sqlsaturday.380pass.org" target="_blank">East Iowa SQL Saturday</a>, which is eating up a lot of my free time.  If you haven't yet heard about our SQL Saturday event, let me give you a brief overview.  It's a FREE, one-day training event geared toward SQL Server professionals and anyone who wants to learn more about SQL Server.  We have 22 sessions planned covering a variety of topics, from Business Intelligence to Disaster Recovery to SQL Server 2008 topics.  And if you're a .NET developer, we also have some .NET-related presentations, including PowerShell and MVC.</p>
<p>We're very fortunate to have snagged an excellent set of speakers.  <a href="http://jessicammoss.blogspot.com/" target="_blank">Jessica Moss</a>, <a href="http://sqlblog.com/blogs/louis_davidson/default.aspx" target="_blank">Louis Davidson</a>, <a href="http://www.ford-it.com/sqlagentman/" target="_blank">Timothy Ford</a>, <a href="http://stratesql.com/" target="_blank">Jason Strate</a>, and <a href="http://www.simple-talk.com/author/alex-kuznetsov/" target="_blank">Alex Kuznetsov</a> are just a few of the great speakers we have lined up.</p>
<p style="text-align: left;">There's only a handful of spots left, so if you're interested in attending, you should register soon.  To find out more details about the speakers and sessions, or to register, be sure to check out our website at <a href="http://sqlsaturday.380pass.org" target="_blank">http://sqlsaturday.380pass.org</a>.</p>
<p><strong>The Other Reason:</strong></p>
<p><a href="http://sqlfool.com/wp-content/uploads/2009/10/baby_uff.jpg"><img class="aligncenter size-medium wp-image-1177" title="baby_uff" src="http://sqlfool.com/wp-content/uploads/2009/10/baby_uff-300x219.jpg" alt="baby_uff" width="300" height="219" /></a></p>
<p>Yes, that's right, I'm with child.  Expecting.  Eating for two.  Bun in the oven.  In the family way.  You get the idea.</p>
<p>So when I'm not at work, planning SQL Saturday, or playing <a href="http://www.civilizationrevolution.com/" target="_blank">Civilization Revolution</a>, I'm sleeping.  For those who remotely care, I'm due around Super Bowl time in February 2010.  </p>
<div class="wp-caption aligncenter" style="width: 310px"><img alt="2010: The Year I Make Contact" src="http://www.thespacereview.com/archive/1310a.jpg" title="2010: The Year I Make Contact" width="80%" height="80%" /><p class="wp-caption-text">2010: The Year I Make Contact</p></div>
<p>Rest assured, this blog isn't going away.  And hopefully once I get through <a href="http://sqlsaturday.380pass.org" target="_blank">SQL Saturday</a> and then <a href="http://summit2009.sqlpass.org" target="_blank">PASS Summit</a>, I'll have more free time again.  <img src='http://sqlfool.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://sqlfool.com/2009/10/why-im-blogging-less/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Getting Started with Variables in SSIS</title>
		<link>http://sqlfool.com/2009/08/getting-started-with-variables-in-ssis/</link>
		<comments>http://sqlfool.com/2009/08/getting-started-with-variables-in-ssis/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 13:13:51 +0000</pubDate>
		<dc:creator>Michelle Ufford</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Syndication]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[BIDS]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://sqlfool.com/?p=1134</guid>
		<description><![CDATA[I recently had to create an SSIS package that used variables to pass data between procs, and I thought it would make a good topic for a blog post. There are many scenarios as to the how and why to use variables in SSIS, but we're going to keep it pretty simple. Let's assume we [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to create an SSIS package that used variables to pass data between procs, and I thought it would make a good topic for a blog post.  There are many scenarios as to the how and why to use variables in SSIS, but we're going to keep it pretty simple.  Let's assume we have some need to retrieve data from Proc A, pass it to Proc B, and store the results in Table C.  First, let's set up our environment:</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">USE</span> AdventureWorks;
Go
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">PROCEDURE</span> dbo.<span style="color: #202020;">LastOrderGet_sp</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">SET</span> <span style="color: #0000FF;">NOCOUNT</span> <span style="color: #0000FF;">ON</span>;
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
    <span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#40;</span>SalesOrderID<span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> <span style="color: #FF0000;">'LastSalesOrderID'</span>
    <span style="color: #0000FF;">FROM</span> AdventureWorks.<span style="color: #202020;">Sales</span>.<span style="color: #202020;">SalesOrderHeader</span> <span style="color: #0000FF;">WITH</span> <span style="color: #808080;">&#40;</span>NoLock<span style="color: #808080;">&#41;</span>
&nbsp;
    <span style="color: #0000FF;">SET</span> <span style="color: #0000FF;">NOCOUNT</span> <span style="color: #0000FF;">OFF</span>;
    <span style="color: #0000FF;">RETURN</span> <span style="color: #000;">0</span>;
<span style="color: #0000FF;">END</span>
Go
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">PROCEDURE</span> dbo.<span style="color: #202020;">ProcessLastOrder_sp</span>
    @LastOrderID <span style="color: #0000FF;">INT</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">SET</span> <span style="color: #0000FF;">NOCOUNT</span> <span style="color: #0000FF;">ON</span>;
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
    <span style="color: #0000FF;">SELECT</span> SalesOrderDetailID
        , ProductID
        , OrderQty
        , LineTotal
    <span style="color: #0000FF;">FROM</span> AdventureWorks.<span style="color: #202020;">Sales</span>.<span style="color: #202020;">SalesOrderDetail</span> <span style="color: #0000FF;">WITH</span> <span style="color: #808080;">&#40;</span>NoLock<span style="color: #808080;">&#41;</span>
    <span style="color: #0000FF;">WHERE</span> SalesOrderID <span style="color: #808080;">=</span> @LastOrderID;
&nbsp;
    <span style="color: #0000FF;">SET</span> <span style="color: #0000FF;">NOCOUNT</span> <span style="color: #0000FF;">OFF</span>;
    <span style="color: #0000FF;">RETURN</span> <span style="color: #000;">0</span>;
<span style="color: #0000FF;">END</span>
Go
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> dbo.<span style="color: #202020;">testStage</span>
<span style="color: #808080;">&#40;</span>
      SalesOrderDetailID    <span style="color: #0000FF;">INT</span>
    , ProductId             <span style="color: #0000FF;">INT</span>
    , OrderQty              <span style="color: #0000FF;">SMALLINT</span>
    , LineTotal             <span style="color: #0000FF;">NUMERIC</span>
<span style="color: #808080;">&#41;</span>;
Go</pre></div></div>

<p>Now for the fun stuff!  </p>
<p><em>(Please note, I'm assuming some basic understanding of SSIS, so I'm skipping the "how to create a project", etc. stuff and just going to the pertinent parts).</em></p>
<p>Inside BIDS (Business Intelligence Development Studio), create a new SSIS project and call it what you will.  If your Variable window is not already open, open it now by going to <strong>View</strong> --> <strong>Other Windows</strong> --> <strong>Variables</strong>.</p>
<div class="wp-caption alignnone" style="width: 632px"><a href="http://sqlfool.com/blogImages/20090824/SSIS_variable_01.jpg"><img alt="Open Variables Window" src="http://sqlfool.com/blogImages/20090824/SSIS_variable_01.jpg" title="Open Variables Window" width="80%" height="80%" /></a><p class="wp-caption-text">Open Variables Window</p></div>
<p>Now let's create a variable.  To do this, click on the little icon in the upper left-hand corner of the Variables window.  Name the variable <strong>LastSalesOrderID</strong>.</p>
<div class="wp-caption alignnone" style="width: 414px"><a href="http://sqlfool.com/blogImages/20090824/SSIS_variable_02.jpg"><img alt="Create a variable" src="http://sqlfool.com/blogImages/20090824/SSIS_variable_02.jpg" title="Create a variable" width="404" height="203" /></a><p class="wp-caption-text">Create a variable</p></div>
<p>After you create the variable, you should now see it in the Variables window.  Make sure the scope of the variable is the name of your project, which is "Blog" in my case (for obvious reasons); this means the variable is defined at the package scope.  Once you've confirmed that the variable exists, create an Execute SQL task.</p>
<p><em>(Variables in SSIS, like in other programming languages, can have different scopes.  For instance, a package scope means the variable can be accessed anywhere within the package, but a variable with a Data Flow scope can only be accessed within the specified Data Flow task.)</em></p>
<div class="wp-caption alignnone" style="width: 646px"><a href="http://sqlfool.com/blogImages/20090824/SSIS_variable_03.jpg"><img alt="Create Execute SQL Task" src="http://sqlfool.com/blogImages/20090824/SSIS_variable_03.jpg" title="Create Execute SQL Task" width="80%" height="80%" /></a><p class="wp-caption-text">Create Execute SQL Task</p></div>
<p>Double-click on your Execute SQL Task and configure with the following values:</p>
<ul>
<li>Set "Result Set" to <strong>Single Row</strong>.</li>
<li>Set your Connection to your appropriate data source.</li>
<li>Set your SQL Statement to: <strong>Execute AdventureWorks.dbo.LastOrderGet_sp;</strong></li>
</ul>
<div class="wp-caption alignnone" style="width: 635px"><a href="http://sqlfool.com/blogImages/20090824/SSIS_variable_04.jpg"><img alt="Set up your Execute SQL Task" src="http://sqlfool.com/blogImages/20090824/SSIS_variable_04.jpg" title="Set up your Execute SQL Task" width="80%" height="80%" /></a><p class="wp-caption-text">Set up your Execute SQL Task</p></div>
<p>Now click on "Result Set" and click on "Add."  You'll want to put the name of the column that's returned by the proc in the "Result Name" column; in our case, that'll be <strong>LastSalesOrderID</strong>.  Click on the Variable Name column and scroll down until you find the appropriate one (<strong>User::LastSalesOrderID</strong>).</p>
<div class="wp-caption alignnone" style="width: 592px"><a href="http://sqlfool.com/blogImages/20090824/SSIS_variable_05.jpg"><img alt="Mapping the results to a variable" src="http://sqlfool.com/blogImages/20090824/SSIS_variable_05.jpg" title="Mapping the results to a variable" width="582" height="563" /></a><p class="wp-caption-text">Mapping the results to a variable</p></div>
<p>Go ahead and add a Data Flow task to the designer surface.  We don't need to use a Data Flow task here -- for example, we could use another Execute SQL task instead -- but this will help demonstrate one way to use variables.  </p>
<div class="wp-caption alignnone" style="width: 646px"><a href="http://sqlfool.com/blogImages/20090824/SSIS_variable_06.jpg"><img alt="Add Data Flow Task" src="http://sqlfool.com/blogImages/20090824/SSIS_variable_06.jpg" title="Add Data Flow Task" width="80%" height="80%" /></a><p class="wp-caption-text">Add Data Flow Task</p></div>
<p>Double-click on the Data Flow task and add an OLE DB Source, then double-click on it to open up the properties.  Enter the following text in the "SQL Command text" window:<br />
<strong>Execute AdventureWorks.dbo.ProcessLastOrder_sp ?</strong><br />
The question mark (?) tells SSIS to expect a parameter.  </p>
<div class="wp-caption alignnone" style="width: 660px"><a href="http://sqlfool.com/blogImages/20090824/SSIS_variable_07.jpg"><img alt="Edit OLE DB Source" src="http://sqlfool.com/blogImages/20090824/SSIS_variable_07.jpg" title="Edit OLE DB Source" width="80%" height="80%" /></a><p class="wp-caption-text">Edit OLE DB Source</p></div>
<p>Now click on the Parameters button on the left.  This is where we map our variable to our parameter.  For the "Parameters" value, enter <strong>@LastOrderID</strong> (the parameter the stored procedure is expecting).  In the "Variables" column, click on the drop-down and navigate to the <strong>User::LastSalesOrderID</strong> variable. </p>
<div class="wp-caption alignnone" style="width: 406px"><a href="http://sqlfool.com/blogImages/20090824/SSIS_variable_08.jpg"><img alt="Map Variables to Parameters" src="http://sqlfool.com/blogImages/20090824/SSIS_variable_08.jpg" title="Map Variables to Parameters" width="396" height="411" /></a><p class="wp-caption-text">Map Variables to Parameters</p></div>
<p>Finally, set up an OLE DB Destination, and configure the OLE DB Source to load into the testStage table.  </p>
<div class="wp-caption alignnone" style="width: 660px"><a href="http://sqlfool.com/blogImages/20090824/SSIS_variable_09.jpg"><img alt="Configure OLE DB Destination" src="http://sqlfool.com/blogImages/20090824/SSIS_variable_09.jpg" title="Configure OLE DB Destination" width="80%" height="80%" /></a><p class="wp-caption-text">Configure OLE DB Destination</p></div>
<p>At this point, you should be able to successfully execute your package.  Upon successful execution, the testStage table will return the following results:</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span> <span style="color: #0000FF;">FROM</span> testStage;
&nbsp;
SalesOrderDetailID ProductId   OrderQty LineTotal
<span style="color: #008080;">------------------ ----------- -------- ------------------</span>
<span style="color: #000;">121315</span>             <span style="color: #000;">878</span>         <span style="color: #000;">1</span>        <span style="color: #000;">21</span>
<span style="color: #000;">121316</span>             <span style="color: #000;">879</span>         <span style="color: #000;">1</span>        <span style="color: #000;">159</span>
<span style="color: #000;">121317</span>             <span style="color: #000;">712</span>         <span style="color: #000;">1</span>        <span style="color: #000;">8</span></pre></div></div>

<p>That's all for now.  Hopefully this gives you an idea of how easy and useful it is to work with variables in SSIS.</p>
]]></content:encoded>
			<wfw:commentRss>http://sqlfool.com/2009/08/getting-started-with-variables-in-ssis/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Max Parallelism on Cube Processing</title>
		<link>http://sqlfool.com/2009/07/max-parallelism-on-cube-processing/</link>
		<comments>http://sqlfool.com/2009/07/max-parallelism-on-cube-processing/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 15:00:35 +0000</pubDate>
		<dc:creator>Michelle Ufford</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Syndication]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[cubes]]></category>
		<category><![CDATA[OLAP]]></category>
		<category><![CDATA[SSAS]]></category>

		<guid isPermaLink="false">http://sqlfool.com/?p=1108</guid>
		<description><![CDATA[The default behavior for processing cubes is to let the server determine how much parallelism to use. Let's face it, the server must've not learned to play nice with others as a kid; as such, it doesn't always make the best decisions. But fear not, you can help it along. When processing a cube, click [...]]]></description>
			<content:encoded><![CDATA[<p>The default behavior for processing cubes is to let the server determine how much parallelism to use.  Let's face it, the server must've not learned to play nice with others as a kid; as such, it doesn't always make the best decisions.  But fear not, you can help it along.  </p>
<p>When processing a cube, click on "Change Settings..."</p>
<div id="attachment_1109" class="wp-caption aligncenter" style="width: 267px"><a href="http://sqlfool.com/wp-content/uploads/2009/07/20090720_parallelism1.jpg"><img src="http://sqlfool.com/wp-content/uploads/2009/07/20090720_parallelism1-257x300.jpg" alt="SSAS Cube Processing" title="20090720_parallelism1" width="257" height="300" class="size-medium wp-image-1109" /></a><p class="wp-caption-text">SSAS Cube Processing</p></div>
<p>Now change the "Maximum parallel tasks" to 1, 2, or whatever is appropriate for your environment:</p>
<div id="attachment_1110" class="wp-caption aligncenter" style="width: 310px"><a href="http://sqlfool.com/wp-content/uploads/2009/07/20090720_parallelism2.jpg"><img src="http://sqlfool.com/wp-content/uploads/2009/07/20090720_parallelism2-300x192.jpg" alt="SSAS Cube Processing Settings" title="20090720_parallelism2" width="300" height="192" class="size-medium wp-image-1110" /></a><p class="wp-caption-text">SSAS Cube Processing Settings</p></div>
<p>That's all there is to it.  Happy cube processing!</p>
]]></content:encoded>
			<wfw:commentRss>http://sqlfool.com/2009/07/max-parallelism-on-cube-processing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hello (BI) World!</title>
		<link>http://sqlfool.com/2009/07/hello-bi-world/</link>
		<comments>http://sqlfool.com/2009/07/hello-bi-world/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 23:13:43 +0000</pubDate>
		<dc:creator>Michelle Ufford</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[OLAP]]></category>
		<category><![CDATA[SQL Resources]]></category>

		<guid isPermaLink="false">http://sqlfool.com/?p=1104</guid>
		<description><![CDATA[For those who are not already aware, I've recently switched to the Business Intelligence team as an OLAP developer. I'm pretty excited about the opportunity to learn more about cubes and data mining, and I've decided it's time to start sharing some of what I'm learning. My initial BI-related blog posts will probably be more [...]]]></description>
			<content:encoded><![CDATA[<p>For those who are not already aware, I've recently switched to the Business Intelligence team as an OLAP developer.  I'm pretty excited about the opportunity to learn more about cubes and data mining, and I've decided it's time to start sharing some of what I'm learning.  My initial BI-related blog posts will probably be more entry-level topics as I learn my way around BIDS (Business Intelligence Development Studio).  </p>
<p>To get started, I'd like to share my current favorite BI resource website:  <a href="http://www.learnmicrosoftbi.com" target="_blank">http://www.learnmicrosoftbi.com</a>.  <a href="http://www.learnmicrosoftbi.com" target="_blank">LearnMicrosoftBI</a> is an excellent, FREE website run by Craig Utley.  Yes, you heard me right... you have to register, but the site is FREE.  There are currently 38 videos on SSAS and BI-related topics, ranging from 7 minutes to 58 minutes long.  I haven't watched them all, but the ones I have watched have been helpful.  If you're trying to learn SSAS, be sure to check this site out.  </p>
<p>Here's a couple of other items of note:</p>
<ul>
<li><a href="http://www.codeplex.com/bidshelper" target="_blank">BIDS Helper</a> on CodePlex</li>
<li>A preview of <a href="http://www.vandeputte.org/2009/07/excel-2010-personal-sneak-preview.html" target="_blank">Excel 2010 features for Analysis Services</a> by <a href="http://www.vandeputte.org" target="_blank">Frederik Vandeputte</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://sqlfool.com/2009/07/hello-bi-world/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
