<?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>A Developer&#039;s Blog &#187; Visual Studio</title>
	<atom:link href="http://blog.hoegaerden.be/category/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hoegaerden.be</link>
	<description>SQL Server, BI, .NET, IT and anything else I have been playing with.</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:15:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Getting Cooperation From A Stubborn Data Dude</title>
		<link>http://blog.hoegaerden.be/2010/06/09/getting-cooperation-from-a-stubborn-data-dude/</link>
		<comments>http://blog.hoegaerden.be/2010/06/09/getting-cooperation-from-a-stubborn-data-dude/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 19:59:49 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2010/06/09/getting-cooperation-from-a-stubborn-data-dude/</guid>
		<description><![CDATA[Lately I’ve been using Visual Studio Team System 2008 Database Edition with the GDR R2 add-on, also known as “The Data Dude”, to compare databases with each other. And during a schema compare I noticed that the dude can be quite stubborn now and then. Here’s an example and an explanation of why, as far [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I’ve been using <a title="Download: Microsoft® Visual Studio Team System 2008 Database Edition GDR R2" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&amp;displaylang=en" target="_blank">Visual Studio Team System 2008 Database Edition with the GDR R2 add-on</a>, also known as “The Data Dude”, to compare databases with each other.</p>
<p>And during a schema compare I noticed that the dude can be quite stubborn now and then.</p>
<p>Here’s an example and an explanation of why, as far as I can tell, the dude is behaving that way.</p>
<h2>The Scenario</h2>
<p>At work we use the data dude’s schema compare to prepare our deployment scripts.  The most fun can be had when preparing a script to deploy the latest finalized version, <strong>version x</strong>, from the Development (DEV) to the Acceptance (UAT) environment.</p>
<p>In our DEV database there have already been changes for the next version, <strong>version x+1</strong>, so these changes need to be skipped.</p>
<p>Now imagine the following situation:</p>
<ul>
<li>a table called <em>TableA</em> exists</li>
<li>a new field called <em>NewFieldA</em> was added to <em>TableA</em></li>
<li>a view called <em>ViewA</em> exists and was modified – it uses <em>TableA</em> but not <em>NewFieldA</em></li>
</ul>
<p>The changes to <em>ViewA</em> belong with <strong>version x</strong>, while the changes to <em>TableA</em> are part of <strong>version x+1</strong>.  So the script that I’m going to generate should contain an ALTER VIEW ViewA … but not an ALTER TABLE TableA ….</p>
<h2>The Behavior</h2>
<p>Using the dude, I open up the dropdown on the line that states <em>Different definition </em>on <em>TableA</em> and I select <em>Skip</em>.  The value gets changed from <em>Update</em> to <em>Skip</em>.  However, when the focus changes to another line in the grid the value changes back to <em>Update</em>!  Furthermore, it’s now grayed out, impossible to change!</p>
<p>The first time that you see this happening you can’t believe your eyes and try it once more, first closing everything and then re-doing your actions.  Just to see if you didn’t select the wrong option somewhere.  But alas, the dude remains stubborn!</p>
<p><strong>Tip:</strong> if you have just executed the compare and you find that some update actions cannot be modified, try to do a refresh (right-click on the background of the comparison window and click Refresh).  I noticed that after the refresh you will get the dropdown for these lines and thus will be able to change the Update Action.</p>
<h2>The Explanation</h2>
<p>It took me a while to realize, but here’s what seems to be happening.  Like with all things stubborn, it helps if you know what the thing in question is actually being stubborn for.</p>
<p>The dude knows that <em>ViewA</em> depends on <em>TableA</em> and it also knows that both <em>ViewA</em> and <em>TableA</em> where changed.  However, the dude is a little short-sighted, it doesn’t know that <em>NewFieldA</em> is not used in <em>ViewA</em>.  It doesn’t know that the change to <em>ViewA</em> was not related to the change on <em>TableA</em>.  So it automatically assumes that you’re making a mistake and prevents you from messing up.  It thinks, “You stupid user, I know it better, I am smart software!  And that’s not all, I AM THE DATA DUDE! And if there’s one thing you don’t want, that’s to mess with the Data Dude!”.</p>
<p>Here’s a screenshot of the dude’s stubbornness:</p>
<p><img style="display: inline; border-width: 0px;" title="Grayed-out Update Action: the result of a stubborn data dude" src="http://blog.hoegaerden.be/wp-content/uploads/image291.png" border="0" alt="Grayed-out Update Action: the result of a stubborn data dude" width="105" height="182" /></p>
<p>In this particular case it refused to skip certain new tables, even though there were no dependent objects that needed those tables!  The first two lines show the grayed-out items.  These tables were located under a new schema and I had to put the schema’s <strong>Update Action</strong> to <em>Skip</em> to get the tables be skipped as well.  The Update Action for the tables was changed automatically when I modified the action for the schema.</p>
<p>But, if you ask me, I don’t see why I shouldn’t be able to <em>Skip</em> a new table even when I am going to create the new schema to which it belongs?  It’s the table that depends on the schema, not the other way around.</p>
<h2>The Feature Request</h2>
<p>It would have been great if I could manually override the dude’s decision.  As that was not the case, I have to manually change the generated script so that it only contains the changes that I want.  As long as it’s technically feasible, I think manual changes to the <strong>Update Action</strong> should be allowed.</p>
<h2>One More Tip</h2>
<p>Take a good look at the following screenshot.</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image292.png"><img style="display: inline; border: 0px;" title="Beware the miniature exclamation mark in the icon's corner!" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb70.png" border="0" alt="Beware the miniature exclamation mark in the icon's corner!" width="700" height="328" /></a></p>
<p>By default, the node that reads <em>Different dependencies</em> was collapsed.  So you think, good, the line says <em>Skip</em> so nothing will happen.  Except, did you notice that minuscule exclamation mark in the bottom-left corner of the icon?  That means that other actions may be happening further down the dependency tree, as illustrated in the screenshot.</p>
<p>So don’t let the dude mislead you into thinking nothing will happen when it says <em>Skip</em>.  Sometimes the actual actions are hidden further down and you need to open up every node with the exclamation mark on the icon to verify if that’s what you want.</p>
<p>Have fun training the dude,</p>
<p>Valentino.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2010%2F06%2F09%2Fgetting-cooperation-from-a-stubborn-data-dude%2F&amp;title=Getting%20Cooperation%20From%20A%20Stubborn%20Data%20Dude" id="wpa2a_2"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2010/06/09/getting-cooperation-from-a-stubborn-data-dude/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FIX: Visual Studio crashes after playing around with its windows</title>
		<link>http://blog.hoegaerden.be/2009/05/14/fix-visual-studio-crashes-after-playing-around-with-its-windows/</link>
		<comments>http://blog.hoegaerden.be/2009/05/14/fix-visual-studio-crashes-after-playing-around-with-its-windows/#comments</comments>
		<pubDate>Thu, 14 May 2009 19:13:49 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[BIDS]]></category>
		<category><![CDATA[bugfix]]></category>
		<category><![CDATA[Business Intelligence Development Studio]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2009/05/14/fix-visual-studio-crashes-after-playing-around-with-its-windows/</guid>
		<description><![CDATA[Lately I had been getting annoyed by Visual Studio crashing on me while working on ETL packages.  The crashes seemed somehow related to debugging a package because they usually occurred after I clicked the &#8220;Package execution completed. Click here to switch to design mode, or select Stop Debugging from the Debug menu.&#8221; link.  But I [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I had been getting annoyed by Visual Studio crashing on me while working on ETL packages.  The crashes seemed somehow related to debugging a package because they usually occurred after I clicked the &#8220;Package execution completed. Click here to switch to design mode, or select Stop Debugging from the Debug menu.&#8221; link.  But I couldn&#8217;t really pinpoint why or when exactly they occurred.  Now I&#8217;ve got an explanation, and a solution!</p>
<p>How did I get to the solution?  Well, today I decided to click the &#8220;Send to Microsoft&#8221; button on the infamous crash pop-up window.  And from it I actually got a link to a fix for the issue.  Apparently the issue is not related to Integration Services in particular, it is a much broader Visual Studio shell issue that occurs in Visual Studio 2008 with SP1 when you&#8217;ve got a combination of undocking windows and changing window layout.  And that is indeed what I usually do when debugging a package!  When the package stops executing I often execute the following scenario:</p>
<ul>
<li>double-click the title bar on the Output window to undock it</li>
<li>enlarge the undocked Output window to almost full-screen so I can have a good look at the errors</li>
<li>double-click the title bar to dock the window back to its original place</li>
<li>click the &#8220;Package execution completed.&#8221; link (or hit the Stop Debugging button)</li>
</ul>
<p>And that&#8217;s exactly the second scenario described in <a title="FIX: When you undock some windows or change the window layout in the Visual Studio 2008 Service Pack 1 IDE, the IDE crashes" href="http://support.microsoft.com/kb/960075" target="_blank">this Microsoft Support article</a> because when you stop debugging, the IDE switches the window layout back from debug to design.</p>
<p>I have now installed the hotfix and the issue is gone.  Beware though if you also use WPF, better read through the whole article and comments on <a title="KB960075 - VS Dev Environment crash after undocking windows or changing layouts" href="http://code.msdn.microsoft.com/KB960075" target="_blank">the download page</a> first.</p>
<p>Hmm, this may also explain some other unexplicable crashes I&#8217;ve seen lately.  Makes you wonder doesn&#8217;t it <img src='http://blog.hoegaerden.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2009%2F05%2F14%2Ffix-visual-studio-crashes-after-playing-around-with-its-windows%2F&amp;title=FIX%3A%20Visual%20Studio%20crashes%20after%20playing%20around%20with%20its%20windows" id="wpa2a_4"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2009/05/14/fix-visual-studio-crashes-after-playing-around-with-its-windows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

