<?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>tim laqua dot com</title>
	<atom:link href="http://timlaqua.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://timlaqua.com</link>
	<description>Thoughts and Code from Tim Laqua</description>
	<lastBuildDate>Sat, 23 Feb 2013 00:07:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Hanging The TV</title>
		<link>http://timlaqua.com/2013/02/hanging-the-tv/</link>
		<comments>http://timlaqua.com/2013/02/hanging-the-tv/#comments</comments>
		<pubDate>Mon, 11 Feb 2013 00:07:31 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[How-to Guides]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=1153</guid>
		<description><![CDATA[One morning as we were eating breakfast, Lindy (my wife) looked over to the other room where we had a TV sitting on a sofa table and commented that it looked "terrible" because of all the wires all over the place. This is basically license to knock down the entire wall and do whatever you [...]]]></description>
				<content:encoded><![CDATA[<p>One morning as we were eating breakfast, Lindy (my wife) looked over to the other room where we had a TV sitting on a sofa table and commented that it looked "terrible" because of all the wires all over the place.  This is basically license to knock down the entire wall and do whatever you like as long as she can't see those wires when you're done.  I stopped short of that and just pulled a little part of the wall off.</p>
<p>Here's what it looked like originally (the terrible wires photo):<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/1-Original.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/1-Original-1024x768.jpg" alt="1-Original" width="550" height="412" class="alignnone size-large wp-image-1197" /></a></p>
<p><span id="more-1153"></span><br />
As I see it - to hide the wires we'll need to put an outlet down by the lower shelf there, one behind the TV, and add low voltage boxes for the signal wires to go through.  On the left there's a network cable running along the floor to the router (dunno why, I always hard-wire media devices).  That's an easy one since it's one of those fancy new flat cables.  I'll just tuck it under the baseboard.  Here's the before photo:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/2-UglyWire.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/2-UglyWire-1024x768.jpg" alt="2-UglyWire" width="550" height="412" class="alignnone size-large wp-image-1198" /></a></p>
<p>And the after photo:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/3-WireUnderBaseboard.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/3-WireUnderBaseboard-1024x768.jpg" alt="3-WireUnderBaseboard" width="550" height="412" class="alignnone size-large wp-image-1199" /></a></p>
<p>Now on to the heavy lifting.  I drew a big 'ol square on the wall (incorrectly once, then correctly) and cut out the piece of drywall:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/4-MarkAndCut.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/4-MarkAndCut-768x1024.jpg" alt="4-MarkAndCut" width="550" height="733" class="alignnone size-large wp-image-1200" /></a></p>
<p>Then I removed the drywall and found this.  Note - there's a backing board in there (1/2" osb strip) - it's there to support the drywall joint... they didn't meet on a stud so they thought that'd be an awesome idea:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/5-RemoveDrywall.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/5-RemoveDrywall-1024x768.jpg" alt="5-RemoveDrywall" width="550" height="412" class="alignnone size-large wp-image-1201" /></a></p>
<p>Next I ran a coax cable, network cable, and some electrical wire (split off from that outlet) to the cavity i wanted to hang my TV on:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/6-RunWires.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/6-RunWires-768x1024.jpg" alt="6-RunWires" width="550" height="733" class="alignnone size-large wp-image-1202" /></a></p>
<p>Here's that cavity I wanted the wires in - it's the cavity the "middle" of the wall falls in:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/7-WiresInCavity.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/7-WiresInCavity-768x1024.jpg" alt="7-WiresInCavity" width="550" height="733" class="alignnone size-large wp-image-1203" /></a></p>
<p>Clearly, to get the TV mount where I wanted I need to make a perfect CAD drawing of my planned installation:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/8-CADDrawing.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/8-CADDrawing-768x1024.jpg" alt="8-CADDrawing" width="550" height="733" class="alignnone size-large wp-image-1204" /></a></p>
<p>I hung the mount up there with some sheetrock screws to see where the boxes for the low voltage and outlet that will be behind the TV need to go:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/9-RoughHangMount.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/9-RoughHangMount-768x1024.jpg" alt="9-RoughHangMount" width="550" height="733" class="alignnone size-large wp-image-1205" /></a></p>
<p>And then I installed the two outlets I needed and the low voltage boxes.  Here the ones that will be behind the TV have plates on them already (not sure why, apparently I thought that was a good idea at the time):<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/10-InstallBehindTVBoxes.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/10-InstallBehindTVBoxes-1024x768.jpg" alt="10-InstallBehindTVBoxes" width="550" height="412" class="alignnone size-large wp-image-1206" /></a></p>
<p>Now I just had to put a new piece of drywall back in - the piece I cut was roughly 7'x3':<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/11-PutNewDrywallIn.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/11-PutNewDrywallIn-1024x768.jpg" alt="11-PutNewDrywallIn" width="550" height="412" class="alignnone size-large wp-image-1207" /></a></p>
<p>Then I screwed it in and taped it:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/12-Taping.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/12-Taping-1024x768.jpg" alt="12-Taping" width="550" height="412" class="alignnone size-large wp-image-1208" /></a></p>
<p>I'm terrible at mudding and it ALWAYS takes me at least two coats - I don't recall if this was coat 1 or 2:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/13-Mudding1.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/13-Mudding1-1024x768.jpg" alt="13-Mudding1" width="550" height="412" class="alignnone size-large wp-image-1209" /></a></p>
<p>Then it was time for primer:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/14-Mudding2.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/14-Mudding2-1024x768.jpg" alt="14-Mudding2" width="550" height="412" class="alignnone size-large wp-image-1210" /></a></p>
<p>I only ended up putting one coat of paint on - it seemed to look good enough and the only way I'd make it look better would be to paint the entire wall.  So I just left it:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/15-Paint.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/15-Paint-1024x768.jpg" alt="15-Paint" width="550" height="412" class="alignnone size-large wp-image-1211" /></a></p>
<p>I tossed the plates on to make sure I didn't have any ridiculous problems there:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/16-Plates.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/16-Plates-1024x768.jpg" alt="16-Plates" width="550" height="412" class="alignnone size-large wp-image-1212" /></a></p>
<p>And lastly, nailed the baseboard back on, slid the drywall dust covered sofa table back over, hung the tv, and watched the Matrix.  Because that's what you do after you hang a tv on the wall:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/17-Matrix.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/17-Matrix-768x1024.jpg" alt="17-Matrix" width="550" height="733" class="alignnone size-large wp-image-1213" /></a></p>
<p>Was all that shenanigans worth it?  Yep.  Looks pretty awesome.  And Lindy's happy, so I get to point at the floating TV for a few months to justify my position in the relationship <img src='http://timlaqua.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2013/02/hanging-the-tv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Garage Heater: Natural Gas</title>
		<link>http://timlaqua.com/2013/02/the-garage-heater-natural-gas/</link>
		<comments>http://timlaqua.com/2013/02/the-garage-heater-natural-gas/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 03:58:07 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=1151</guid>
		<description><![CDATA[Now after all this running around with sensors and propane heaters - there's really no possible way we could NOT install a natural gas heater. Browsing the Menards ad for the week yielded a 75,000 BTU Beacon Morris unit on sale for about $450. Figuring that's a pretty good deal, we headed over there and [...]]]></description>
				<content:encoded><![CDATA[<p>Now after all this running around with sensors and propane heaters - there's really no possible way we could NOT install a natural gas heater.  Browsing the Menards ad for the week yielded a 75,000 BTU Beacon Morris unit on sale for about $450.  Figuring that's a pretty good deal, we headed over there and gathered the supplies we needed.  Oh the supplies...  B-vent to get out the roof, flashing, crazy angle pipe things, a cap, storm collar, black iron pipe for a drip leg on the gas line, 60' of 1/2" copper flex, some flare nuts, some 14/2 wire, a thermostat, some 18/5 thermostat wire, hangars, and various other random things - probably some beef jerky since you always buy beef jerky at Menards.  All in - a whopping $750 bill at the checkout.  Seems like a lot, but it's much less than the $2,200 quote I received from a local HVAC shop for a 45,000 btu heater.  Fast forward a few hours and we've got ourselves cheap(er) heat!</p>
<h5>Scenario 1: 20 degree day, maintain 50 degrees</h5>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/02/NaturalGas-50degrees.png"><img src="http://timlaqua.com/wp-content/uploads/2013/02/NaturalGas-50degrees.png" alt="NaturalGas-50degrees" width="808" height="541" class="alignnone size-full wp-image-1173" /></a></p>
<p>On for about 8 minutes, off for about 56 - that's a total cycle of 64 minutes and it's on for 12.5% of the time.  It's a 75K BTU heater, meaning it will consume 75K * 12.5% or 9,375 btu per hour.  24 hours * 9,375 btu / 100,000 * $0.67 = $1.50.  That's $1.50 per day for a 30 degree temp differential.</p>
<h5>Scenario 2: 20 degree day, maintain 70 degrees</h5>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/02/NaturalGas-70degrees.png"><img src="http://timlaqua.com/wp-content/uploads/2013/02/NaturalGas-70degrees.png" alt="NaturalGas-70degrees" width="833" height="333" class="alignnone size-full wp-image-1174" /></a></p>
<p>On for about 7 minutes, off for 11.  Cycle of 18 minutes, on for 39% of the time.  75K * 39% = 29,250 btu.  24 hours * 29,250 / 100,000 * $0.67 = $4.70.  $4.70 per day for a 50 degree temp differential.</p>
<h5>Scenario 3: Back to 50 degrees</h5>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/02/NaturalGas-70to50.png"><img src="http://timlaqua.com/wp-content/uploads/2013/02/NaturalGas-70to50.png" alt="NaturalGas-70to50" width="809" height="282" class="alignnone size-full wp-image-1175" /></a></p>
<p>I had some crazy idea like i could figure out the heat loss of the garage with data like this - but there are really just a ton of variables in addition to the heat loss.  The biggest issue I see is the heat that moves from the objects in the room (that have been heated up to 70) in to the air around them as the air cools.  Look at the difference in how long it takes to drop from 59 to 49 the first time, and then again the 2nd time after the air is heated again.</p>
<p>Here's what it looked like installed:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/Installed.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/Installed.jpg" alt="Installed" width="700" height="933" class="alignnone size-full wp-image-1182" /></a></p>
<p>And the thermostat:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/Thermostat.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/Thermostat.jpg" alt="Thermostat" width="500" height="364" class="alignnone size-full wp-image-1183" /></a></p>
<p>And my car in the middle of being waxed - since I had to keep the garage at 70 for a while to gather data, I figured I'd make use of the warm weather.  That laptop in the background is gathering the data:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/WaxingTheCar.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/02/WaxingTheCar.jpg" alt="WaxingTheCar" width="700" height="933" class="alignnone size-full wp-image-1184" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2013/02/the-garage-heater-natural-gas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiding SSAS Attributes With Powershell</title>
		<link>http://timlaqua.com/2013/01/hiding-ssas-attributes-with-powershell/</link>
		<comments>http://timlaqua.com/2013/01/hiding-ssas-attributes-with-powershell/#comments</comments>
		<pubDate>Wed, 23 Jan 2013 21:19:10 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[analysis services]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[business intelligence]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[ssas]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=1141</guid>
		<description><![CDATA[The challenge here was that we have a cube with some great data as well as some low level detail (customer detail, think PII) that we want to expose to a larger audience. The problem is that the low level detail is not something that the new audience needs (or in some cases, is allowed) [...]]]></description>
				<content:encoded><![CDATA[<p>The challenge here was that we have a cube with some great data as well as some low level detail (customer detail, think PII) that we want to expose to a larger audience.  The problem is that the low level detail is not something that the new audience needs (or in some cases, is allowed) to have access to.  The obvious answer here is Dimension security - why not use that?  Two reasons.  First, Dimension security is slow.  Second, even if it wasn't slow, to hide all the data in many (30+) attributes is tedious to setup, and when new attributes were added we would have to make sure and disable access to those as well.  To be clear, we're not just hiding attributes here, we're creating an entire copy of the existing SSAS database and hiding attributes in the copy.</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;"># Import Required Libraries</span>
<span style="color: #000000;">&#91;</span><span style="color: #008080;">System.Reflection.Assembly</span><span style="color: #000000;">&#93;</span>::<span style="color: #800000;">LoadWithPartialName</span><span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;Microsoft.AnalysisServices&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">&gt;</span><span style="color: #800080;">$NULL</span>
&nbsp;
<span style="color: #008000;"># Connect to server</span>
<span style="color: #800080;">$server</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> Microsoft.AnalysisServices.Server
<span style="color: #800080;">$server</span>.Connect<span style="color: #000000;">&#40;</span><span style="color: #800000;">'localhost'</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Make a metadata copy of the existing cube</span>
<span style="color: #800080;">$newdb</span> <span style="color: pink;">=</span> <span style="color: #800080;">$server</span>.Databases.GetByName<span style="color: #000000;">&#40;</span><span style="color: #800000;">'POS Data'</span><span style="color: #000000;">&#41;</span>.Clone<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Change ID and Name of SSAS DB</span>
<span style="color: #800080;">$newdb</span>.Name <span style="color: pink;">=</span> <span style="color: #800000;">'POS Data - Limited'</span>
<span style="color: #800080;">$newdb</span>.ID <span style="color: pink;">=</span> <span style="color: #800000;">'POS Data - Limited'</span>
&nbsp;
<span style="color: #008000;"># Drop Existing SSAS DB if it exists</span>
<span style="color: #800080;">$server</span>.Databases<span style="color: #000000;">&#91;</span><span style="color: #800000;">'POS Data - Limited'</span><span style="color: #000000;">&#93;</span>.Drop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Add the new copy to the server</span>
<span style="color: #800080;">$server</span>.Databases.Add<span style="color: #000000;">&#40;</span><span style="color: #800080;">$newdb</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Sync our copy of the new database with the server's copy</span>
<span style="color: #800080;">$newdb</span>.Update<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span>Microsoft.AnalysisServices.UpdateOptions<span style="color: #000000;">&#93;</span>::ExpandFull<span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Grab the cube we want to work with from the new database</span>
<span style="color: #800080;">$cube</span> <span style="color: pink;">=</span> <span style="color: #800080;">$newdb</span>.Cubes.GetByName<span style="color: #000000;">&#40;</span><span style="color: #800000;">'POS Data'</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Hide the Location Dimension</span>
<span style="color: #800080;">$cube</span>.Dimensions.GetByName<span style="color: #000000;">&#40;</span><span style="color: #800000;">'Location'</span><span style="color: #000000;">&#41;</span>.Visible <span style="color: pink;">=</span> <span style="color: #800080;">$false</span>
&nbsp;
<span style="color: #008000;"># Hide all attributes and hierarchies in the Customer dimension</span>
<span style="color: #800080;">$cube</span>.Dimensions.GetByName<span style="color: #000000;">&#40;</span><span style="color: #800000;">'Customer'</span><span style="color: #000000;">&#41;</span>.Attributes <span style="color: pink;">|</span>  <span style="color: pink;">%</span><span style="color: #000000;">&#123;</span><span style="color: #800080;"><span style="color: #000080;">$_</span></span>.AttributeHierarchyEnabled<span style="color: pink;">=</span><span style="color: #800080;">$false</span>; <span style="color: #800080;"><span style="color: #000080;">$_</span></span>.AttributeHierarchyVisible<span style="color: pink;">=</span><span style="color: #800080;">$false</span>;<span style="color: #000000;">&#125;</span>
<span style="color: #800080;">$cube</span>.Dimensions.GetByName<span style="color: #000000;">&#40;</span><span style="color: #800000;">'Customer'</span><span style="color: #000000;">&#41;</span>.Hierarchies <span style="color: pink;">|</span> <span style="color: pink;">%</span><span style="color: #000000;">&#123;</span><span style="color: #800080;"><span style="color: #000080;">$_</span></span>.Visible<span style="color: pink;">=</span><span style="color: #800080;">$false</span>; <span style="color: #800080;"><span style="color: #000080;">$_</span></span>.Enabled<span style="color: pink;">=</span><span style="color: #800080;">$false</span>;<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># Enable the key attribute in the customer dimension - it won't work if the key isn't enabled</span>
<span style="color: #800080;">$cube</span>.Dimensions.GetByName<span style="color: #000000;">&#40;</span><span style="color: #800000;">'Customer'</span><span style="color: #000000;">&#41;</span>.Attributes<span style="color: #000000;">&#91;</span><span style="color: #800000;">'Dim Customer'</span><span style="color: #000000;">&#93;</span>.AttributeHierarchyEnabled<span style="color: pink;">=</span><span style="color: #800080;">$true</span>
&nbsp;
<span style="color: #008000;"># Enable the Market attribute in the customer dimension</span>
<span style="color: #800080;">$cube</span>.Dimensions.GetByName<span style="color: #000000;">&#40;</span><span style="color: #800000;">'Customer'</span><span style="color: #000000;">&#41;</span>.Attributes<span style="color: #000000;">&#91;</span><span style="color: #800000;">'Market'</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">|</span> <span style="color: pink;">%</span><span style="color: #000000;">&#123;</span><span style="color: #800080;"><span style="color: #000080;">$_</span></span>.AttributeHierarchyEnabled<span style="color: pink;">=</span><span style="color: #800080;">$true</span>; <span style="color: #800080;"><span style="color: #000080;">$_</span></span>.AttributeHierarchyVisible<span style="color: pink;">=</span><span style="color: #800080;">$true</span>;<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># Hide the Location Database attribute in the Product dimension</span>
<span style="color: #800080;">$cube</span>.Dimensions.GetByName<span style="color: #000000;">&#40;</span><span style="color: #800000;">'Product'</span><span style="color: #000000;">&#41;</span>.Attributes<span style="color: #000000;">&#91;</span><span style="color: #800000;">'Location Database'</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">|</span> <span style="color: pink;">%</span><span style="color: #000000;">&#123;</span><span style="color: #800080;"><span style="color: #000080;">$_</span></span>.AttributeHierarchyEnabled<span style="color: pink;">=</span><span style="color: #800080;">$false</span>; <span style="color: #800080;"><span style="color: #000080;">$_</span></span>.AttributeHierarchyVisible<span style="color: pink;">=</span><span style="color: #800080;">$false</span>;<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># Add a new member to the role granting Read Only permissions in the cube</span>
<span style="color: #800080;">$newMember</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">new-object</span> Microsoft.AnalysisServices.RoleMember<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;domain\tlaqua&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #800080;">$newdb</span>.Roles<span style="color: #000000;">&#91;</span><span style="color: #800000;">'Role 1'</span><span style="color: #000000;">&#93;</span>.Members.Add<span style="color: #000000;">&#40;</span><span style="color: #800080;">$newMember</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Push our updates to the server</span>
<span style="color: #800080;">$newdb</span>.Update<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span>Microsoft.AnalysisServices.UpdateOptions<span style="color: #000000;">&#93;</span>::ExpandFull<span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Process the new database</span>
<span style="color: #800080;">$newdb</span>.Process<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span>Microsoft.AnalysisServices.ProcessType<span style="color: #000000;">&#93;</span>::ProcessFull<span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Disconnect from the server</span>
<span style="color: #800080;">$server</span>.Disconnect<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></pre></div></div>

<p>This approach has two notable downfalls.  First, you have to think up a different database name because the original db with the low level detail still exists on the server.  Second, you have to ProcessFull the clone that you made.  It doesn't close the data, it clones the metadata.  All in all, works great for us, this particular cube is only processed once a week and the 20 minutes we lose processing data in to the clone is more than acceptable (looks really clean to the users as well).</p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2013/01/hiding-ssas-attributes-with-powershell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Garage Heater: Propane Torpedo</title>
		<link>http://timlaqua.com/2013/01/the-garage-heater-propane-torpedo/</link>
		<comments>http://timlaqua.com/2013/01/the-garage-heater-propane-torpedo/#comments</comments>
		<pubDate>Mon, 21 Jan 2013 00:49:21 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=1149</guid>
		<description><![CDATA[As a first followup to my article that looked in to the economics of heating my garage (The Garage Heater), I ordered myself a TEMPer USB temperature sensor to do some fact checking. Note - I use the term fact pretty loosely... more like "numbers I made up using formulas I found on the internet." [...]]]></description>
				<content:encoded><![CDATA[<p>As a first followup to my article that looked in to the economics of heating my garage (<a href="http://timlaqua.com/2013/01/the-garage-heater/" title="The Garage Heater">The Garage Heater</a>), I ordered myself a TEMPer USB temperature sensor to do some fact checking.  Note - I use the term fact pretty loosely... more like "numbers I made up using formulas I found on the internet."</p>
<p>The software I'm using to record the data is called ThermoHID (<a href="http://www.thermohid.co.uk/">http://www.thermohid.co.uk</a>) - a freeware app which is far superior to the terrible software that comes with the sensor.  For this test, I went out on a 5 degree day, bought a bunch of propane, and did my best to keep the garage 60 and 85 degrees for three hours or so:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/PropaneTorpedoHeater.png"><img src="http://timlaqua.com/wp-content/uploads/2013/02/PropaneTorpedoHeater.png" alt="PropaneTorpedoHeater" width="968" height="588" class="alignnone size-full wp-image-1155" /></a></p>
<p>The first thing I would like to point out in the data is the pause in the initial heat up.  It's darn cold out - the garage started around 38, which it seems to be able to maintain with just heat leaking in from the house (there's one finished wall w/ a house on the other side), so when we tried to heat it up to 85 the first time, the propane tank froze up and we had to switch to a warm one.  That's just what happens when you use a 106,000 BTU propane heater with a 20lb tank.  It simply can't support that rate (something about vaporization rates).<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/PropaneTorpedoHeater-TankChange.png"><img src="http://timlaqua.com/wp-content/uploads/2013/02/PropaneTorpedoHeater-TankChange.png" alt="PropaneTorpedoHeater-TankChange" width="189" height="457" class="alignnone size-full wp-image-1157" /></a></p>
<p>There's also an interesting drop in there after a bit - that's when we opened the garage to vent the the stinky air out (propane stinks).<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/02/PropaneTorpedoHeater-OpenedGarage.png"><img src="http://timlaqua.com/wp-content/uploads/2013/02/PropaneTorpedoHeater-OpenedGarage.png" alt="PropaneTorpedoHeater-OpenedGarage" width="222" height="455" class="alignnone size-full wp-image-1156" /></a></p>
<p>And finally - it's interesting that as time goes by, it takes less time to heat the garage back up and it takes more time to lose the heat.  I'm pretty sure this is due to all the "stuff" in the garage(cars, garage slab, some engines, refrigerators, tools, workbenches, etc).  Heating up air is one thing, but heating up stuff - that takes more energy and it has its own rate of heat loss.  But when your "stuff" loses heat because the air around it is cooler, the heat goes in to the air - the air we're trying to keep hot.  Just an interesting observation.  I'm also fairly sure that 106K BTU heater is putting out nowhere near that hooked up to a 20lb tank, it simply couldn't have been based on how fast that much energy should be able to heat the garage.  Now to move on to the inevitable - the Natural Gas heater.</p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2013/01/the-garage-heater-propane-torpedo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Garage Heater</title>
		<link>http://timlaqua.com/2013/01/the-garage-heater/</link>
		<comments>http://timlaqua.com/2013/01/the-garage-heater/#comments</comments>
		<pubDate>Mon, 14 Jan 2013 04:45:26 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=1119</guid>
		<description><![CDATA[Being a life long Minnesota resident, running propane heaters in the winter to keep the garage warm is incredibly common... and incredibly smelly. Eventually your eyes start burning from all the stuff in the air. Add in some degreaser and it gets really enjoyable in there. This age-old problem led me to try and figure [...]]]></description>
				<content:encoded><![CDATA[<p>Being a life long Minnesota resident, running propane heaters in the winter to keep the garage warm is incredibly common... and incredibly smelly.  Eventually your eyes start burning from all the stuff in the air.  Add in some degreaser and it gets really enjoyable in there.  This age-old problem led me to try and figure out how to keep it warm in there without the trusty propane heater (or kerosene - that's equally terrible).  The only two viable options are Electric and Natural Gas.  I don't really care which - I just want to pick the most cost effective one.  If you ask anyone, the answer is always natural gas.  But why?  How much more efficient is natural gas?  I care because natural gas requires a gas line, while electric would just require another (big) circuit (the natural gas heaters require a circuit as well, just way more logically sized).  Ever wonder how those electric heaters rated in watts translate to the BTU rated natural gas heaters?  I did.  I also wondered how much all this propane is costing... and why I have to run the heater so frequently.</p>
<p>First things first, I looked at my gas bill and it's billed in therms.  That's kind of the standard unit i'll use, a therm is 100,000 btu (and wherever I say BTU, i really mean BTU per hour).  How's that translate to electricity?  Well, 1 watt = 3.414 btu so one therm 29,291 watts.  Then I went and looked at my electric bill and it's billed in Kilowatt hours so now I can just multiply by my per kWh cost ($0.10).</p>
<p>Electric costs roughly <strong>$2.92 per therm</strong><br />
Natural Gas cost roughly <strong>$0.67 per therm</strong></p>
<p>That's a difference of $2.25 per therm consumed.  Let's say I think I need a 75K BTU heater.  That's 75% of a therm, so for every hour I run it, it would cost $1.69 more for electric.  Now let's assume the Natural Gas setup cost $1,000 more to install - it would take 591 hours to eat up the cost difference.</p>
<p>Ok, got that sorted out, now what about this propane stuff, what's that cost?  First we have to sort out how much is in the tank (just using 20lb tanks) and divide by the fill cost.  Turns out one gallon of propane has 91,600 BTU.  But I buy propane in pounds, so one gallon is 4.24 lbs - meaning there's 4.6 pounds required per therm.  On the high side, i'm paying about a buck a pound (if they actually filled the tanks up to 20lbs).</p>
<p>Propane costs roughly <strong>$4.60 per therm</strong></p>
<p>That's a whole bunch - definitely need to stop using propane.  Now let's try to figure out how much heat I actually need rather than just using the 'ol "bigger is better" logic.  It takes 0.018 btu per cubic feet to raise the air 1 degree fahrenheit and my garage is 34' x 22' x 9' = 6,732 cubic feet.  If I did the math right, it would take 121.176 BTU per degree we want to heat it.</p>
<p>Now for the heat loss part...<br />
<span id="more-1119"></span><br />
We'll assume we don't have any doors cause the math gets stupid.</p>
<p>2 22' x 9' 2x4 uninsulated walls (396 sq ft)<br />
2 34' x 9' 2x4 uninsulated walls (612 sq ft)<br />
1 34' x 22' r13 insulated ceiling (748 sq ft)</p>
<p>So 1008 sq ft of uninsulated walls and 748 sq ft of r13.</p>
<p>Now we google around for an R value for those walls.  1/2 plywood.  Looks like 0.63 (awesome).</p>
<p>For now let's assume we want to keep the garage 40 degrees warmer than the outside.  The heat load formula looks something like u factor * sq ft * temp differential = btu per hour.  Now what's u factor?  It's just 1/R value (that's what the internet tells me anyway) - it's how conductive the material is with regard to heat.</p>
<p>u factor of walls is 1/0.68 = 1.47<br />
u factor of ceiling is 1/13 = 0.07</p>
<p>1.47 * 1008 * 40 = 59,270 btu/hour<br />
0.07 * 748 * 40 = 2,094 btu/hour</p>
<p>Which means to maintain a 40 degree temperature differential in my garage (assuming it's perfectly sealed, no air loss) it would require 61,364 btu.  Which means a 75,000 BTU heater will be able to maintain a 40 degree temp diff.  Let's back that out to how many btu's i need per degree.</p>
<p>61,364 / 40 = 1534.1 btu</p>
<p>So a 75,000 BTU heater could maintain a 48.9 degree temperature differential.  I wonder how many degrees it could maintain if I insulated the walls...</p>
<p>That would make the wall u factor roughly the same as the ceiling (0.07).  And let's just do the math for 1 degree.</p>
<p>0.07 * 1008 = 70.56 btu<br />
0.07 * 748 = 52.36 btu</p>
<p>So 122.92 BTU per degree now.  That's an incredible difference, I am fairly sure that insulating the walls is a MUST and that plywood sheathing is absolutely pouring heat out of the garage.  To test this theory, I figured I'd just go buy a bunch of insulation - $7.88 for kraft faced r13 roll that covers 40sq ft.  The two short walls are completely uninsulated - the long walls are partially finished on one side and have some garage doors on the other side.  I measured the uninsulated parts of the garage and I needed 596 sq feet, so 15 rolls plus an extra comes to $126.08.  Acceptable for a weekend project.</p>
<p>And yes, earlier calculations were made assuming I had no doors and it was a completely uninsulated square.  I have real numbers now.</p>
<p>Current:<br />
R13 Ceiling: 0.07 * 748 = 52.36<br />
R6? Garage Doors: 0.16 * (112+63) = 28<br />
R15 Exterior Door: 0.07 * 21 = 1.47<br />
Uninsulated Walls: 1.47 * 600 = 882<br />
Finished Wall space: Ignore this - it's always warmer on the other side of this particular space</p>
<p>Which comes to a total heat loss of 963.83 btu per degree of difference.</p>
<p>If I insulated the walls, that space would drop from 882 btu down to 42 btu (0.07 * 600 = 42) for a total of 123.83 btu per degree of difference for the whole garage.</p>
<p>What's a difference of 840 btu per degree cost me?  I looked at the forecast and it looks like an average of around 10 degrees on Saturday.  I want to keep it 66 degrees in there for 8 hours (same temp as my house, so i don't have to deal with the finished wall math).  At a 56 degree differential, that extra heat loss is around 47,040 btu per hour for 8 hours...  376,320 btu.</p>
<p>Given our above calculations all went back to therms, this is 3.76 therms.</p>
<p>Natural Gas: $0.67 * 3.76 = $2.51<br />
Electric: $2.92 * 3.76 = $10.98<br />
Propane: $4.60 * 3.76 = $17.29</p>
<p>Now how many similar days would it take to offset the cost of the insulation?<br />
Natural Gas: $126.08 / $2.51 = 50 days<br />
Electric: $126.08 / $10.98 = 12 days<br />
Propane: $126.08 / $17.29 = 8 days</p>
<p>Now that we've done all that, someone brought up the floor. The floor?!?!  Hot air goes up, who cares about the floor!  Honestly, I have no idea how to bring the floor in to the equation.  I did find that the slab has an R value of around 1 so if it's 748 sq ft, it would lose 748 btu per degree per hour - which is a bunch.  But again, hot air rises...  sort of.  I think heat just kinda goes where it can.  For now, I'm ignoring the cold floor, I'll try to sort that out later.  And in the spirit of ignoring the floor, I made a spreadsheet to do all this math cause it's getting pretty tedious.</p>
<p>Uninsulated, how hot could a 75,000 btu heater keep my garage?  It could maintain a temperature differential of 77.8 degrees if it ran constantly:</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/01/Uninsulated-Max-Temp.png"><img src="http://timlaqua.com/wp-content/uploads/2013/01/Uninsulated-Max-Temp.png" alt="Uninsulated Max Temp" width="746" height="546" class="alignnone size-full wp-image-1123" /></a></p>
<p>What could that same 75,000 btu heater maintain if I insulated the walls?  Clearly somethings amiss here, but according to my math, like over 500 degrees of differential, so the whole garage would burst in to flames before heat loss was equal to the output of the heater.  But I'm ignoring tons of factors in these examples, like air exchange loss, the garage floor, etc.  Take it with a grain of salt.</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/01/Insulated-Max-Temp.png"><img src="http://timlaqua.com/wp-content/uploads/2013/01/Insulated-Max-Temp.png" alt="Insulated Max Temp" width="746" height="546" class="alignnone size-full wp-image-1120" /></a></p>
<p>Since we're changing the heat loss by insulating, what happens is we not only need less energy to change the temp but we will also lose the heat that we have much slower - here's an example of the heat loss if we heated it up to 85 degrees and just let the temp drop back to outside temp:</p>
<p><em>Uninsulated, we lose over 9 degrees a minute up at 85 degrees - it's a curve, heat loss is always relative to the temperature differential so as that shrinks, so does the loss:</em><br />
<a href="http://timlaqua.com/wp-content/uploads/2013/01/Uninsulated-Temp-Drop.png"><img src="http://timlaqua.com/wp-content/uploads/2013/01/Uninsulated-Temp-Drop.png" alt="Uninsulated Temp Drop" width="746" height="546" class="alignnone size-full wp-image-1124" /></a></p>
<p><em>Insulated, we're only losing around a degree a minute:</em><br />
<a href="http://timlaqua.com/wp-content/uploads/2013/01/Insulated-Temp-Drop.png"><img src="http://timlaqua.com/wp-content/uploads/2013/01/Insulated-Temp-Drop.png" alt="Insulated Temp Drop" width="746" height="546" class="alignnone size-full wp-image-1121" /></a></p>
<p>Now let's say we want to maintain a temperature differential of 60 degrees constantly.  The only way to really do that would be to buy a heater that matches your heat loss at that temp differrential and run it constantly.  Uninsulated, a 60,000 BTU heater could maintain a 62 degree temp differential.  Insulated...  I would need less than 9000 BTU (again, ignoring things like the floor).  Nobody wants to run them constantly though, so we'll just buy the 75,000 btu one and see the difference there.  If we're going to let it kick on and off, you have to pick an acceptable temp range for it to do its thing - if you only have a few degrees of range, it'll be kicking on and off constantly.  We'll go with keeping it between 75 and 60 degrees.</p>
<p><em>Uninsulated, the heater will have to kick on for 6 minutes, turn off for 2 minutes (up at 75 degrees, it would lose over 8 degrees a minute):</em><br />
<a href="http://timlaqua.com/wp-content/uploads/2013/01/Uninsulated-Temp-Maintain.png"><img src="http://timlaqua.com/wp-content/uploads/2013/01/Uninsulated-Temp-Maintain.png" alt="Uninsulated Temp Maintain" width="746" height="546" class="alignnone size-full wp-image-1125" /></a></p>
<p><em>Insulated, the heater will need to kick on for 2 minutes and turn off for 20 minutes (insulated, it's losing around a degree a minute).</em><br />
<a href="http://timlaqua.com/wp-content/uploads/2013/01/Insulated-Temp-Maintain.png"><img src="http://timlaqua.com/wp-content/uploads/2013/01/Insulated-Temp-Maintain.png" alt="Insulated Temp Maintain" width="746" height="546" class="alignnone size-full wp-image-1122" /></a></p>
<p>I'm positive most of this is wildly inaccurate - so I ordered a temperature sensor so I can graph out what actually happens to see how far off this sort of calculation is.  More on that in a future post.</p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2013/01/the-garage-heater/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Our Life Fitness X5 Elliptical: Part 1</title>
		<link>http://timlaqua.com/2013/01/our-life-fitness-x5-elliptical-part-1/</link>
		<comments>http://timlaqua.com/2013/01/our-life-fitness-x5-elliptical-part-1/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 00:24:41 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[How-to Guides]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[fitness]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=1094</guid>
		<description><![CDATA[I want to start off by saying that this is the greatest home elliptical I've ever used. I'm 6' and my wife is 5' 4" - the adjustable stride really goes a long ways (pun intended) towards allowing both of us to enjoy this piece of equipment. I'm not familiar with the Basic console, but [...]]]></description>
				<content:encoded><![CDATA[<p>I want to start off by saying that this is the greatest home elliptical I've ever used.  I'm 6' and my wife is 5' 4" - the adjustable stride really goes a long ways (pun intended) towards allowing both of us to enjoy this piece of equipment.  I'm not familiar with the Basic console, but I can attest that the Advanced console's auto-adjusting workouts are very handy at 6AM when you're really not interested in pressing buttons - or really thinking at all.  This unit gets used almost daily (by Lindy - I fell off the wagon some years ago) and we've owned it for about 6 years now.  Here are the stats on this mamma jamma:</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00691.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00691-1024x768.jpg" alt="DSCN0069[1]" width="550" height="412" class="alignnone size-large wp-image-1097" /></a></p>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00681.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00681-1024x768.jpg" alt="DSCN0068[1]" width="550" height="412" class="alignnone size-large wp-image-1098" /></a></p>
<p>We haven't had a SINGLE problem with it... until now.  After our most recent move, to be exact.  Now - we've been in our new place for about 4 months and this is the first time I noticed it was having an issue.  Wait - but didn't I say it was used daily?  Oh, it is.  But Lindy is they type that doesn't really care about the flashing lights on the screen, she actually finds them to be distracting.  So what she does is turns the unit on, hits all the buttons to get it in to manual mode, and lays a DVD case across the entire screen, cause she really doesn't care what it says.  Well, I decided I should jump back on the wagon for some strange reason earlier today and my little auto adjusting program wasn't working.  The Level area of the display simply says "OFF" and no amount of button pressing will wake it up.</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00701.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00701-1024x768.jpg" alt="DSCN0070[1]" width="550" height="412" class="alignnone size-large wp-image-1099" /></a></p>
<p>So the only good news here is I get to give Lindy crap for always using the elliptical on Level 1 and being a slacker.  Bad news, I gotta fix it since the warranty ran out like 3 years ago.<br />
<span id="more-1094"></span><br />
Initial troubleshooting of these things is just to listen to the motor.  When you turn these units on, the thing seems to kind of limit seek, where it runs the resistance all the way up and all the way back down.  Just a usual humming for a bit as you are picking your work out more or less.  Listening to my unit yields a little different sound.  You turn it on and it runs the motor for a little bit, then you hear this half second pulse one way, then you hear it again.  then sometimes you hear it run the other direction for a half second.  It's seeking.  Trying to figure out where it is.  Sometimes with that sort of symptom you can just clean something or replace some magnets.  That's the assumption I'm working under, that i can just clean something or replace some magnets, so Step 1 is to take it apart and find some magnets... or at least locate the motor or something.</p>
<p>Since Lindy is off playing around with her girlfriends, I have free reign to rip apart the elliptical (assuming i can get it back in to a working state before she needs it tomorrow morning).  Well... working as in working for level 1...  slacker.</p>
<p>Basically, I just looked at the side and it's pretty clear that the treadle (i think that's what they call these things) has to disconnect from the rotating support here</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00571.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00571-1024x768.jpg" alt="DSCN0057[1]" width="550" height="412" class="alignnone size-large wp-image-1100" /></a></p>
<p>So I popped off the cover that pretty obviously covers the bolt holding it on (starting the the LEFT side of the unit if you're standing on it correctly)<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00581.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00581-1024x768.jpg" alt="DSCN0058[1]" width="550" height="412" class="alignnone size-large wp-image-1101" /></a></p>
<p>It's a 9/16" - you want a short socket with a 6" extension.  Could also do a deep with a 3" extension for removal, but that is problematic in reassembly.</p>
<p>Next you realize that there's way too much metal around, so you have to remove something else to be able to flex the assembly enough to pull it off the pin.  Remove the bottom pivot.</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00621.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00621-1024x768.jpg" alt="DSCN0062[1]" width="550" height="412" class="alignnone size-large wp-image-1102" /></a></p>
<p>After pulling the plastics off, you'll find yet another 9/16" nut and bolt.  Once you pull that off, you will be able to flex the upper assembly enough to get it off the pin.  Once that's off, you can remove the inner grey plastic cover which is secured by 4 P2 screws.  Once that's off you'll find a large plate - that plate exists simply to hold the light grey plastic on.  Remove the two screws holding the plate on and you'll finally be looking at the crank.</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00601.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00601-1024x768.jpg" alt="DSCN0060[1]" width="550" height="412" class="alignnone size-large wp-image-1103" /></a></p>
<p>Now this thing is starting to look pretty built.  That's a 1/2" (or 13mm) nut/bolt at the bottom and that's a key'd shaft in the middle (and the key is giant).  Loosen that nut'bolt a little and shimmy off the crank.  Now you can remove the darker plastic (a bunch-o-screws around the outisde.  plastic to plastic is course threaded, about half inch long, in to metal is about 3/8" fine thread, all P2.</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00611.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00611-1024x768.jpg" alt="DSCN0061[1]" width="550" height="412" class="alignnone size-large wp-image-1104" /></a></p>
<p>Now assuming you started on the LEFT side of the unit as I did - you'll realize you're basically on the wrong side <img src='http://timlaqua.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   The belt side.  Eh, we'll pry have to take both sides off anyway.  But is is worth noting.  The "belt side" is certainly the left side if you're standing on the machine properly.</p>
<p>Unfortunately, the wife's coming home soon at this point, so I have to bail out and make this thing work again  That's the picture you see above, I put the crank and treadle pivot back on so she can use it tomorrow.  Quick testing, no issues leaving it open - your feet never get back near the spinny stuff.  As for observations that can be made from this side</p>
<p>The belt is shredding a little (may be normal, it seems to be aligned correctly):<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00661.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00661-1024x768.jpg" alt="DSCN0066[1]" width="550" height="412" class="alignnone size-large wp-image-1105" /></a></p>
<p>This blue doodad is the motor that's making all noise.  It seems to be moving a cable in and out:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00651.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00651-1024x768.jpg" alt="DSCN0065[1]" width="550" height="412" class="alignnone size-large wp-image-1106" /></a></p>
<p>And this is an access hole in the flywheel (the rear metal wheel is the flywheel, the other giant wheel that the crank is attached to is really just a big pulley) that shows the thingy that's moving up and down during that seeking process:<br />
<a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00641.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00641-1024x768.jpg" alt="DSCN0064[1]" width="550" height="412" class="alignnone size-large wp-image-1107" /></a></p>
<p>And that's where I'm at for now.  I ran out of time - probably find time to pull the other side apart next week.  No worries, it's in usable shape...  Even if it does look like some sort of Terminator half-machine elliptical.  You would be surprised what you wife will put up with if she thinks you're going to eventually fix it <img src='http://timlaqua.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
<a href="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00671.jpg"><img src="http://timlaqua.com/wp-content/uploads/2013/01/DSCN00671-1024x768.jpg" alt="DSCN0067[1]" width="550" height="412" class="alignnone size-large wp-image-1108" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2013/01/our-life-fitness-x5-elliptical-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Consuming Sharepoint Lists via OData with SSIS</title>
		<link>http://timlaqua.com/2012/07/consuming-sharepoint-lists-via-odata-with-ssis/</link>
		<comments>http://timlaqua.com/2012/07/consuming-sharepoint-lists-via-odata-with-ssis/#comments</comments>
		<pubDate>Thu, 05 Jul 2012 22:02:03 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[ssis]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=1055</guid>
		<description><![CDATA[We recently needed to bring data from a Sharepoint list in to SSIS for use in an attribute lookup for a cube dimension. Seems like this should be pretty straight forward since SSRS does it natively now, but no - that wizardry hasn't made its way over to the SSIS team yet. As stated before, [...]]]></description>
				<content:encoded><![CDATA[<p>We recently needed to bring data from a Sharepoint list in to SSIS for use in an attribute lookup for a cube dimension.  Seems like this should be pretty straight forward since SSRS does it natively now, but no - that wizardry hasn't made its way over to the SSIS team yet.  As stated before, we don't care for third party dependencies or external non-standard assemblies of any sort in our packages.  That means, as usual, we'll be writing a script component to take care of getting our data out of Sharepoint.</p>
<p>First, navigate to the list you are interested in and export it as a data feed<br />
<a href="http://timlaqua.com/wp-content/uploads/2012/07/Export-Data-Feed-e1341524341891.png"><img src="http://timlaqua.com/wp-content/uploads/2012/07/Export-Data-Feed-e1341524341891.png" alt="" title="Export Data Feed" width="687" height="171" class="alignnone size-full wp-image-1059" /></a><br />
<span id="more-1055"></span><br />
Save the file it creates and view it with a text editor.  Locate the service URL.<br />
<a href="http://timlaqua.com/wp-content/uploads/2012/07/ListData-Service-Url.png"><img src="http://timlaqua.com/wp-content/uploads/2012/07/ListData-Service-Url.png" alt="" title="ListData Service Url" width="710" height="38" class="alignnone size-full wp-image-1060" /></a></p>
<ul>
<li>Now start SQL Server Data Tools (SSDT, used to be BIDS)</li>
<li>Create a new SSIS project</li>
<li>Add a Data Flow Task</li>
<li>Add a Script Component configured as a Source</li>
<li>Add some Columns to your script source output<br />
<a href="http://timlaqua.com/wp-content/uploads/2012/07/Script-Component-Outputs-e1341524513286.png"><img src="http://timlaqua.com/wp-content/uploads/2012/07/Script-Component-Outputs-e1341524513286.png" alt="" title="Script Component Outputs" width="643" height="395" class="alignnone size-full wp-image-1061" /></a>
</li>
<li>Edit the Script</li>
<li>The only method we need to keep is CreateNewOutputRows(), the rest you can delete or just ignore.</li>
<li>Add a new Service Reference<br />
<a href="http://timlaqua.com/wp-content/uploads/2012/07/Add-a-Service-Reference-e1341524638427.png"><img src="http://timlaqua.com/wp-content/uploads/2012/07/Add-a-Service-Reference-e1341524638427.png" alt="" title="Add a Service Reference" width="319" height="194" class="alignnone size-full wp-image-1056" /></a>
</li>
<li>Paste your Service Url from earlier in to the Address field and click Go<br />
<a href="http://timlaqua.com/wp-content/uploads/2012/07/Service-Reference-Configuration-1.png"><img src="http://timlaqua.com/wp-content/uploads/2012/07/Service-Reference-Configuration-1.png" alt="" title="Service Reference Configuration 1" width="624" height="342" class="alignnone size-full wp-image-1062" /></a>
</li>
<li>Enter a more meaningful Namespace<br />
<a href="http://timlaqua.com/wp-content/uploads/2012/07/Service-Reference-Configuration-2.png"><img src="http://timlaqua.com/wp-content/uploads/2012/07/Service-Reference-Configuration-2.png" alt="" title="Service Reference Configuration 2" width="599" height="95" class="alignnone size-full wp-image-1063" /></a>
</li>
<li>Add the Namespace of the service reference you just added to your script (just type "using SC" and intellisense will pop up your script component's namespace) and bring in System.Linq as well:

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Data</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">Microsoft.SqlServer.Dts.Pipeline.Wrapper</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">Microsoft.SqlServer.Dts.Runtime.Wrapper</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">SC_bf880e9df2b64705ab3207accf3c6b9a.SharepointOData</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Linq</span><span style="color: #008000;">;</span></pre></div></div>

</li>
<li>Finish implementing CreateNewOutputRows():

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">    <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">override</span> <span style="color: #0600FF;">void</span> CreateNewOutputRows<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        SPTeamTestDataContext dc <span style="color: #008000;">=</span>
            <span style="color: #008000;">new</span> SPTeamTestDataContext<span style="color: #000000;">&#40;</span>
                <span style="color: #008000;">new</span> Uri<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;https://intranet.yourdomain.com/sites/site0/_vti_bin/ListData.svc&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        dc.<span style="color: #0000FF;">Credentials</span> <span style="color: #008000;">=</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Net</span></span>.<span style="color: #0000FF;">CredentialCache</span>.<span style="color: #0000FF;">DefaultNetworkCredentials</span><span style="color: #008000;">;</span>
&nbsp;
        var projects <span style="color: #008000;">=</span> from project <span style="color: #0600FF;">in</span> dc.<span style="color: #0000FF;">ITProjects</span>
                      select <span style="color: #008000;">new</span>
                      <span style="color: #000000;">&#123;</span>
                          Phase <span style="color: #008000;">=</span> project.<span style="color: #0000FF;">Phase</span>.<span style="color: #0000FF;">Value</span>,
                          ProjectName <span style="color: #008000;">=</span> project.<span style="color: #0000FF;">Project</span>
                      <span style="color: #000000;">&#125;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var project <span style="color: #0600FF;">in</span> projects<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            Output0Buffer.<span style="color: #0000FF;">AddRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            Output0Buffer.<span style="color: #0000FF;">C1</span> <span style="color: #008000;">=</span> project.<span style="color: #0000FF;">Phase</span><span style="color: #008000;">;</span>
            Output0Buffer.<span style="color: #0000FF;">C2</span> <span style="color: #008000;">=</span> project.<span style="color: #0000FF;">ProjectName</span><span style="color: #008000;">;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span></pre></div></div>

</li>
<li>Dump all the output in to the Trash (or row count transformation, whatever you use for that sort of thing) and snap on a Data Viewer.<br />
<a href="http://timlaqua.com/wp-content/uploads/2012/07/Data-Flow-Finished.png"><img src="http://timlaqua.com/wp-content/uploads/2012/07/Data-Flow-Finished.png" alt="" title="Data Flow Finished" width="194" height="187" class="alignnone size-full wp-image-1057" /></a>
</li>
<li>Finally, run the package:<br />
<a href="http://timlaqua.com/wp-content/uploads/2012/07/Data-Viewer-Output.png"><img src="http://timlaqua.com/wp-content/uploads/2012/07/Data-Viewer-Output.png" alt="" title="Data Viewer Output" width="708" height="264" class="alignnone size-full wp-image-1058" /></a>
</li>
</ul>
<h4>Pagination</h4>
<p>Now depending on how your service is configured, you may not receive all of your rows.  In our case, we only got 1000.  This means the service is only configured to return a maximum of 1000 per query.  To work around this, you must paginate your requests:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">        var projects <span style="color: #008000;">=</span> from project <span style="color: #0600FF;">in</span> dc.<span style="color: #0000FF;">ITProjects</span>
                      orderby project.<span style="color: #0000FF;">Id</span>
                      select <span style="color: #008000;">new</span>
                      <span style="color: #000000;">&#123;</span>
                          Phase <span style="color: #008000;">=</span> project.<span style="color: #0000FF;">Phase</span>.<span style="color: #0000FF;">Value</span>,
                          ProjectName <span style="color: #008000;">=</span> project.<span style="color: #0000FF;">Project</span>
                      <span style="color: #000000;">&#125;</span>
                      <span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #FF0000;">int</span> recordCount <span style="color: #008000;">=</span> projects.<span style="color: #0000FF;">Count</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #FF0000;">int</span> page <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
        <span style="color: #FF0000;">int</span> pageSize <span style="color: #008000;">=</span> <span style="color: #FF0000;">100</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #0600FF;">while</span><span style="color: #000000;">&#40;</span>page<span style="color: #008000;">*</span>pageSize <span style="color: #008000;">&lt;</span> recordCount<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var project <span style="color: #0600FF;">in</span> projects.<span style="color: #0000FF;">Skip</span><span style="color: #000000;">&#40;</span>page <span style="color: #008000;">*</span> pageSize<span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Take</span><span style="color: #000000;">&#40;</span>pageSize<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
            <span style="color: #000000;">&#123;</span>
                Output0Buffer.<span style="color: #0000FF;">AddRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                Output0Buffer.<span style="color: #0000FF;">C1</span> <span style="color: #008000;">=</span> project.<span style="color: #0000FF;">Phase</span><span style="color: #008000;">;</span>
                Output0Buffer.<span style="color: #0000FF;">C2</span> <span style="color: #008000;">=</span> project.<span style="color: #0000FF;">ProjectName</span><span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
            page<span style="color: #008000;">++;</span>
        <span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2012/07/consuming-sharepoint-lists-via-odata-with-ssis/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>SQL 2012 Upgrade: Lessons Learned</title>
		<link>http://timlaqua.com/2012/06/sql-2012-upgrade-lessons-learned/</link>
		<comments>http://timlaqua.com/2012/06/sql-2012-upgrade-lessons-learned/#comments</comments>
		<pubDate>Mon, 18 Jun 2012 13:24:38 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[sql 2012]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=1010</guid>
		<description><![CDATA[Monday of last week (2012-06-11) we started our SQL 2012 upgrades by first upgrading our development and staging environment. We encountered very few issues with this particular phase and forged ahead with upgrading one of our monitoring servers - this is the one that hung us up for an hour or two. We decided it [...]]]></description>
				<content:encoded><![CDATA[<p>Monday of last week (2012-06-11) we started our SQL 2012 upgrades by first upgrading our development and staging environment.  We encountered very few issues with this particular phase and forged ahead with upgrading one of our monitoring servers - this is the one that hung us up for an hour or two.  We decided it didn't need to run enterprise edition and could get by with the Business Intelligence edition.  What we didn't notice was that at some point in the past we had setup MDW on that server for evaluation and, after abandoning it, never cleaned it up.  The MDW databases uses both partitioning and compression - enterprise only features.  </p>
<p>After sorting that out, we moved on to our SSAS presentation server which also received Business Intelligence edition as there are no core limits on SSAS in that edition - that box has 48 cores and the engine licensing scared us a little - then we remembered we don't even run an instance of the engine on that server.  Finally, we upgraded our production ETL/DW/SSRS server and that's when we found out that someone declared war on commas in email addresses (I have no idea what standard led them to that decision - I assume they forgot that commas commonly exist in titled email strings).  Then pass-through authentication in SSRS tanked, but our DBA quickly caught that one noticing the SSRS config file was completely overwritten and was only allowing NTLM (switching back to Negotiate fixed the issue).  </p>
<p>For now, one week later, things appear to be stable and we believe we've found most of the issues.  This upgrade certainly didn't yield magic performance improvements as we saw in the 2005 upgrade and the 2008 upgrade and we have yet to use any of the new features - but we're ready.  Someone keeps talking about about Tabular instances <img src='http://timlaqua.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>As the saga continues and we move on to upgrading our remaining environments, I'll keep the following list updated:<br />
<H4>Phase 1: Core ETL, DW, SSRS, and SSAS Servers</H4></p>
<ul>
<li>Context menus are a little different in the new VS environment.  Had to manually add the Change Connection command to the context menu that's used when editing XMLA files (<a href="http://timlaqua.com/2012/06/sql-2012-xmla-change-connection-command-missing/" title="SQL 2012: XMLA Change Connection Command Missing">SQL 2012: XMLA Change Connection Command Missing</a>)</li>
<li>You can't add DATETIME and TIME any more, you have to explicitly CAST the TIME part to DATETIME first</li>
<li>Don't worry about the Project Deployment Model in SSIS yet.  The Package Deployment Model works fine for now</li>
<li>When compiling SSIS packages, they don't sit in the ./bin root by default anymore.  This can behavior can be changed by editing the DeploymentOutputPath in the Properties of the solution file</li>
<li>Do NOT diagonalgrade a server running Enterprise Edition only features to SQL 2012 Business Intelligence Edition (<a href="http://timlaqua.com/2012/06/sql-2012-upgrading-from-sql-2008-r2-enterprise-to-sql-2012-business-intelligence/" title="Upgrading from SQL 2008 R2 Enterprise to SQL 2012 Business Intelligence">Upgrading from SQL 2008 R2 Enterprise to SQL 2012 Business Intelligence</a>)</li>
<li>The SSRS Config file (RSReportServer.config) gets overwritten.  Back yours up before doing the upgrade so you can put the settings back.  The one we noticed was the authentication changed to NTLM only rather than Negotiate (we use kerberos primarily) so auth started failing for many data sources</li>
<li>The SQLPS (Powershell) shell behaves a little differently.  Working with files (copies, moves, etc) will not work correctly unless you break out of the default provider context (it's in the context of SQL's provider when the shell starts).  At the top of all of our Powershell type SQL Agent Job Steps we just added a "C:" line to break out of the SQL provider and things worked as expected again</li>
<li>In SSAS, go through the data sources in your AS databases and switch any references to SQLNCLI10/10.1 to SQLNCLI11.  We've seen SQLNCLI10.1 continue to work fine after the upgrade in some scenarios and fail in others - safest to just update them.</li>
<li>msdb.dbo.sp_send_dbmail Msg 14613, Level 16, State 1, Procedure sysmail_verify_addressparams_sp, Line 13.  The specified '@recipients' cannot use commas (,) to separate addresses: 'Tim_Laqua@trekbikes.com;Laqua, Tim &lt;tim_laqua@trekbikes.com&gt;;'. To continue, use semicolons (;) to separate addresses."  I looked at the validation proc, it tosses out ANY string with a comma in it.  Simply remove the commas (so instead of LastName, FirstName use FirstName LastName for titled email addresses)
</li>
<li>SSRS also declared war on email recipient strings - Some subscriptions will fail with the error "specified string is not in the form required for an e-mail address."  Fiddle w/ the email address line, we've seen this be an issue with white space, blanks, etc.  Basically, they made the email address validation ridiculously rigid.</li>
</ul>
<p>Don't try to perfectly plan your upgrade, just be ready to zig when it zags.  As a team, we've been through at least two of these major SQL Server upgrades previously and this one was more about being prepared for possible issues rather than spending ridiculous amounts of time trying to perfectly reproduce production load to simulate the production upgrades.  We did spend some time tidying up our house first as over the years we have learned that the more you stay away from third party components and assemblies, the smoother these upgrades go.  This observation led us to rip all of our third party SSIS components (components from codeplex, purchased components, and ones that we wrote) out of our packages and only use built-in components.  Every single package we've had so far upgraded without issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2012/06/sql-2012-upgrade-lessons-learned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading from SQL 2008 R2 Enterprise to SQL 2012 Business Intelligence</title>
		<link>http://timlaqua.com/2012/06/sql-2012-upgrading-from-sql-2008-r2-enterprise-to-sql-2012-business-intelligence/</link>
		<comments>http://timlaqua.com/2012/06/sql-2012-upgrading-from-sql-2008-r2-enterprise-to-sql-2012-business-intelligence/#comments</comments>
		<pubDate>Tue, 12 Jun 2012 20:38:03 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[business intelligence]]></category>
		<category><![CDATA[sql 2012]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=1015</guid>
		<description><![CDATA[With all the new licensing considerations in SQL 2012, everyone's busy trying to figure out exactly what the cheapest license they can get by with is. For one of our instances, we decided rather than Enterprise, we could run the Business Intelligence edition to save some cash. That upgrade path is explicitly listed in the [...]]]></description>
				<content:encoded><![CDATA[<p>With all the new licensing considerations in SQL 2012, everyone's busy trying to figure out exactly what the cheapest license they can get by with is.  For one of our instances, we decided rather than Enterprise, we could run the Business Intelligence edition to save some cash.  That upgrade path is explicitly listed in the <a href="http://msdn.microsoft.com/en-us/library/ms143393.aspx" title="Supported Version and Edition Upgrades">Supported Version and Edition Upgrades</a> documentation.</p>
<p>What happened?</p>
<p>We clicked through the upgrade wizard as usual and it got through about 85% and then prompted an error:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.</pre></div></div>

<p>We clicked ok, then it finished and the results showed that the SQL engine and a few other features failed the upgrade.  Great.  <span id="more-1015"></span>Off to the event logs:</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2012/06/Error-912.jpg"><img src="http://timlaqua.com/wp-content/uploads/2012/06/Error-912.jpg" alt="" title="Error 912" width="694" height="448" class="alignnone size-full wp-image-1016" /></a></p>
<p><a href="http://timlaqua.com/wp-content/uploads/2012/06/Error-3417.jpg"><img src="http://timlaqua.com/wp-content/uploads/2012/06/Error-3417.jpg" alt="" title="Error 3417" width="695" height="447" class="alignnone size-full wp-image-1017" /></a></p>
<p>Then take a look at the error log and we have this at the end:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">2012-06-12 14:25:16.74 spid5s      Error: 926, Severity: 14, State: 1.
2012-06-12 14:25:16.74 spid5s      Database 'sysutility_mdw' cannot be opened. It has been 
                                   marked SUSPECT by recovery. See the SQL Server errorlog
                                   or more information.
2012-06-12 14:25:16.74 spid5s      Error: 912, Severity: 21, State: 2.
2012-06-12 14:25:16.74 spid5s      Script level upgrade for database 'master' failed because 
                                   upgrade step 'msdb110_upgrade.sql' encountered 
                                   error 926, state 1, severity 14. This is a serious error 
                                   condition which might interfere with regular operation 
                                   and the database will be taken offline. If the error happened 
                                   during upgrade of the 'master' database, it will prevent the 
                                   entire SQL Server instance from starting. Examine the 
                                   previous errorlog entries for errors, take the appropriate 
                                   corrective actions and re-start the database so that the 
                                   script upgrade steps run to completion.
2012-06-12 14:25:16.77 spid5s      Error: 3417, Severity: 21, State: 3.
2012-06-12 14:25:16.77 spid5s      Cannot recover the master database. SQL Server is unable to 
                                   run. Restore master from a full backup, repair it, or rebuild 
                                   it. For more information about how to rebuild the master 
                                   database, see SQL Server Books Online.</pre></div></div>

<p>Well - now you're probably off searching for error fragments and rebuilding your master database, etc.  We'd suggest you scroll up a little further and figure out why that sysutility_mdw db couldn't be opened.  That's the actual error, the rest of the error is the standard pile of garbage it spits out when a database in script upgrade mode (master) has the script crash - basically, ignore that, it's worthless.</p>
<p>Now we scroll up to the beginning where it tried to bring up that database it couldn't open (sysutility_mdw):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">2012-06-12 14:24:35.08 spid21s     Error: 909, Severity: 21, State: 1.
2012-06-12 14:24:35.08 spid21s     Database 'sysutility_mdw' cannot be started in this edition of
                                   SQL Server because part or all of object
                                   'sysutility_ucp_smo_properties_internal' is enabled with data
                                   compression or vardecimal storage format. Data compression and
                                   vardecimal storage format are only supported on SQL Server
                                   Enterprise Edition.
2012-06-12 14:24:35.09 spid21s     Error: 905, Severity: 21, State: 1.
2012-06-12 14:24:35.09 spid21s     Database 'sysutility_mdw' cannot be started in this edition of
                                   SQL Server because it contains a partition function 
                                   'sysutility_ucp_aggregation_type_partition_function'. Only
                                   Enterprise edition of SQL Server supports partitioning.
2012-06-12 14:24:35.10 spid21s     Error: 933, Severity: 21, State: 1.
2012-06-12 14:24:35.10 spid21s     Database 'sysutility_mdw' cannot be started because some of
                                   the database functionality is not available in the current 
                                   edition of SQL Server.</pre></div></div>

<p>Oh dear.  What happened is we're smack in the middle of an upgrade (the MDF is actually marked as a 2012 db at this point), but the engine won't attach it because it's using an Enterprise Only feature (actually it's using a few of them).  Further, your instance is stuck in that terrible script upgrade mode and won't come out of it until it can finish its work.  What's the issue here?  Well, either it made a list of the databases that it upgraded earlier and is iterating over them, or the script isn't checking to see if each db is online before trying to run against it.  Doesn't really matter, there's only one quick fix here:</p>
<ol>
<li>Copy all of the data and log files for that database on to a server with SQL 2012 Enterprise (or probably Developer) Edition installed</li>
<li>Attach the database</li>
<li>Remove the unsupported features</li>
<li>Detach the database</li>
<li>Copy the data and log files back to their original location on the Business Intelligence Edition server</li>
<li>Start the SQL service again</li>
</ol>
<p>We were a little surprised that the upgrade wizard didn't flag that database as unsupported in the GUI portion of the install - It does a few thousand checks already, seems they just forgot a few important ones that only come in to play now that they're turning off commonly used features.</p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2012/06/sql-2012-upgrading-from-sql-2008-r2-enterprise-to-sql-2012-business-intelligence/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQL 2012: XMLA Change Connection Command Missing</title>
		<link>http://timlaqua.com/2012/06/sql-2012-xmla-change-connection-command-missing/</link>
		<comments>http://timlaqua.com/2012/06/sql-2012-xmla-change-connection-command-missing/#comments</comments>
		<pubDate>Mon, 11 Jun 2012 19:50:56 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[How-to Guides]]></category>
		<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[sql 2012]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=997</guid>
		<description><![CDATA[I'm fairly sure this has to do with the options I chose when I first opened SSMS, where I asked it to import my settings. Regardless of why it happened, my Change Connection command is gone from my context menu when editing XMLA files: I use this quite a bit as we have many environments [...]]]></description>
				<content:encoded><![CDATA[<p>I'm fairly sure this has to do with the options I chose when I first opened SSMS, where I asked it to import my settings.  Regardless of why it happened, my Change Connection command is gone from my context menu when editing XMLA files:</p>
<p><a href="http://timlaqua.com/wp-content/uploads/2012/06/No-Change-Connection.jpg"><img src="http://timlaqua.com/wp-content/uploads/2012/06/No-Change-Connection.jpg" alt="" title="No Change Connection" width="508" height="365" class="alignnone size-full wp-image-999" /></a></p>
<p>I use this quite a bit as we have many environments and most of those environments also have staging environments.  Here's now to manually add it (and add it to add it to any other context menus you want)<br />
<span id="more-997"></span><br />
<em>Select <strong>Tools</strong> > <strong>Customize...</strong></em></p>
<p><a href="http://timlaqua.com/wp-content/uploads/2012/06/Select-Customize.jpg"><img src="http://timlaqua.com/wp-content/uploads/2012/06/Select-Customize.jpg" alt="" title="Select Customize" width="351" height="219" class="alignnone size-full wp-image-1001" /></a></p>
<p><em>Click the <strong>Command</strong> tab, then the <strong>Context Menu</strong> radio button and scroll down to <strong>Other Context Menus| Code Window</strong></em></p>
<p><a href="http://timlaqua.com/wp-content/uploads/2012/06/Other-Context-Menus-Code-Window.jpg"><img src="http://timlaqua.com/wp-content/uploads/2012/06/Other-Context-Menus-Code-Window.jpg" alt="" title="Other Context Menus - Code Window" width="585" height="555" class="alignnone size-full wp-image-1000" /></a></p>
<p><em>Click <strong>Add Command</strong>, scroll down to <strong>Query</strong>, and select <strong>Change Connection</strong></em></p>
<p><a href="http://timlaqua.com/wp-content/uploads/2012/06/Add-Command.jpg"><img src="http://timlaqua.com/wp-content/uploads/2012/06/Add-Command.jpg" alt="" title="Add Command" width="594" height="409" class="alignnone size-full wp-image-998" /></a></p>
<p><em>And now you have your Change Connection command back</em></p>
<p><a href="http://timlaqua.com/wp-content/uploads/2012/06/With-Change-Connection-Command.jpg"><img src="http://timlaqua.com/wp-content/uploads/2012/06/With-Change-Connection-Command.jpg" alt="" title="With Change Connection Command" width="328" height="288" class="alignnone size-full wp-image-1002" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2012/06/sql-2012-xmla-change-connection-command-missing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.692 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-22 19:44:11 -->
