<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>The Wit and Ramblings of David Giard - VSTS</title>
    <link>http://www.davidgiard.com/</link>
    <description>Demanding rigidly defined areas of doubt and uncertainty</description>
    <language>en-us</language>
    <copyright>David Giard</copyright>
    <lastBuildDate>Wed, 05 May 2010 02:04:35 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>davidgiard@davidgiard.com</managingEditor>
    <webMaster>davidgiard@davidgiard.com</webMaster>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=e9959c51-1f0e-4213-9c5d-c273c0860ca8</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,e9959c51-1f0e-4213-9c5d-c273c0860ca8.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,e9959c51-1f0e-4213-9c5d-c273c0860ca8.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e9959c51-1f0e-4213-9c5d-c273c0860ca8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Microsoft Product Unit Manager Cameron Skinner came to the midwest to show off the
Architecture features of Visual Studio 2010. He began his tour in the Detroit area,
speaking at local companies in the afternoon and at the Great Lakes Area .Net User
Group (GANG) in the evening. I recorded two of his presentations, which are available
here.
</p>
        <p>
Here is the presentation at GANG
</p>
        <p>
Part 1:<br /><object id="viddler_e795d36a" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="_cx" value="11562" /><param name="_cy" value="9789" /><param name="FlashVars" value="" /><param name="Movie" value="http://www.viddler.com/player/e795d36a/" /><param name="Src" value="http://www.viddler.com/player/e795d36a/" /><param name="WMode" value="Window" /><param name="Play" value="-1" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="always" /><param name="Scale" value="ShowAll" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><param name="AllowNetworking" value="all" /><param name="AllowFullScreen" value="true" /><embed src="http://www.viddler.com/player/e795d36a/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_e795d36a"></embed></object></p>
        <p>
Part 2:<br /><object id="viddler_cb10c8bb" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="_cx" value="11562" /><param name="_cy" value="9789" /><param name="FlashVars" value="" /><param name="Movie" value="http://www.viddler.com/player/cb10c8bb/" /><param name="Src" value="http://www.viddler.com/player/cb10c8bb/" /><param name="WMode" value="Window" /><param name="Play" value="-1" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="always" /><param name="Scale" value="ShowAll" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><param name="AllowNetworking" value="all" /><param name="AllowFullScreen" value="true" /><embed src="http://www.viddler.com/player/cb10c8bb/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_cb10c8bb"></embed></object></p>
        <p>
Part 3:<br /><object id="viddler_7767c22b" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="_cx" value="11562" /><param name="_cy" value="9789" /><param name="FlashVars" value="" /><param name="Movie" value="http://www.viddler.com/player/7767c22b/" /><param name="Src" value="http://www.viddler.com/player/7767c22b/" /><param name="WMode" value="Window" /><param name="Play" value="-1" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="always" /><param name="Scale" value="ShowAll" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><param name="AllowNetworking" value="all" /><param name="AllowFullScreen" value="true" /><embed src="http://www.viddler.com/player/7767c22b/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_7767c22b"></embed></object></p>
        <p>
Part 4:<br /><object id="viddler_b55ff453" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="_cx" value="11562" /><param name="_cy" value="9789" /><param name="FlashVars" value="" /><param name="Movie" value="http://www.viddler.com/player/b55ff453/" /><param name="Src" value="http://www.viddler.com/player/b55ff453/" /><param name="WMode" value="Window" /><param name="Play" value="-1" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="always" /><param name="Scale" value="ShowAll" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><param name="AllowNetworking" value="all" /><param name="AllowFullScreen" value="true" /><embed src="http://www.viddler.com/player/b55ff453/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_b55ff453"></embed></object></p>
        <p>
Part 5:<br /><object id="viddler_de8bb1cf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="_cx" value="11562" /><param name="_cy" value="9789" /><param name="FlashVars" value="" /><param name="Movie" value="http://www.viddler.com/player/de8bb1cf/" /><param name="Src" value="http://www.viddler.com/player/de8bb1cf/" /><param name="WMode" value="Window" /><param name="Play" value="-1" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="always" /><param name="Scale" value="ShowAll" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><param name="AllowNetworking" value="all" /><param name="AllowFullScreen" value="true" /><embed src="http://www.viddler.com/player/de8bb1cf/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_de8bb1cf"></embed></object></p>
        <p>
Here is the presentation at a Detroit-area company.
</p>
        <p>
Part 1:<br /><object id="viddler_5916049b" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="_cx" value="11562" /><param name="_cy" value="9789" /><param name="FlashVars" value="" /><param name="Movie" value="http://www.viddler.com/player/5916049b/" /><param name="Src" value="http://www.viddler.com/player/5916049b/" /><param name="WMode" value="Window" /><param name="Play" value="-1" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="always" /><param name="Scale" value="ShowAll" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><param name="AllowNetworking" value="all" /><param name="AllowFullScreen" value="true" /><embed src="http://www.viddler.com/player/5916049b/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_5916049b"></embed></object></p>
        <p>
Part 2:<br /><object id="viddler_1c9de015" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="_cx" value="11562" /><param name="_cy" value="9789" /><param name="FlashVars" value="" /><param name="Movie" value="http://www.viddler.com/player/1c9de015/" /><param name="Src" value="http://www.viddler.com/player/1c9de015/" /><param name="WMode" value="Window" /><param name="Play" value="-1" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="always" /><param name="Scale" value="ShowAll" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><param name="AllowNetworking" value="all" /><param name="AllowFullScreen" value="true" /><embed src="http://www.viddler.com/player/1c9de015/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_1c9de015"></embed></object></p>
        <p>
Part 3:<br /><object id="viddler_3f6dbfc2" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="_cx" value="11562" /><param name="_cy" value="9789" /><param name="FlashVars" value="" /><param name="Movie" value="http://www.viddler.com/player/3f6dbfc2/" /><param name="Src" value="http://www.viddler.com/player/3f6dbfc2/" /><param name="WMode" value="Window" /><param name="Play" value="-1" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="always" /><param name="Scale" value="ShowAll" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><param name="AllowNetworking" value="all" /><param name="AllowFullScreen" value="true" /><embed src="http://www.viddler.com/player/3f6dbfc2/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_3f6dbfc2"></embed></object></p>
        <p>
Part 4:<br /><object id="viddler_60fc7b33" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="_cx" value="11562" /><param name="_cy" value="9789" /><param name="FlashVars" value="" /><param name="Movie" value="http://www.viddler.com/player/60fc7b33/" /><param name="Src" value="http://www.viddler.com/player/60fc7b33/" /><param name="WMode" value="Window" /><param name="Play" value="-1" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="always" /><param name="Scale" value="ShowAll" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><param name="AllowNetworking" value="all" /><param name="AllowFullScreen" value="true" /><embed src="http://www.viddler.com/player/60fc7b33/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_60fc7b33"></embed></object></p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=e9959c51-1f0e-4213-9c5d-c273c0860ca8" />
      </body>
      <title>Cameron Skinner in Michigan</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,e9959c51-1f0e-4213-9c5d-c273c0860ca8.aspx</guid>
      <link>http://www.davidgiard.com/2010/05/05/CameronSkinnerInMichigan.aspx</link>
      <pubDate>Wed, 05 May 2010 02:04:35 GMT</pubDate>
      <description>&lt;p&gt;
Microsoft Product Unit Manager Cameron Skinner came to the midwest to show off the
Architecture features of Visual Studio 2010. He began his tour in the Detroit area,
speaking at local companies in the afternoon and at the Great Lakes Area .Net User
Group (GANG) in the evening. I recorded two of his presentations, which are available
here.
&lt;/p&gt;
&lt;p&gt;
Here is the presentation at GANG
&lt;/p&gt;
&lt;p&gt;
Part 1:&lt;br&gt;
&lt;object id=viddler_e795d36a classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=370&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9789"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/player/e795d36a/"&gt;
&lt;param name="Src" value="http://www.viddler.com/player/e795d36a/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value=""&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/player/e795d36a/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_e795d36a"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
Part 2:&lt;br&gt;
&lt;object id=viddler_cb10c8bb classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=370&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9789"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/player/cb10c8bb/"&gt;
&lt;param name="Src" value="http://www.viddler.com/player/cb10c8bb/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value=""&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/player/cb10c8bb/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_cb10c8bb"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
Part 3:&lt;br&gt;
&lt;object id=viddler_7767c22b classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=370&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9789"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/player/7767c22b/"&gt;
&lt;param name="Src" value="http://www.viddler.com/player/7767c22b/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value=""&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/player/7767c22b/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_7767c22b"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
Part 4:&lt;br&gt;
&lt;object id=viddler_b55ff453 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=370&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9789"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/player/b55ff453/"&gt;
&lt;param name="Src" value="http://www.viddler.com/player/b55ff453/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value=""&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/player/b55ff453/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_b55ff453"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
Part 5:&lt;br&gt;
&lt;object id=viddler_de8bb1cf classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=370&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9789"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/player/de8bb1cf/"&gt;
&lt;param name="Src" value="http://www.viddler.com/player/de8bb1cf/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value=""&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/player/de8bb1cf/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_de8bb1cf"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
Here is the presentation at a Detroit-area company.
&lt;/p&gt;
&lt;p&gt;
Part 1:&lt;br&gt;
&lt;object id=viddler_5916049b classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=370&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9789"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/player/5916049b/"&gt;
&lt;param name="Src" value="http://www.viddler.com/player/5916049b/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value=""&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/player/5916049b/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_5916049b"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
Part 2:&lt;br&gt;
&lt;object id=viddler_1c9de015 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=370&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9789"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/player/1c9de015/"&gt;
&lt;param name="Src" value="http://www.viddler.com/player/1c9de015/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value=""&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/player/1c9de015/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_1c9de015"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
Part 3:&lt;br&gt;
&lt;object id=viddler_3f6dbfc2 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=370&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9789"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/player/3f6dbfc2/"&gt;
&lt;param name="Src" value="http://www.viddler.com/player/3f6dbfc2/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value=""&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/player/3f6dbfc2/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_3f6dbfc2"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
Part 4:&lt;br&gt;
&lt;object id=viddler_60fc7b33 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=370&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9789"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/player/60fc7b33/"&gt;
&lt;param name="Src" value="http://www.viddler.com/player/60fc7b33/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value=""&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/player/60fc7b33/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_60fc7b33"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=e9959c51-1f0e-4213-9c5d-c273c0860ca8" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,e9959c51-1f0e-4213-9c5d-c273c0860ca8.aspx</comments>
      <category>Architecture</category>
      <category>Video</category>
      <category>VSTS</category>
    </item>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=47a4edd9-c67a-48e8-97fd-97b32191803d</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,47a4edd9-c67a-48e8-97fd-97b32191803d.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,47a4edd9-c67a-48e8-97fd-97b32191803d.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=47a4edd9-c67a-48e8-97fd-97b32191803d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img border="0" src="http://www.davidgiard.com/content/binary/TechnologyAndFriends.gif" />
        </p>
        <p>
          <strong>Episode 17</strong>
        </p>
        <p>
Microsoft Visual Studio Team System 2010 is currently in CTP3.
</p>
        <p>
In this interview, Microsoft Technology Specialist Randy Pagels describes the new
features of the upcoming release of this product.
</p>
        <p>
Randy maintains a great deal of information on VSTS at <a href="http://www.teamsystemcafe.net/" target="_blank">TeamSystemCafe.net</a><br /></p>
        <p>
          <object id="viddler_797f0a6b" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="348">
            <param name="_cx" value="11562" />
            <param name="_cy" value="9207" />
            <param name="FlashVars" value="" />
            <param name="Movie" value="http://www.viddler.com/simple/797f0a6b/" />
            <param name="Src" value="http://www.viddler.com/simple/797f0a6b/" />
            <param name="WMode" value="Window" />
            <param name="Play" value="-1" />
            <param name="Loop" value="-1" />
            <param name="Quality" value="High" />
            <param name="SAlign" value="LT" />
            <param name="Menu" value="-1" />
            <param name="Base" value="" />
            <param name="AllowScriptAccess" value="always" />
            <param name="Scale" value="ShowAll" />
            <param name="DeviceFont" value="0" />
            <param name="EmbedMovie" value="0" />
            <param name="BGColor" value="" />
            <param name="SWRemote" value="" />
            <param name="MovieData" value="" />
            <param name="SeamlessTabbing" value="1" />
            <param name="Profile" value="0" />
            <param name="ProfileAddress" value="" />
            <param name="ProfilePort" value="0" />
            <param name="AllowNetworking" value="all" />
            <param name="AllowFullScreen" value="true" />
            <embed src="http://www.viddler.com/simple/797f0a6b/" width="437" height="348" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_797f0a6b">
            </embed>
          </object>
        </p>
        <p>
11 mins, 52 secs
</p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=47a4edd9-c67a-48e8-97fd-97b32191803d" />
      </body>
      <title>Randy Pagels on Visual Studio Team System 2010</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,47a4edd9-c67a-48e8-97fd-97b32191803d.aspx</guid>
      <link>http://www.davidgiard.com/2009/04/23/RandyPagelsOnVisualStudioTeamSystem2010.aspx</link>
      <pubDate>Thu, 23 Apr 2009 11:25:58 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img border=0 src="http://www.davidgiard.com/content/binary/TechnologyAndFriends.gif"&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Episode 17&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Microsoft Visual Studio Team System 2010 is currently in CTP3.
&lt;/p&gt;
&lt;p&gt;
In this interview, Microsoft Technology Specialist Randy Pagels describes the new
features of the upcoming release of this product.
&lt;/p&gt;
&lt;p&gt;
Randy maintains a great deal of information on VSTS at &lt;a href="http://www.teamsystemcafe.net/" target=_blank&gt;TeamSystemCafe.net&lt;/a&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;object id=viddler_797f0a6b classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=348&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="9207"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/simple/797f0a6b/"&gt;
&lt;param name="Src" value="http://www.viddler.com/simple/797f0a6b/"&gt;
&lt;param name="WMode" value="Window"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value="LT"&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/simple/797f0a6b/" width="437" height="348" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_797f0a6b"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
11 mins, 52 secs
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=47a4edd9-c67a-48e8-97fd-97b32191803d" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,47a4edd9-c67a-48e8-97fd-97b32191803d.aspx</comments>
      <category>Interviews</category>
      <category>Technology and Friends</category>
      <category>VSTS</category>
    </item>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=bad3f4f2-7715-4b58-944a-98dd58a93876</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,bad3f4f2-7715-4b58-944a-98dd58a93876.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,bad3f4f2-7715-4b58-944a-98dd58a93876.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bad3f4f2-7715-4b58-944a-98dd58a93876</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img border="0" src="http://www.davidgiard.com/content/binary/TechnologyAndFriends.gif" />
        </p>
        <p>
          <strong>Episode 16</strong>
        </p>
        <p>
Microsoft Technology Specialist Randy Pagels describes the benefits of Microsoft Visual
Studio Team System.  You can learn more about VSTS from Randy at <a href="http://www.teamsystemcafe.net/" target="_blank">http://www.teamsystemcafe.net/</a><br /></p>
        <object id="viddler_ad511f83" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="311">
          <param name="_cx" value="11562" />
          <param name="_cy" value="8228" />
          <param name="FlashVars" value="" />
          <param name="Movie" value="http://www.viddler.com/simple/ad511f83/" />
          <param name="Src" value="http://www.viddler.com/simple/ad511f83/" />
          <param name="WMode" value="Transparent" />
          <param name="Play" value="-1" />
          <param name="Loop" value="-1" />
          <param name="Quality" value="High" />
          <param name="SAlign" value="LT" />
          <param name="Menu" value="-1" />
          <param name="Base" value="" />
          <param name="AllowScriptAccess" value="always" />
          <param name="Scale" value="ShowAll" />
          <param name="DeviceFont" value="0" />
          <param name="EmbedMovie" value="0" />
          <param name="BGColor" value="" />
          <param name="SWRemote" value="" />
          <param name="MovieData" value="" />
          <param name="SeamlessTabbing" value="1" />
          <param name="Profile" value="0" />
          <param name="ProfileAddress" value="" />
          <param name="ProfilePort" value="0" />
          <param name="AllowNetworking" value="all" />
          <param name="AllowFullScreen" value="true" />
          <embed src="http://www.viddler.com/simple/ad511f83/" width="437" height="311" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_ad511f83" wmode="transparent">
          </embed>
        </object>
        <p>
4 mins, 18 secs
</p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=bad3f4f2-7715-4b58-944a-98dd58a93876" />
      </body>
      <title>Randy Pagels on Visual Studio Team System</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,bad3f4f2-7715-4b58-944a-98dd58a93876.aspx</guid>
      <link>http://www.davidgiard.com/2009/03/26/RandyPagelsOnVisualStudioTeamSystem.aspx</link>
      <pubDate>Thu, 26 Mar 2009 10:32:10 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img border=0 src="http://www.davidgiard.com/content/binary/TechnologyAndFriends.gif"&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Episode 16&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Microsoft Technology Specialist Randy Pagels describes the benefits of Microsoft Visual
Studio Team System.&amp;nbsp; You can learn more about VSTS from Randy at &lt;a href="http://www.teamsystemcafe.net/" target=_blank&gt;http://www.teamsystemcafe.net/&lt;/a&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;object id=viddler_ad511f83 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=437 height=311&gt;
&lt;param name="_cx" value="11562"&gt;
&lt;param name="_cy" value="8228"&gt;
&lt;param name="FlashVars" value=""&gt;
&lt;param name="Movie" value="http://www.viddler.com/simple/ad511f83/"&gt;
&lt;param name="Src" value="http://www.viddler.com/simple/ad511f83/"&gt;
&lt;param name="WMode" value="Transparent"&gt;
&lt;param name="Play" value="-1"&gt;
&lt;param name="Loop" value="-1"&gt;
&lt;param name="Quality" value="High"&gt;
&lt;param name="SAlign" value="LT"&gt;
&lt;param name="Menu" value="-1"&gt;
&lt;param name="Base" value=""&gt;
&lt;param name="AllowScriptAccess" value="always"&gt;
&lt;param name="Scale" value="ShowAll"&gt;
&lt;param name="DeviceFont" value="0"&gt;
&lt;param name="EmbedMovie" value="0"&gt;
&lt;param name="BGColor" value=""&gt;
&lt;param name="SWRemote" value=""&gt;
&lt;param name="MovieData" value=""&gt;
&lt;param name="SeamlessTabbing" value="1"&gt;
&lt;param name="Profile" value="0"&gt;
&lt;param name="ProfileAddress" value=""&gt;
&lt;param name="ProfilePort" value="0"&gt;
&lt;param name="AllowNetworking" value="all"&gt;
&lt;param name="AllowFullScreen" value="true"&gt;
&lt;embed src="http://www.viddler.com/simple/ad511f83/" width="437" height="311" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_ad511f83" wmode="transparent"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;p&gt;
4 mins, 18 secs
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=bad3f4f2-7715-4b58-944a-98dd58a93876" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,bad3f4f2-7715-4b58-944a-98dd58a93876.aspx</comments>
      <category>.Net</category>
      <category>Interviews</category>
      <category>Technology and Friends</category>
      <category>VSTS</category>
    </item>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=6bf5d62c-0d0f-4641-af96-a271631eeac4</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,6bf5d62c-0d0f-4641-af96-a271631eeac4.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,6bf5d62c-0d0f-4641-af96-a271631eeac4.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=6bf5d62c-0d0f-4641-af96-a271631eeac4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Below is a list of my recent series of articles on Visual Studio 2008 Database Edition
(aka “Data Dude”)
</p>
        <p>
          <span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">
            <a href="http://www.davidgiard.com/2008/08/10/TheGoodnessOfDataDude.aspx">The
Goodness of Data Dude </a>
          </span>
        </p>
        <p>
          <span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">
            <a href="http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx">Data
Dude tutorial 1 - Creating a database project </a>
          </span>
        </p>
        <p>
          <span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">
            <a href="http://www.davidgiard.com/2008/08/12/DataDudeTutorial2UsingSchemaCompareToolToUpdateADatabaseProject.aspx">Data
Dude tutorial 2 - Using Schema Compare tool to update a database project </a>
          </span>
        </p>
        <p>
          <span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">
            <a href="http://www.davidgiard.com/2008/08/13/DataDudeTutorial3UsingSchemaCompareToolToDeployDatabaseChanges.aspx">Data
Dude tutorial 3 - Using Schema Compare tool to deploy database changes </a>
          </span>
        </p>
        <p>
          <span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">
            <a href="http://www.davidgiard.com/2008/08/14/DataDudeTutorial4WritingDatabaseUnitTests.aspx">Data
Dude tutorial 4 - Writing Database Unit Tests </a>
          </span>
        </p>
        <p>
          <span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">
            <a href="http://www.davidgiard.com/2008/08/15/DataDudeTutorial5UsingTheDataCompareTool.aspx" temp_href="temp_href">Data
Dude tutorial 5 - Using the Data Compare tool </a>
          </span>
        </p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=6bf5d62c-0d0f-4641-af96-a271631eeac4" />
      </body>
      <title>Dave's Data Dude series</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,6bf5d62c-0d0f-4641-af96-a271631eeac4.aspx</guid>
      <link>http://www.davidgiard.com/2008/08/16/DavesDataDudeSeries.aspx</link>
      <pubDate>Sat, 16 Aug 2008 15:39:15 GMT</pubDate>
      <description>&lt;p&gt;
Below is a list of my recent series of articles on Visual Studio 2008 Database Edition
(aka “Data Dude”)
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"&gt;&lt;a href="http://www.davidgiard.com/2008/08/10/TheGoodnessOfDataDude.aspx"&gt;The
Goodness of Data Dude &lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"&gt;&lt;a href="http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx"&gt;Data
Dude tutorial 1 - Creating a database project &lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"&gt;&lt;a href="http://www.davidgiard.com/2008/08/12/DataDudeTutorial2UsingSchemaCompareToolToUpdateADatabaseProject.aspx"&gt;Data
Dude tutorial 2 - Using Schema Compare tool to update a database project &lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"&gt;&lt;a href="http://www.davidgiard.com/2008/08/13/DataDudeTutorial3UsingSchemaCompareToolToDeployDatabaseChanges.aspx"&gt;Data
Dude tutorial 3 - Using Schema Compare tool to deploy database changes &lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"&gt;&lt;a href="http://www.davidgiard.com/2008/08/14/DataDudeTutorial4WritingDatabaseUnitTests.aspx"&gt;Data
Dude tutorial 4 - Writing Database Unit Tests &lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"&gt;&lt;a href="http://www.davidgiard.com/2008/08/15/DataDudeTutorial5UsingTheDataCompareTool.aspx" temp_href&gt;Data
Dude tutorial 5 - Using the Data Compare tool &lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=6bf5d62c-0d0f-4641-af96-a271631eeac4" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,6bf5d62c-0d0f-4641-af96-a271631eeac4.aspx</comments>
      <category>.Net</category>
      <category>SQL Server</category>
      <category>VSTS</category>
    </item>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=cde1a47b-5f8b-4ecb-ba48-7ffea2524d30</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,cde1a47b-5f8b-4ecb-ba48-7ffea2524d30.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,cde1a47b-5f8b-4ecb-ba48-7ffea2524d30.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=cde1a47b-5f8b-4ecb-ba48-7ffea2524d30</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">Microsoft Visual Studio
Team System 2008 Database Edition (aka “Data Dude”) provides tools for managing and
deploying SQL Server databases.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
        </p>
        <p>
          <font color="#000000" size="3" face="Calibri">In this article, we will discuss how
to migrate data from one database to another.<span style="mso-spacerun: yes">   </span>Data
Dude provides the <i style="mso-bidi-font-style: normal">Data Compare</i> tool for
this purpose.</font>
        </p>
        <p>
          <font color="#000000" size="3" face="Calibri">In order to use the Data Compare tool,
the following conditions must be true</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">1.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Data
exists in a source table.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">You
want to migrate that data to a table of the same name in a different database.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">2.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Both
tables must have the same structure.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpLast">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">3.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Both
tables must have a primary key to uniquely identify rows.</font>
          </font>
        </p>
        <p>
          <font color="#000000" size="3" face="Calibri">Follow the steps below to migrate data
with the Data Compare tool.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class="MsoListParagraphCxSpFirst">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">1.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Launch
Visual Studio 2008</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">2.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">Select <b style="mso-bidi-font-weight: normal">Data
| Data Compare | New Data Compare</b>.<span style="mso-spacerun: yes">  </span>The <b style="mso-bidi-font-weight: normal">New
Data Comparison</b></font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri"> dialog
displays<br /><a href="http://www.davidgiard.com/content/binary/DD04_Fig1.jpg" target="_pix"><img border="0" src="http://www.davidgiard.com/content/binary/DD04_Fig1.jpg" width="528" height="451" /></a><br /><span style="mso-spacerun: yes">  </span><b style="mso-bidi-font-weight: normal">Figure
1</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">a.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">When
migrating data from a table in one database to another, the database you intend to
update is known as the “Target Database”.<span style="mso-spacerun: yes">  </span>The
other database is known as the “Source Database”.<span style="mso-spacerun: yes">  </span>In
the <b style="mso-bidi-font-weight: normal">New Data Comparison</b> dialog, select
the Source Database and Target Database connections.<span style="mso-spacerun: yes">  </span>If
you have not created a Visual Studio connection to these databases in Visual Studio,
you can click the <b style="mso-bidi-font-weight: normal">New Connection</b></font>
              <font size="3"> button
to create them.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">b.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The <b style="mso-bidi-font-weight: normal">New
Data Comparison</b> dialog contains checkboxes that allow you to specify which rows
you want to see and compare.<span style="mso-spacerun: yes">  </span>I don’t
usually change these (they are all checked by default) but it may speed up the process
to clear the <b style="mso-bidi-font-weight: normal">Identical Records</b></font>
              <font size="3"> checkbox.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">c.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">Click
the <b style="mso-bidi-font-weight: normal">Next</b></font>
            </font>
          </font>
          <font color="#000000" size="3" face="Calibri"> button
to advance to the second screen of the wizard.<br /><a href="http://www.davidgiard.com/content/binary/DD04_Fig2.jpg" target="_pix"><img border="0" src="http://www.davidgiard.com/content/binary/DD04_Fig2.jpg" width="566" height="464" /></a><br /><span style="mso-spacerun: yes">    </span><b style="mso-bidi-font-weight: normal">Figure
2</b><br />
On this screen, you can choose which tables to compare.<span style="mso-spacerun: yes">  </span>Usually
I am only interested in one or two tables, so I clear the rest of the checkboxes.<span style="mso-spacerun: yes">  </span>If
I have a million rows in my customer table and I’m not interested in migrating any
of those rows, I can save a lot of processing time by un-checking the customer table.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">d.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Click
the <b style="mso-bidi-font-weight: normal">Finish</b> button to display the <b style="mso-bidi-font-weight: normal">Data
Compare</b></font>
              <font size="3"> window.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">3.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">The <b style="mso-bidi-font-weight: normal">Data
Compare</b> window consists of two panes: the <i style="mso-bidi-font-style: normal">Object
List</i> on top and the <i style="mso-bidi-font-style: normal">Record Details</i></font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri"> at
the bottom.<br /><a href="http://www.davidgiard.com/content/binary/DD04_Fig3.jpg" target="_pix"><img style="WIDTH: 667px; HEIGHT: 316px" border="0" src="http://www.davidgiard.com/content/binary/DD04_Fig3.jpg" width="959" height="633" /></a><br /><span style="mso-spacerun: yes">    </span><b style="mso-bidi-font-weight: normal">Figure
3</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">a.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The
object list displays each table or view as a single row with columns summarizing the
number of new, removed, changed and identical rows.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Rows
are matched on their primary key.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">b.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Click
a row in the object list to display details in the record details pane.<span style="mso-spacerun: yes">  </span>Here
you can click a tab to view the rows that are new, missing or changed.<span style="mso-spacerun: yes">  </span>Checking
the checkbox next to a record flags it to the Data Compare tool, meaning you want
to update the target database to match the same row in the source database.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">This
may result in an INSERT, UPDATE, or DELETE statement depending on the tab on which
the record is listed.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">c.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">For
a record to be flagged for update, both the table and the record must be checked.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">4.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">After
checking all the rows you wish to update, click the <b style="mso-bidi-font-weight: normal">Write
Updates</b></font>
              <font size="3"> toolbar button to commit your changes to the target
database.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">5.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Alternatively,
you can click the <b style="mso-bidi-font-weight: normal">Export To Editor</b> toolbar
button to generate a SQL script that you can run in the SQL Server query editor.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">This
method requires an extra step but has the following advantages</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">a.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">You
can modify the script before running it.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">b.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font size="3" face="Calibri">You
can send the script to someone else to run.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class="MsoListParagraphCxSpLast">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">c.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">You
can view the script to learn what Data Dude is doing.<span style="mso-spacerun: yes">  </span>It’s
interesting to note that constraints on each table are dropped before copying data,
then created after the data is copied.<span style="mso-spacerun: yes">  </span>This
speeds up the process.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Also,
note the use of transactions to prevent incomplete data copies.  Below is a sample
script updating data in one table.<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: black; FONT-SIZE: 11px"><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: teal; FONT-SIZE: 11px">/*<br />
This script was created by Visual Studio on 8/15/2008 at 8:57 AM.<br />
Run this script on dgiard.Test_QA.dbo to make it the same as dgiard.Test_Dev.dbo.<br />
This script performs its actions in the following order:<br />
1. Disable foreign-key constraints.<br />
2. Perform DELETE commands. 
<br />
3. Perform UPDATE commands.<br />
4. Perform INSERT commands.<br />
5. Re-enable foreign-key constraints.<br />
Please back up your target database before running this script.<br />
*/</span><br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">SET</span> NUMERIC_ROUNDABORT <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">OFF</span><br />
GO<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">SET</span> XACT_ABORT,
ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">QUOTED_IDENTIFIER</span>, <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ANSI_NULLS</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ON</span><br />
GO<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: teal; FONT-SIZE: 11px">/*Pointer
used for text / image updates. This might not be needed, but is declared here just
in case*/</span><br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">DECLARE</span> @pv <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">binary</span>(16)<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">BEGIN</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">TRANSACTION</span><br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ALTER</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">TABLE</span> [dbo].[OrderDetails] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">DROP</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">CONSTRAINT</span> [FK_OrderDetails_Orders]<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ALTER</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">TABLE</span> [dbo].[OrderDetails] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">DROP</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">CONSTRAINT</span> [FK_OrderDetails_Products]<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ALTER</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">TABLE</span> [dbo].[Orders] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">DROP</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">CONSTRAINT</span> [FK_Orders_Customers]<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">DELETE</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">FROM</span> [dbo].[ProductTypes] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">WHERE</span> [ProductTypeID]=N<span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">'5646953f-7b89-4862-bcf3-bf53450d28bb'</span><br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">INSERT</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">INTO</span> [dbo].[ProductTypes]
([ProductTypeID], [ProductTypeName]) <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">VALUES</span> (N<span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">'7beb0d99-d034-41b9-bbf7-f9cdcdbedc30'</span>,
N<span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">'Furniture'</span>)<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">INSERT</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">INTO</span> [dbo].[ProductTypes]
([ProductTypeID], [ProductTypeName]) <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">VALUES</span> (N<span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">'abc19a14-5968-4c5f-9f0f-4debc034cb90'</span>,
N<span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">'Hardware'</span>)<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">INSERT</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">INTO</span> [dbo].[ProductTypes]
([ProductTypeID], [ProductTypeName]) <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">VALUES</span> (N<span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">'b9e446ed-eeb1-4334-b191-c70a55ef1a05'</span>,
N<span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">'Books'</span>)<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ALTER</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">TABLE</span> [dbo].[OrderDetails] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ADD</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">CONSTRAINT</span> [FK_OrderDetails_Orders] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">FOREIGN</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">KEY</span> ([OrderID]) <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">REFERENCES</span> [dbo].[Orders]
([OrderID])<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ALTER</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">TABLE</span> [dbo].[OrderDetails] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ADD</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">CONSTRAINT</span> [FK_OrderDetails_Products] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">FOREIGN</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">KEY</span> ([ProductID]) <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">REFERENCES</span> [dbo].[Products]
([ProductID])<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ALTER</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">TABLE</span> [dbo].[Orders] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ADD</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">CONSTRAINT</span> [FK_Orders_Customers] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">FOREIGN</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">KEY</span> ([CustomerID]) <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">REFERENCES</span> [dbo].[Customers]
([CustID])<br /><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">COMMIT</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">TRANSACTION</span><br /></span></font>
            </font>
          </font>
        </p>
        <p>
          <font color="#000000" size="3" face="Calibri">The <i style="mso-bidi-font-style: normal">Data
Compare</i> tool is a simple tool for accomplishing a useful task.<span style="mso-spacerun: yes">  </span>Since
I discovered it, it has saved me a lot of time setting up new data environments.</font>
        </p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=cde1a47b-5f8b-4ecb-ba48-7ffea2524d30" />
      </body>
      <title>Data Dude tutorial 5 - Using the Data Compare tool</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,cde1a47b-5f8b-4ecb-ba48-7ffea2524d30.aspx</guid>
      <link>http://www.davidgiard.com/2008/08/15/DataDudeTutorial5UsingTheDataCompareTool.aspx</link>
      <pubDate>Fri, 15 Aug 2008 13:02:53 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;Microsoft Visual Studio Team System
2008 Database Edition (aka “Data Dude”) provides tools for managing and deploying
SQL Server databases.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In this article, we will discuss how to migrate
data from one database to another.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Data
Dude provides the &lt;i style="mso-bidi-font-style: normal"&gt;Data Compare&lt;/i&gt; tool for
this purpose.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In order to use the Data Compare tool, the
following conditions must be true&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;1.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Data
exists in a source table.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;You
want to migrate that data to a table of the same name in a different database.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;2.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Both
tables must have the same structure.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;3.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Both
tables must have a primary key to uniquely identify rows.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;Follow the steps below to migrate data with
the Data Compare tool.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class=MsoListParagraphCxSpFirst&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;1.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Launch
Visual Studio 2008&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;2.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Select &lt;b style="mso-bidi-font-weight: normal"&gt;Data
| Data Compare | New Data Compare&lt;/b&gt;.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;New
Data Comparison&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt; dialog
displays&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD04_Fig1.jpg" target=_pix&gt;&lt;img border=0 src="http://www.davidgiard.com/content/binary/DD04_Fig1.jpg" width=528 height=451&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
1&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;a.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;When
migrating data from a table in one database to another, the database you intend to
update is known as the “Target Database”.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The
other database is known as the “Source Database”.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;In
the &lt;b style="mso-bidi-font-weight: normal"&gt;New Data Comparison&lt;/b&gt; dialog, select
the Source Database and Target Database connections.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If
you have not created a Visual Studio connection to these databases in Visual Studio,
you can click the &lt;b style="mso-bidi-font-weight: normal"&gt;New Connection&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt; button
to create them.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;b.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;New
Data Comparison&lt;/b&gt; dialog contains checkboxes that allow you to specify which rows
you want to see and compare.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I don’t
usually change these (they are all checked by default) but it may speed up the process
to clear the &lt;b style="mso-bidi-font-weight: normal"&gt;Identical Records&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt; checkbox.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;c.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Click
the &lt;b style="mso-bidi-font-weight: normal"&gt;Next&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=3 face=Calibri&gt; button
to advance to the second screen of the wizard.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD04_Fig2.jpg" target=_pix&gt;&lt;img border=0 src="http://www.davidgiard.com/content/binary/DD04_Fig2.jpg" width=566 height=464&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
2&lt;/b&gt;
&lt;br&gt;
On this screen, you can choose which tables to compare.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Usually
I am only interested in one or two tables, so I clear the rest of the checkboxes.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If
I have a million rows in my customer table and I’m not interested in migrating any
of those rows, I can save a lot of processing time by un-checking the customer table.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;d.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Click
the &lt;b style="mso-bidi-font-weight: normal"&gt;Finish&lt;/b&gt; button to display the &lt;b style="mso-bidi-font-weight: normal"&gt;Data
Compare&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt; window.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;3.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;Data
Compare&lt;/b&gt; window consists of two panes: the &lt;i style="mso-bidi-font-style: normal"&gt;Object
List&lt;/i&gt; on top and the &lt;i style="mso-bidi-font-style: normal"&gt;Record Details&lt;/i&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt; at
the bottom.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD04_Fig3.jpg" target=_pix&gt;&lt;img style="WIDTH: 667px; HEIGHT: 316px" border=0 src="http://www.davidgiard.com/content/binary/DD04_Fig3.jpg" width=959 height=633&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
3&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;a.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The
object list displays each table or view as a single row with columns summarizing the
number of new, removed, changed and identical rows.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Rows
are matched on their primary key.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;b.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Click
a row in the object list to display details in the record details pane.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Here
you can click a tab to view the rows that are new, missing or changed.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Checking
the checkbox next to a record flags it to the Data Compare tool, meaning you want
to update the target database to match the same row in the source database.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;This
may result in an INSERT, UPDATE, or DELETE statement depending on the tab on which
the record is listed.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;c.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;For
a record to be flagged for update, both the table and the record must be checked.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;4.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;After
checking all the rows you wish to update, click the &lt;b style="mso-bidi-font-weight: normal"&gt;Write
Updates&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt; toolbar button to commit your changes to the target
database.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;5.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Alternatively,
you can click the &lt;b style="mso-bidi-font-weight: normal"&gt;Export To Editor&lt;/b&gt; toolbar
button to generate a SQL script that you can run in the SQL Server query editor.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;This
method requires an extra step but has the following advantages&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;a.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;You
can modify the script before running it.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;b.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;You
can send the script to someone else to run.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 1in; mso-list: l1 level2 lfo2; mso-add-space: auto" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;c.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;You
can view the script to learn what Data Dude is doing.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;It’s
interesting to note that constraints on each table are dropped before copying data,
then created after the data is copied.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
speeds up the process.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Also,
note the use of transactions to prevent incomplete data copies.&amp;nbsp; Below is a sample
script updating data in one table.&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: black; FONT-SIZE: 11px"&gt;&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: teal; FONT-SIZE: 11px"&gt;/*&lt;br&gt;
This script was created by Visual Studio on 8/15/2008 at 8:57 AM.&lt;br&gt;
Run this script on dgiard.Test_QA.dbo to make it the same as dgiard.Test_Dev.dbo.&lt;br&gt;
This script performs its actions in the following order:&lt;br&gt;
1. Disable foreign-key constraints.&lt;br&gt;
2. Perform DELETE commands. 
&lt;br&gt;
3. Perform UPDATE commands.&lt;br&gt;
4. Perform INSERT commands.&lt;br&gt;
5. Re-enable foreign-key constraints.&lt;br&gt;
Please back up your target database before running this script.&lt;br&gt;
*/&lt;/span&gt;
&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;SET&lt;/span&gt; NUMERIC_ROUNDABORT &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;OFF&lt;/span&gt;
&lt;br&gt;
GO&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;SET&lt;/span&gt; XACT_ABORT,
ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;QUOTED_IDENTIFIER&lt;/span&gt;, &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ANSI_NULLS&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ON&lt;/span&gt;
&lt;br&gt;
GO&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: teal; FONT-SIZE: 11px"&gt;/*Pointer
used for text / image updates. This might not be needed, but is declared here just
in case*/&lt;/span&gt;
&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;DECLARE&lt;/span&gt; @pv &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;binary&lt;/span&gt;(16)&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;BEGIN&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;TRANSACTION&lt;/span&gt;
&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ALTER&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;TABLE&lt;/span&gt; [dbo].[OrderDetails] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;DROP&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;CONSTRAINT&lt;/span&gt; [FK_OrderDetails_Orders]&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ALTER&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;TABLE&lt;/span&gt; [dbo].[OrderDetails] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;DROP&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;CONSTRAINT&lt;/span&gt; [FK_OrderDetails_Products]&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ALTER&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;TABLE&lt;/span&gt; [dbo].[Orders] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;DROP&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;CONSTRAINT&lt;/span&gt; [FK_Orders_Customers]&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;DELETE&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;FROM&lt;/span&gt; [dbo].[ProductTypes] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;WHERE&lt;/span&gt; [ProductTypeID]=N&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;'5646953f-7b89-4862-bcf3-bf53450d28bb'&lt;/span&gt;
&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;INSERT&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;INTO&lt;/span&gt; [dbo].[ProductTypes]
([ProductTypeID], [ProductTypeName]) &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;VALUES&lt;/span&gt; (N&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;'7beb0d99-d034-41b9-bbf7-f9cdcdbedc30'&lt;/span&gt;,
N&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;'Furniture'&lt;/span&gt;)&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;INSERT&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;INTO&lt;/span&gt; [dbo].[ProductTypes]
([ProductTypeID], [ProductTypeName]) &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;VALUES&lt;/span&gt; (N&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;'abc19a14-5968-4c5f-9f0f-4debc034cb90'&lt;/span&gt;,
N&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;'Hardware'&lt;/span&gt;)&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;INSERT&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;INTO&lt;/span&gt; [dbo].[ProductTypes]
([ProductTypeID], [ProductTypeName]) &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;VALUES&lt;/span&gt; (N&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;'b9e446ed-eeb1-4334-b191-c70a55ef1a05'&lt;/span&gt;,
N&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;'Books'&lt;/span&gt;)&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ALTER&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;TABLE&lt;/span&gt; [dbo].[OrderDetails] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ADD&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;CONSTRAINT&lt;/span&gt; [FK_OrderDetails_Orders] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;FOREIGN&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;KEY&lt;/span&gt; ([OrderID]) &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;REFERENCES&lt;/span&gt; [dbo].[Orders]
([OrderID])&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ALTER&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;TABLE&lt;/span&gt; [dbo].[OrderDetails] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ADD&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;CONSTRAINT&lt;/span&gt; [FK_OrderDetails_Products] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;FOREIGN&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;KEY&lt;/span&gt; ([ProductID]) &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;REFERENCES&lt;/span&gt; [dbo].[Products]
([ProductID])&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ALTER&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;TABLE&lt;/span&gt; [dbo].[Orders] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ADD&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;CONSTRAINT&lt;/span&gt; [FK_Orders_Customers] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;FOREIGN&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;KEY&lt;/span&gt; ([CustomerID]) &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;REFERENCES&lt;/span&gt; [dbo].[Customers]
([CustID])&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;COMMIT&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;TRANSACTION&lt;/span&gt;
&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
&gt;&gt;&gt; 
&lt;p&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;The &lt;i style="mso-bidi-font-style: normal"&gt;Data
Compare&lt;/i&gt; tool is a simple tool for accomplishing a useful task.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Since
I discovered it, it has saved me a lot of time setting up new data environments.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=cde1a47b-5f8b-4ecb-ba48-7ffea2524d30" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,cde1a47b-5f8b-4ecb-ba48-7ffea2524d30.aspx</comments>
      <category>.Net</category>
      <category>SQL Server</category>
      <category>VSTS</category>
    </item>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=8672e98b-0e16-45ba-b7d5-59ab9dd0a1cf</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,8672e98b-0e16-45ba-b7d5-59ab9dd0a1cf.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,8672e98b-0e16-45ba-b7d5-59ab9dd0a1cf.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8672e98b-0e16-45ba-b7d5-59ab9dd0a1cf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font color="#000000" size="3" face="Calibri">Writing Unit Tests is an essential step
in developing robust, maintainable code.<span style="mso-spacerun: yes">  </span>Unit
Tests increase quality and mitigate the risk of future code changes.<span style="mso-spacerun: yes">  </span>However,
relatively few developers take the time to write unit tests for their stored procedures. <span style="mso-spacerun: yes"> </span>The
primary reason for this is that few tools exist to test stored procedures.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">Microsoft Visual Studio Team System
2008 Database Edition (aka “Data Dude”) provides tools to help developers write unit
tests against SQL Server stored procedures.<span style="mso-spacerun: yes">  </span>The
tool integrates with MSTest, wich is a testing framework many developers are already
using for their other unit tests.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">In order to write unit tests for your
stored procedures, those stored procedures must be in a database project.<span style="mso-spacerun: yes">  </span>For
information on how to create a database project from a SQL Server database see: </font>
          <a href="http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx">
            <font color="#0000ff" size="3" face="Calibri">http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx</font>
          </a>
          <font color="#000000" size="3" face="Calibri">
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">This document describes how to create
a database unit test.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">1.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Launch
Visual Studio and open your Database Project. </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">2.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Open
the Schema View.<span style="mso-spacerun: yes">  </span>Select <b style="mso-bidi-font-weight: normal">View
| Schema View</b></font>
              <font size="3">.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">3.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">Right-click
a stored procedure and select <b style="mso-bidi-font-weight: normal">Create Unit
Test</b> from the context menu.<span style="mso-spacerun: yes">  </span>The <b style="mso-bidi-font-weight: normal">Create
Unit Tests</b></font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri"> dialog
displays.<br /><a href="http://www.davidgiard.com/content/binary/DD03_Fig1.jpg" target="_pix"><img style="WIDTH: 544px; HEIGHT: 418px" border="0" src="http://www.davidgiard.com/content/binary/DD03_Fig1.jpg" width="772" height="290" /></a><br /><span style="mso-spacerun: yes">    </span><b style="mso-bidi-font-weight: normal">Figure
1</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">4.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">Check
the checkboxes next to all the stored procedures for which you wish to create unit
tests.<span style="mso-spacerun: yes">  </span>Select the .Net language (Visual
Basic .Net or C#) in which you want the automatic code to be generated.<span style="mso-spacerun: yes">  </span>You
won’t be modifying this code so it isn’t that important, but I tend to keep all my
code in the same language, so you may as well choose your favorite language here.<span style="mso-spacerun: yes">  </span>Enter
a meaningful name for the Unit Test Project and class.<span style="mso-spacerun: yes">  </span>I
like to name my Unit Test projects the same as my database project, followed by “Tests”
or “UnitTests”.<span style="mso-spacerun: yes">  </span>If this is a new Database
Unit Test Project, the <b style="mso-bidi-font-weight: normal">Database Unit Test
Configuration</b></font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri"> dialog
displays.<br /><a href="http://www.davidgiard.com/content/binary/DD03_Fig2.jpg" target="_pix"><img style="WIDTH: 652px; HEIGHT: 459px" border="0" src="http://www.davidgiard.com/content/binary/DD03_Fig2.jpg" width="772" height="290" /></a><br /><span style="mso-spacerun: yes">    </span><b style="mso-bidi-font-weight: normal">Figure
2</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">5.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The <b style="mso-bidi-font-weight: normal">Database
Unit Test Configuration</b> dialog allows you to specify what you want to occur when
you run these unit tests.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">The
dialog is organized into the following sections.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">a.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Database
connections</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class="MsoListParagraphCxSpMiddle">
          <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
            <span style="mso-list: Ignore">
              <font color="#000000">
                <span style="FONT: 7pt 'Times New Roman'">                                                               </span>
                <font size="3" face="Calibri">i.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </font>
            </span>
          </span>
          <font color="#000000" size="3" face="Calibri">Execute
unit tests using the following data connection<br />
This is the database against which tests will run.<span style="mso-spacerun: yes">  </span>Typically
I set this to my Development or QA database.</font>
        </p>
        <p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class="MsoListParagraphCxSpMiddle">
          <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
            <span style="mso-list: Ignore">
              <font color="#000000">
                <span style="FONT: 7pt 'Times New Roman'">                                                             </span>
                <font size="3" face="Calibri">ii.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </font>
            </span>
          </span>
          <font color="#000000" size="3" face="Calibri">Use
a secondary data connection to validate unit tests<br />
You may specify a different database to validate the syntax of your unit tests and
test that all the objects you refer to exist.<span style="mso-spacerun: yes">  </span>I
can only think this might be good if you are writing tests while disconnected from
your testing database, but I never set this option.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">b.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font size="3" face="Calibri">Deployment</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class="MsoListParagraphCxSpMiddle">
          <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
            <span style="mso-list: Ignore">
              <font color="#000000">
                <span style="FONT: 7pt 'Times New Roman'">                                                               </span>
                <font size="3" face="Calibri">i.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </font>
            </span>
          </span>
          <font color="#000000" size="3" face="Calibri">Automatically
deploy the database project before unit tests are run<br />
To save manual steps, you may wish to check this box and deploy the database project
to the database each time you run your unit tests.<span style="mso-spacerun: yes">  </span>This
slows down the testing step so I do not select this option.<span style="mso-spacerun: yes">  </span>I
prefer to deploy my changes once; then run my unit tests – sometimes several times.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">c.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Database
state</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class="MsoListParagraphCxSpMiddle">
          <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
            <span style="mso-list: Ignore">
              <font color="#000000">
                <span style="FONT: 7pt 'Times New Roman'">                                                               </span>
                <font size="3" face="Calibri">i.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </font>
            </span>
          </span>
          <font color="#000000" size="3" face="Calibri">Generate
Test data before Unit tests are run<br />
It is often useful to populate your database with some test data prior to your test
run.<span style="mso-spacerun: yes">  </span>Use this button to do this.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">6.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">After
creating your unit tests, you need to modify each one and specify what you are testing.<span style="mso-spacerun: yes">  </span>Open
the Solution Explorer (<b style="mso-bidi-font-weight: normal">View | Solution Explorer</b></font>
              <font size="3">).</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">7.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Double-click
the unit test class to open it in the unit test designer.</font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-spacerun: yes">  </span>
                <br />
                <br />
                <span style="mso-spacerun: yes">    </span>
                <b style="mso-bidi-font-weight: normal">Figure
2</b>
              </font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">8.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The
Unit Test Designer contains some controls and two panes as described below.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">a.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">A
class can contain multiple tests.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">The
first control is a dropdown that allows you to select which test you are designing.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">b.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">To
the right of the Test Name dropdown is another dropdown that allows you to specify
what part of the test you are writing.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">You
can choose between the test itself, the “Pre-test” (which runs before the test is
executed) and the “Post-test” (which runs after the test has completed – successfully
or unsuccessfully).<br /><a href="http://www.davidgiard.com/content/binary/DD03_Fig3.jpg" target="_pix"><img border="0" src="http://www.davidgiard.com/content/binary/DD03_Fig3.jpg" /></a><br /><span style="mso-spacerun: yes">   </span><b style="mso-bidi-font-weight: normal">Figure
3</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">c.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Further
to the right are three buttons that allow you to add a new test or to delete or rename
the currently active test.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">d.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Below
the controls is the test editor.<span style="mso-spacerun: yes">  </span>This
is where you will write your test.<span style="mso-spacerun: yes">  </span>You
will write your test in T-SQL and Data Dude provides some stub code to get you started.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Write
SQL statements that call your stored procedure and return one or more results.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">e.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Below
the test editor is the Test Conditions pane.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">It
is here that you enter your assertions.</font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-spacerun: yes">  </span>
                <br />
                <a href="http://www.davidgiard.com/content/binary/DD03_Fig4.jpg" target="_pix">
                  <img border="0" src="http://www.davidgiard.com/content/binary/DD03_Fig4.jpg" />
                </a>
                <br />
                <span style="mso-spacerun: yes">    </span>
                <b style="mso-bidi-font-weight: normal">Figure
4</b>
              </font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <span style="FONT: 7pt 'Times New Roman'">                                                               </span>
                <font size="3" face="Calibri">i.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">You
can test for a given result set having 0 rows, 1 or more rows, or an exact number
of rows.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <span style="FONT: 7pt 'Times New Roman'">                                                             </span>
                <font size="3" face="Calibri">ii.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">You
can also test if a specific column and row in a given result set evaluates to a given
value.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <span style="FONT: 7pt 'Times New Roman'">                                                            </span>
                <font size="3" face="Calibri">iii.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Click
the “+” button to add new assertions.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Highlight
an existing assertion row and edit the row or click the “x” button to remove the assertion.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <span style="FONT: 7pt 'Times New Roman'">                                                           </span>
                <font size="3" face="Calibri">iv.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Use
the properties window to modify properties of the assertion.<span style="mso-spacerun: yes">  </span>Many
assertions are based on a given resultset.<span style="mso-spacerun: yes">  </span>When
I first started writing unit tests, I found it difficult to determine which resultset
was which.<span style="mso-spacerun: yes">  </span>Basically, any line in your
SQL script that begins with the word “SELECT” creates a resultset.<span style="mso-spacerun: yes">  </span>Each
resultset is numbered, beginning with 1, in the order it is created in your script.<span style="mso-spacerun: yes">  </span>I
sometimes find it useful to copy the SQL code and paste it into SQL Management Studio
query window and run it.<span style="mso-spacerun: yes">  </span>Each resultset
then appears in a separate grid in the Results pane.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Looking
at these grids allows me to more easily see a sample result set and in what order
they are created.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpLast">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">f.</font>
                <span style="FONT: 7pt 'Times New Roman'">        </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">You
run your database unit tests the same ways you run any MS Test unit test.<span style="mso-spacerun: yes">  </span>One
way to run the tests is to open the Test List Editor (Test | Windows | Test List Window),
check the tests you want to run, and click the <b style="mso-bidi-font-weight: normal">Run
Checked Test</b> toolbar button.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Tests
in which all assertions prove true are passed; all others are failed.</font>
            </font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">Using Data Dude, you can extend your
unit tests to cover your database objects and, therefore, improve the overall quality
and maintainability of your code.</font>
        </p>
        <p>
        </p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=8672e98b-0e16-45ba-b7d5-59ab9dd0a1cf" />
      </body>
      <title>Data Dude tutorial 4 - Writing Database Unit Tests</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,8672e98b-0e16-45ba-b7d5-59ab9dd0a1cf.aspx</guid>
      <link>http://www.davidgiard.com/2008/08/14/DataDudeTutorial4WritingDatabaseUnitTests.aspx</link>
      <pubDate>Thu, 14 Aug 2008 13:56:47 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;Writing Unit Tests is an essential step in
developing robust, maintainable code.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Unit
Tests increase quality and mitigate the risk of future code changes.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;However,
relatively few developers take the time to write unit tests for their stored procedures. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;The
primary reason for this is that few tools exist to test stored procedures.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;Microsoft Visual Studio Team System 2008 Database
Edition (aka “Data Dude”) provides tools to help developers write unit tests against
SQL Server stored procedures.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The tool
integrates with MSTest, wich is a testing framework many developers are already using
for their other unit tests.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In order to write unit tests for your stored
procedures, those stored procedures must be in a database project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;For
information on how to create a database project from a SQL Server database see: &lt;/font&gt;&lt;a href="http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx"&gt;&lt;font color=#0000ff size=3 face=Calibri&gt;http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx&lt;/font&gt;&lt;/a&gt;&lt;font color=#000000 size=3 face=Calibri&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;This document describes how to create a database
unit test.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;1.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Launch
Visual Studio and open your Database Project. &lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;2.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Open
the Schema View.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Select &lt;b style="mso-bidi-font-weight: normal"&gt;View
| Schema View&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;3.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Right-click
a stored procedure and select &lt;b style="mso-bidi-font-weight: normal"&gt;Create Unit
Test&lt;/b&gt; from the context menu.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;Create
Unit Tests&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt; dialog
displays.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD03_Fig1.jpg" target=_pix&gt;&lt;img style="WIDTH: 544px; HEIGHT: 418px" border=0 src="http://www.davidgiard.com/content/binary/DD03_Fig1.jpg" width=772 height=290&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
1&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;4.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Check
the checkboxes next to all the stored procedures for which you wish to create unit
tests.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Select the .Net language (Visual
Basic .Net or C#) in which you want the automatic code to be generated.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;You
won’t be modifying this code so it isn’t that important, but I tend to keep all my
code in the same language, so you may as well choose your favorite language here.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Enter
a meaningful name for the Unit Test Project and class.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I
like to name my Unit Test projects the same as my database project, followed by “Tests”
or “UnitTests”.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If this is a new Database
Unit Test Project, the &lt;b style="mso-bidi-font-weight: normal"&gt;Database Unit Test
Configuration&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt; dialog
displays.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD03_Fig2.jpg" target=_pix&gt;&lt;img style="WIDTH: 652px; HEIGHT: 459px" border=0 src="http://www.davidgiard.com/content/binary/DD03_Fig2.jpg" width=772 height=290&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
2&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;5.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;Database
Unit Test Configuration&lt;/b&gt; dialog allows you to specify what you want to occur when
you run these unit tests.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;The
dialog is organized into the following sections.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;a.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Database
connections&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class=MsoListParagraphCxSpMiddle&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font color=#000000&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font size=3 face=Calibri&gt;i.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font color=#000000 size=3 face=Calibri&gt;Execute
unit tests using the following data connection&lt;br&gt;
This is the database against which tests will run.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Typically
I set this to my Development or QA database.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class=MsoListParagraphCxSpMiddle&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font color=#000000&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font size=3 face=Calibri&gt;ii.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font color=#000000 size=3 face=Calibri&gt;Use
a secondary data connection to validate unit tests&lt;br&gt;
You may specify a different database to validate the syntax of your unit tests and
test that all the objects you refer to exist.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I
can only think this might be good if you are writing tests while disconnected from
your testing database, but I never set this option.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;b.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Deployment&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class=MsoListParagraphCxSpMiddle&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font color=#000000&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font size=3 face=Calibri&gt;i.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font color=#000000 size=3 face=Calibri&gt;Automatically
deploy the database project before unit tests are run&lt;br&gt;
To save manual steps, you may wish to check this box and deploy the database project
to the database each time you run your unit tests.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
slows down the testing step so I do not select this option.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I
prefer to deploy my changes once; then run my unit tests – sometimes several times.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;c.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Database
state&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class=MsoListParagraphCxSpMiddle&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font color=#000000&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font size=3 face=Calibri&gt;i.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font color=#000000 size=3 face=Calibri&gt;Generate
Test data before Unit tests are run&lt;br&gt;
It is often useful to populate your database with some test data prior to your test
run.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Use this button to do this.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;6.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;After
creating your unit tests, you need to modify each one and specify what you are testing.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Open
the Solution Explorer (&lt;b style="mso-bidi-font-weight: normal"&gt;View | Solution Explorer&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt;).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;7.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Double-click
the unit test class to open it in the unit test designer.&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;
&lt;br&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
2&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;8.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The
Unit Test Designer contains some controls and two panes as described below.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;a.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;A
class can contain multiple tests.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;The
first control is a dropdown that allows you to select which test you are designing.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;b.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;To
the right of the Test Name dropdown is another dropdown that allows you to specify
what part of the test you are writing.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;You
can choose between the test itself, the “Pre-test” (which runs before the test is
executed) and the “Post-test” (which runs after the test has completed – successfully
or unsuccessfully).&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD03_Fig3.jpg" target=_pix&gt;&lt;img border=0 src="http://www.davidgiard.com/content/binary/DD03_Fig3.jpg"&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
3&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;c.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Further
to the right are three buttons that allow you to add a new test or to delete or rename
the currently active test.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;d.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Below
the controls is the test editor.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
is where you will write your test.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;You
will write your test in T-SQL and Data Dude provides some stub code to get you started.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Write
SQL statements that call your stored procedure and return one or more results.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;e.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Below
the test editor is the Test Conditions pane.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;It
is here that you enter your assertions.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;
&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD03_Fig4.jpg" target=_pix&gt;&lt;img border=0 src="http://www.davidgiard.com/content/binary/DD03_Fig4.jpg"&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
4&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font size=3 face=Calibri&gt;i.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;You
can test for a given result set having 0 rows, 1 or more rows, or an exact number
of rows.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font size=3 face=Calibri&gt;ii.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;You
can also test if a specific column and row in a given result set evaluates to a given
value.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font size=3 face=Calibri&gt;iii.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Click
the “+” button to add new assertions.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Highlight
an existing assertion row and edit the row or click the “x” button to remove the assertion.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -1.5in; MARGIN: 0in 0in 0pt 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font size=3 face=Calibri&gt;iv.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Use
the properties window to modify properties of the assertion.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Many
assertions are based on a given resultset.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;When
I first started writing unit tests, I found it difficult to determine which resultset
was which.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Basically, any line in your
SQL script that begins with the word “SELECT” creates a resultset.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Each
resultset is numbered, beginning with 1, in the order it is created in your script.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I
sometimes find it useful to copy the SQL code and paste it into SQL Management Studio
query window and run it.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Each resultset
then appears in a separate grid in the Results pane.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Looking
at these grids allows me to more easily see a sample result set and in what order
they are created.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;f.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;You
run your database unit tests the same ways you run any MS Test unit test.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;One
way to run the tests is to open the Test List Editor (Test | Windows | Test List Window),
check the tests you want to run, and click the &lt;b style="mso-bidi-font-weight: normal"&gt;Run
Checked Test&lt;/b&gt; toolbar button.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Tests
in which all assertions prove true are passed; all others are failed.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;Using Data Dude, you can extend your unit
tests to cover your database objects and, therefore, improve the overall quality and
maintainability of your code.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=8672e98b-0e16-45ba-b7d5-59ab9dd0a1cf" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,8672e98b-0e16-45ba-b7d5-59ab9dd0a1cf.aspx</comments>
      <category>.Net</category>
      <category>SQL Server</category>
      <category>VSTS</category>
    </item>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=e8910d69-6570-4257-b79f-2ffd9e1b4a9e</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,e8910d69-6570-4257-b79f-2ffd9e1b4a9e.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,e8910d69-6570-4257-b79f-2ffd9e1b4a9e.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e8910d69-6570-4257-b79f-2ffd9e1b4a9e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">Microsoft Visual Studio
Team System 2008 Database Edition (aka “Data Dude”) provides tools for managing and
deploying SQL Server databases.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">In our </font>
          <a href="http://www.davidgiard.com/2008/08/12/DataDudeTutorial2UsingSchemaCompareToolToUpdateADatabaseProject.aspx">
            <font color="#0000ff" size="3" face="Calibri">last
tutorial</font>
          </a>
          <font color="#000000" size="3" face="Calibri">, we described how
a database developer would use the Schema Compare tool to update a database project
with changes to a SQL Server database.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">This article describes how
to use the Schema Compare tool to push those changes out to a different SQL Server
database.<span style="mso-spacerun: yes">  </span>There are two scenarios where
you would do this.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">In Scenario 1, a developer
has a local copy of the development database and wishes to get the latest updates
to the database.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">In Scenario 2, a database administrator
(DBA) or build master who is charged with migrating database changes from one environment
to the next.<span style="mso-spacerun: yes">  </span>Just as .Net and web code
gets regularly migrated from a development environment to a QA or Production environment,
database object code must also be migrated, and that migration generally must be kept
in sync with all code that depends on those database objects.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">We start this process by launching Visual
Studio and opening the database project.<span style="mso-spacerun: yes">  </span>If
a source code repository such as TFS is used, we need to get the latest code from
the repository.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">The database to which we wish to write
the changes is known to Data Dude as the “target database”.<span style="mso-spacerun: yes">  </span>We
need to make sure that a connection exists in Visual Studio to the target database.<span style="mso-spacerun: yes">  </span>This
is a one-time step and you can use the Server Explorer (<b style="mso-bidi-font-weight: normal">View
| Server Explorer</b>) to create a connection.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">The following steps describe how to
propagate changes to the database.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">1.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Launch
Visual Studio and open the database project.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Get
the latest source code from your source code repository.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">2.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">From
the Visual Studio menu, select <b style="mso-bidi-font-weight: normal">Data | Schema
Compare | New Schema Compare</b>.<span style="mso-spacerun: yes">  </span>The <b style="mso-bidi-font-weight: normal">New
Schema Compare</b></font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri"> dialog
displays.<br /><a href="http://www.davidgiard.com/content/binary/DD02_Fig1.jpg" target="_pix"><img style="WIDTH: 652px; HEIGHT: 185px" border="0" src="http://www.davidgiard.com/content/binary/DD02_Fig1.jpg" width="772" height="290" /></a><br /><span style="mso-spacerun: yes">    </span><b style="mso-bidi-font-weight: normal">Figure
1</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">3.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Under <b style="mso-bidi-font-weight: normal">Source
Schema</b>, select the <b style="mso-bidi-font-weight: normal">Project </b></font>
              <font size="3">radio
button and select your database project from the dropdown list.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">4.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Under <b style="mso-bidi-font-weight: normal">Target
Schema</b>, select the <b style="mso-bidi-font-weight: normal">Database</b></font>
              <font size="3"> radio
button and select the connection to your database from dropdown list.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">5.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">Click
the <b style="mso-bidi-font-weight: normal">OK</b> button to display the <b style="mso-bidi-font-weight: normal">Schema
Compare</b></font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri"> window.<br /><a href="http://www.davidgiard.com/content/binary/DD02_Fig2.jpg" target="_pix"><img style="WIDTH: 671px; HEIGHT: 583px" border="0" src="http://www.davidgiard.com/content/binary/DD02_Fig2.jpg" width="726" height="677" /></a><br /><span style="mso-spacerun: yes">    </span><b style="mso-bidi-font-weight: normal">Figure
2</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">6.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The <b style="mso-bidi-font-weight: normal">Schema
Compare</b> window lists every object that exists in either the database or the database
project.<span style="mso-spacerun: yes">  </span>The objects are grouped in folders
by object type (Tables, views, stored procedures, etc.)<span style="mso-spacerun: yes">  </span>You
can expand or collapse a folder to view or hide objects of that type.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">The
important column is “Update Action” which describes what will happen if you write
the updates to the target.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">a.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Objects
that exist in the source (the project) but not in the target (the database) were likely
recently added after the last synchronization.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">By
default, the Update Action will be “Create” meaning the object will be created in
the target database.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">b.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font size="3" face="Calibri">Objects
that exist in both the source and the target will have an Update Action of “Update”
if they have been modified in the database since the last synchronization or “Skip”
if they have not.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">c.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Objects
that exist in the destination (the database) but not in the source (the project) were
likely dropped after the last synchronization. By default, the Update Action will
be “Drop” meaning the object will be removed from the database.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">7.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">On
a database with many objects, it is useful to view only the objects that have changed
since the last synchronization.<span style="mso-spacerun: yes">  </span>To do
this, click the <b style="mso-bidi-font-weight: normal">Filter</b> toolbar button
and select <b style="mso-bidi-font-weight: normal">Non Skip Objects</b></font>
              <font size="3">.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  
<br /><a href="http://www.davidgiard.com/content/binary/DD02_Filter.jpg" target="_pix"><img border="0" src="http://www.davidgiard.com/content/binary/DD02_Filter.jpg" /></a><br />
    <strong>Figure 3</strong></font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">8.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">If
you wish, you can modify the Update Action on objects by selecting the dropdown in
the “Update Action” column.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Some
actions are grayed out because Data Dude will not allow you to perform any action
that would violate referential integrity rules.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">9.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">After
you have set the “Update Action” of every object appropriately, you have a couple
options.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">a.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">You
can migrate your changes immediately to the target database by clicking the “Write
Updates” toolbar button.<span style="mso-spacerun: yes">  </span>Click <b style="mso-bidi-font-weight: normal">Yes</b></font>
              <font size="3"> at
the confirmation to write the updates to the database project.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpLast">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">b.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Alternatively,
you can export your changes to a SQL script by clicking the <b style="mso-bidi-font-weight: normal">Export
To Editor</b> toolbar button.<span style="mso-spacerun: yes">  </span>This will
create a single text file containing SQL script that you can run from a query window
of <i style="mso-bidi-font-style: normal">SQL Server Management Studio</i>.<span style="mso-spacerun: yes">  </span>This
is useful if you need to make changes to the script prior to executing.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">I
have used this technique when my database contains views or stored procedures that
refer to remote servers and I want to modify the name of the server before migrating
the object.</font>
            </font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">Alternatively, you can deploy changes
from a database project to a database by “Deploying” the project (select <span class="QuoteChar"><b style="mso-bidi-font-weight: normal"><span style="FONT-STYLE: normal; mso-bidi-font-style: italic">Build
| Deploy Solution</span></b></span>).<span style="mso-spacerun: yes">  </span>This
deploys your changes using the settings found on the <b style="mso-bidi-font-weight: normal">Build</b> tab
of the project properties page.<span style="mso-spacerun: yes">  </span>This
method requires fewer steps, but it is less flexible than the method described above.<span style="mso-spacerun: yes">  </span>In
particular, it does not allow you to select which objects are deployed or export and
modify the script of database changes.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">In the next article, we will discuss
how to use Data Dude to write Unit Tests against SQL Server stored procedures.</font>
        </p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=e8910d69-6570-4257-b79f-2ffd9e1b4a9e" />
      </body>
      <title>Data Dude tutorial 3 - Using Schema Compare tool to deploy database changes</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,e8910d69-6570-4257-b79f-2ffd9e1b4a9e.aspx</guid>
      <link>http://www.davidgiard.com/2008/08/13/DataDudeTutorial3UsingSchemaCompareToolToDeployDatabaseChanges.aspx</link>
      <pubDate>Wed, 13 Aug 2008 11:46:54 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;Microsoft Visual Studio Team System
2008 Database Edition (aka “Data Dude”) provides tools for managing and deploying
SQL Server databases.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In our &lt;/font&gt;&lt;a href="http://www.davidgiard.com/2008/08/12/DataDudeTutorial2UsingSchemaCompareToolToUpdateADatabaseProject.aspx"&gt;&lt;font color=#0000ff size=3 face=Calibri&gt;last
tutorial&lt;/font&gt;&lt;/a&gt;&lt;font color=#000000 size=3 face=Calibri&gt;, we described how a database
developer would use the Schema Compare tool to update a database project with changes
to a SQL Server database.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;This article describes how to
use the Schema Compare tool to push those changes out to a different SQL Server database.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;There
are two scenarios where you would do this.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;In Scenario 1, a developer has
a local copy of the development database and wishes to get the latest updates to the
database.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In Scenario 2, a database administrator (DBA)
or build master who is charged with migrating database changes from one environment
to the next.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Just as .Net and web code
gets regularly migrated from a development environment to a QA or Production environment,
database object code must also be migrated, and that migration generally must be kept
in sync with all code that depends on those database objects.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;We start this process by launching Visual
Studio and opening the database project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If
a source code repository such as TFS is used, we need to get the latest code from
the repository.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;The database to which we wish to write the
changes is known to Data Dude as the “target database”.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;We
need to make sure that a connection exists in Visual Studio to the target database.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
is a one-time step and you can use the Server Explorer (&lt;b style="mso-bidi-font-weight: normal"&gt;View
| Server Explorer&lt;/b&gt;) to create a connection.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;The following steps describe how to propagate
changes to the database.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;1.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Launch
Visual Studio and open the database project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Get
the latest source code from your source code repository.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;2.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;From
the Visual Studio menu, select &lt;b style="mso-bidi-font-weight: normal"&gt;Data | Schema
Compare | New Schema Compare&lt;/b&gt;.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;New
Schema Compare&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt; dialog
displays.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD02_Fig1.jpg" target=_pix&gt;&lt;img style="WIDTH: 652px; HEIGHT: 185px" border=0 src="http://www.davidgiard.com/content/binary/DD02_Fig1.jpg" width=772 height=290&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
1&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;3.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Under &lt;b style="mso-bidi-font-weight: normal"&gt;Source
Schema&lt;/b&gt;, select the &lt;b style="mso-bidi-font-weight: normal"&gt;Project &lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt;radio
button and select your database project from the dropdown list.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;4.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Under &lt;b style="mso-bidi-font-weight: normal"&gt;Target
Schema&lt;/b&gt;, select the &lt;b style="mso-bidi-font-weight: normal"&gt;Database&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt; radio
button and select the connection to your database from dropdown list.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;5.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Click
the &lt;b style="mso-bidi-font-weight: normal"&gt;OK&lt;/b&gt; button to display the &lt;b style="mso-bidi-font-weight: normal"&gt;Schema
Compare&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt; window.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD02_Fig2.jpg" target=_pix&gt;&lt;img style="WIDTH: 671px; HEIGHT: 583px" border=0 src="http://www.davidgiard.com/content/binary/DD02_Fig2.jpg" width=726 height=677&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
2&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;6.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;Schema
Compare&lt;/b&gt; window lists every object that exists in either the database or the database
project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The objects are grouped in folders
by object type (Tables, views, stored procedures, etc.)&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;You
can expand or collapse a folder to view or hide objects of that type.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;The
important column is “Update Action” which describes what will happen if you write
the updates to the target.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;a.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Objects
that exist in the source (the project) but not in the target (the database) were likely
recently added after the last synchronization.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;By
default, the Update Action will be “Create” meaning the object will be created in
the target database.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;b.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Objects
that exist in both the source and the target will have an Update Action of “Update”
if they have been modified in the database since the last synchronization or “Skip”
if they have not.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;c.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Objects
that exist in the destination (the database) but not in the source (the project) were
likely dropped after the last synchronization. By default, the Update Action will
be “Drop” meaning the object will be removed from the database.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;7.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;On
a database with many objects, it is useful to view only the objects that have changed
since the last synchronization.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;To do
this, click the &lt;b style="mso-bidi-font-weight: normal"&gt;Filter&lt;/b&gt; toolbar button
and select &lt;b style="mso-bidi-font-weight: normal"&gt;Non Skip Objects&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt;.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; 
&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD02_Filter.jpg" target=_pix&gt;&lt;img border=0 src="http://www.davidgiard.com/content/binary/DD02_Filter.jpg"&gt; &lt;/a&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;Figure 3&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;8.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;If
you wish, you can modify the Update Action on objects by selecting the dropdown in
the “Update Action” column.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Some
actions are grayed out because Data Dude will not allow you to perform any action
that would violate referential integrity rules.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;9.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;After
you have set the “Update Action” of every object appropriately, you have a couple
options.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;a.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;You
can migrate your changes immediately to the target database by clicking the “Write
Updates” toolbar button.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Click &lt;b style="mso-bidi-font-weight: normal"&gt;Yes&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt; at
the confirmation to write the updates to the database project.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;b.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Alternatively,
you can export your changes to a SQL script by clicking the &lt;b style="mso-bidi-font-weight: normal"&gt;Export
To Editor&lt;/b&gt; toolbar button.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This will
create a single text file containing SQL script that you can run from a query window
of &lt;i style="mso-bidi-font-style: normal"&gt;SQL Server Management Studio&lt;/i&gt;.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
is useful if you need to make changes to the script prior to executing.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;I
have used this technique when my database contains views or stored procedures that
refer to remote servers and I want to modify the name of the server before migrating
the object.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;Alternatively, you can deploy changes from
a database project to a database by “Deploying” the project (select &lt;span class=QuoteChar&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-STYLE: normal; mso-bidi-font-style: italic"&gt;Build
| Deploy Solution&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;).&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
deploys your changes using the settings found on the &lt;b style="mso-bidi-font-weight: normal"&gt;Build&lt;/b&gt; tab
of the project properties page.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
method requires fewer steps, but it is less flexible than the method described above.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;In
particular, it does not allow you to select which objects are deployed or export and
modify the script of database changes.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In the next article, we will discuss how to
use Data Dude to write Unit Tests against SQL Server stored procedures.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=e8910d69-6570-4257-b79f-2ffd9e1b4a9e" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,e8910d69-6570-4257-b79f-2ffd9e1b4a9e.aspx</comments>
      <category>.Net</category>
      <category>SQL Server</category>
      <category>VSTS</category>
    </item>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=5f9a973b-417f-4010-84db-b8a783d8b618</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,5f9a973b-417f-4010-84db-b8a783d8b618.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,5f9a973b-417f-4010-84db-b8a783d8b618.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=5f9a973b-417f-4010-84db-b8a783d8b618</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">Microsoft Visual Studio
Team System 2008 Database Edition (aka “Data Dude”) provides tools for managing and
deploying SQL Server databases.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">In our </font>
          <a href="http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx">
            <font size="3" face="Calibri">last
tutorial</font>
          </a>
          <font color="#000000" size="3" face="Calibri">, we described how
to create a new database project based on an existing SQL Server database.<span style="mso-spacerun: yes">  </span>As
the source database changes, you will want to update the database project to reflect
those changes.<span style="mso-spacerun: yes">  </span>This article describes
how to use the Schema Compare tool to import database schema changes into your database
project.<span style="mso-spacerun: yes">  </span>The steps in this article are
typically performed by a database administrator (DBA) or database developer who is
charged with creating tables, views, functions and stored procedures.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">The Schema Compare tool
can be used to display and manage differences between two databases, between two database
projects, or between a database and a database project.<span style="mso-spacerun: yes">  </span>Most
of the time, I use it to compare a database with a database project.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">After making a change to a database
schema (for example, adding a new table or adding a new column to a table), use the
Schema Compare tool as described below to update an existing database project with
these changes.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">1.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Launch
Visual Studio and open your Database Project. (For info on how to create a database
project from a SQL Server database see: </font>
          </font>
          <a href="http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx">
            <font size="3" face="Calibri">http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx</font>
          </a>
          <font color="#000000" size="3" face="Calibri"> )</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">2.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">From
the Visual Studio menu, select <b style="mso-bidi-font-weight: normal">Data | Schema
Compare | New Schema Compare</b>.<span style="mso-spacerun: yes">  </span>The <b style="mso-bidi-font-weight: normal">New
Schema Compare</b></font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri"> dialog
displays.<br /><a href="http://www.davidgiard.com/content/binary/DD02_Fig1.jpg" target="_pix"><img border="0" src="http://www.davidgiard.com/content/binary/DD02_Fig1.jpg" width="613" height="255" /></a><br /><span style="mso-spacerun: yes">    </span><b style="mso-bidi-font-weight: normal">Figure
1</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">3.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Under <b style="mso-bidi-font-weight: normal">Source
Schema</b>, select the <b style="mso-bidi-font-weight: normal">Database</b></font>
              <font size="3"> radio
button and select the connection to your database from dropdown list.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">4.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Under <b style="mso-bidi-font-weight: normal">Target
Schema</b>, select the <b style="mso-bidi-font-weight: normal">Project </b></font>
              <font size="3">radio
button and select your database project from the dropdown list.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">5.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3">
              <font face="Calibri">Click
the <b style="mso-bidi-font-weight: normal">OK</b> button to display the <b style="mso-bidi-font-weight: normal">Schema
Compare</b></font>
            </font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri"> window.<br /><a href="http://www.davidgiard.com/content/binary/DD02_Fig2.jpg" target="_pix"><img style="WIDTH: 670px; HEIGHT: 379px" border="0" src="http://www.davidgiard.com/content/binary/DD02_Fig2.jpg" width="1028" height="624" /><br /><span style="mso-spacerun: yes"></span></a>    <b style="mso-bidi-font-weight: normal">Figure 2</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">6.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The <b style="mso-bidi-font-weight: normal">Schema
Compare</b> window lists every object that exists in either the database or the database
project.<span style="mso-spacerun: yes">  </span>The objects are grouped in folders
by object type (Tables, views, stored procedures, etc.)<span style="mso-spacerun: yes">  </span>You
can expand or collapse a folder to view or hide objects of that type.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">The
important column is “Update Action” which describes what will happen if you write
the updates to the target.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">a.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Objects
that exist in the source (the database) but not in the target (the project) were likely
added to the database after the last synchronization.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">By
default, the Update Action will be “Create” meaning the object will be created in
the database project.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">b.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font size="3" face="Calibri">Objects
that exist in both the source and the target will have an Update Action of “Update”
if they have been modified in the database since the last synchronization or “Skip”
if they have not.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">c.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Objects
that exist in the destination (the project) but not in the source (the database) were
likely dropped from the database after the last synchronization. By default, the Update
Action will be “Drop” meaning the object will be removed from the database project.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">7.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">If
you are updating your database project frequently, most of the objects will be unchanged
and marked “Skip”.<span style="mso-spacerun: yes">  </span>On a database with
many objects, it is useful to view only the objects that have changed since the last
synchronization.<span style="mso-spacerun: yes">  </span>To do this, click the <b style="mso-bidi-font-weight: normal">Filter</b> toolbar
button and select <b style="mso-bidi-font-weight: normal">Non Skip Objects</b></font>
              <font size="3">. </font>
              <span style="mso-spacerun: yes">
                <font size="3"> <br /><a href="http://www.davidgiard.com/content/binary/DD02_Filter.jpg" target="_pix"><img border="0" src="http://www.davidgiard.com/content/binary/DD02_Filter.jpg" /></a><br />
    <strong>Figure 3</strong></font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">8.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">At
this point, you can view differences and you may wish to modify the Update Action
of some objects.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">a.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">If
you click on an object row in the <b style="mso-bidi-font-weight: normal">Schema Compare</b> window,
the SQL definition code of both the source and destination version appears in the <b style="mso-bidi-font-weight: normal">Object
Definition</b> window.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Any
differences between the two versions will be highlighted (changed lines in darker
blue; new lines in darker green).</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">b.</font>
                <span style="FONT: 7pt 'Times New Roman'">      </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">If
you like, you can modify the Update Action any object by selecting the dropdown in
the “Update Action” column.<span style="mso-spacerun: yes">  </span>Some actions
are grayed out because Data Dude will not allow you to perform any action that would
violate referential integrity rules.<span style="mso-spacerun: yes">  </span>If
several developers are sharing the same development database, you may wish to skip
those objects on which you are not working.<span style="mso-spacerun: yes">  </span>You
may also decide that some objects are ready to share with the rest of the team and
others are not fully tested and should be skipped.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">It
is possible to change the Update Action of every object of a given type by right-clicking
the type folder and selecting the desired action to apply to all objects of that type.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">9.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">After
you have set the “Update Action” of every object appropriately, you can migrate your
changes to the database project by clicking the <strong>Write Updates</strong> toolbar
button.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Click Yes
at the confirmation to write the updates to the database project.<br /><a href="http://www.davidgiard.com/content/binary/DD02_WriteUpdates.jpg" target="_pix"><img border="0" src="http://www.davidgiard.com/content/binary/DD02_WriteUpdates.jpg" /></a><br />
    <strong>Figure 4</strong></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpLast">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">10.</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font size="3" face="Calibri">If
you are using a source control repository, such as TFS, you will want to check in
your changes.</font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">In the next article, we will discuss
how to use the Schema Compare tool to write changes to a new database environment.</font>
        </p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=5f9a973b-417f-4010-84db-b8a783d8b618" />
      </body>
      <title>Data Dude tutorial 2 - Using Schema Compare tool to update a database project</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,5f9a973b-417f-4010-84db-b8a783d8b618.aspx</guid>
      <link>http://www.davidgiard.com/2008/08/12/DataDudeTutorial2UsingSchemaCompareToolToUpdateADatabaseProject.aspx</link>
      <pubDate>Tue, 12 Aug 2008 12:40:04 GMT</pubDate>
      <description>&lt;p class=MsoNormal&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;Microsoft Visual Studio Team System
2008 Database Edition (aka “Data Dude”) provides tools for managing and deploying
SQL Server databases.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In our &lt;/font&gt;&lt;a href="http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx"&gt;&lt;font size=3 face=Calibri&gt;last
tutorial&lt;/font&gt;&lt;/a&gt;&lt;font color=#000000 size=3 face=Calibri&gt;, we described how to create
a new database project based on an existing SQL Server database.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;As
the source database changes, you will want to update the database project to reflect
those changes.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This article describes
how to use the Schema Compare tool to import database schema changes into your database
project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The steps in this article are
typically performed by a database administrator (DBA) or database developer who is
charged with creating tables, views, functions and stored procedures.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;The Schema Compare tool can be
used to display and manage differences between two databases, between two database
projects, or between a database and a database project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Most
of the time, I use it to compare a database with a database project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;After making a change to a database schema
(for example, adding a new table or adding a new column to a table), use the Schema
Compare tool as described below to update an existing database project with these
changes.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;1.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Launch
Visual Studio and open your Database Project. (For info on how to create a database
project from a SQL Server database see: &lt;/font&gt;&lt;/font&gt;&lt;a href="http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx"&gt;&lt;font size=3 face=Calibri&gt;http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx&lt;/font&gt;&lt;/a&gt;&lt;font color=#000000 size=3 face=Calibri&gt; )&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;2.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;From
the Visual Studio menu, select &lt;b style="mso-bidi-font-weight: normal"&gt;Data | Schema
Compare | New Schema Compare&lt;/b&gt;.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;New
Schema Compare&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt; dialog
displays.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD02_Fig1.jpg" target=_pix&gt;&lt;img border=0 src="http://www.davidgiard.com/content/binary/DD02_Fig1.jpg" width=613 height=255&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
1&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;3.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Under &lt;b style="mso-bidi-font-weight: normal"&gt;Source
Schema&lt;/b&gt;, select the &lt;b style="mso-bidi-font-weight: normal"&gt;Database&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt; radio
button and select the connection to your database from dropdown list.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;4.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Under &lt;b style="mso-bidi-font-weight: normal"&gt;Target
Schema&lt;/b&gt;, select the &lt;b style="mso-bidi-font-weight: normal"&gt;Project &lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt;radio
button and select your database project from the dropdown list.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;5.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Click
the &lt;b style="mso-bidi-font-weight: normal"&gt;OK&lt;/b&gt; button to display the &lt;b style="mso-bidi-font-weight: normal"&gt;Schema
Compare&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt; window.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD02_Fig2.jpg" target=_pix&gt;&lt;img style="WIDTH: 670px; HEIGHT: 379px" border=0 src="http://www.davidgiard.com/content/binary/DD02_Fig2.jpg" width=1028 height=624&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;
&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure 2&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;6.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;Schema
Compare&lt;/b&gt; window lists every object that exists in either the database or the database
project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The objects are grouped in folders
by object type (Tables, views, stored procedures, etc.)&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;You
can expand or collapse a folder to view or hide objects of that type.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;The
important column is “Update Action” which describes what will happen if you write
the updates to the target.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;a.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Objects
that exist in the source (the database) but not in the target (the project) were likely
added to the database after the last synchronization.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;By
default, the Update Action will be “Create” meaning the object will be created in
the database project.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;b.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Objects
that exist in both the source and the target will have an Update Action of “Update”
if they have been modified in the database since the last synchronization or “Skip”
if they have not.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;c.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Objects
that exist in the destination (the project) but not in the source (the database) were
likely dropped from the database after the last synchronization. By default, the Update
Action will be “Drop” meaning the object will be removed from the database project.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;7.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;If
you are updating your database project frequently, most of the objects will be unchanged
and marked “Skip”.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;On a database with
many objects, it is useful to view only the objects that have changed since the last
synchronization.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;To do this, click the &lt;b style="mso-bidi-font-weight: normal"&gt;Filter&lt;/b&gt; toolbar
button and select &lt;b style="mso-bidi-font-weight: normal"&gt;Non Skip Objects&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt;.&amp;nbsp;&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp;&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD02_Filter.jpg" target=_pix&gt;&lt;img border=0 src="http://www.davidgiard.com/content/binary/DD02_Filter.jpg"&gt; &lt;/a&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;Figure 3&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;8.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;At
this point, you can view differences and you may wish to modify the Update Action
of some objects.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;a.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;If
you click on an object row in the &lt;b style="mso-bidi-font-weight: normal"&gt;Schema Compare&lt;/b&gt; window,
the SQL definition code of both the source and destination version appears in the &lt;b style="mso-bidi-font-weight: normal"&gt;Object
Definition&lt;/b&gt; window.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Any
differences between the two versions will be highlighted (changed lines in darker
blue; new lines in darker green).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;b.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;If
you like, you can modify the Update Action any object by selecting the dropdown in
the “Update Action” column.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Some actions
are grayed out because Data Dude will not allow you to perform any action that would
violate referential integrity rules.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If
several developers are sharing the same development database, you may wish to skip
those objects on which you are not working.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;You
may also decide that some objects are ready to share with the rest of the team and
others are not fully tested and should be skipped.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;It
is possible to change the Update Action of every object of a given type by right-clicking
the type folder and selecting the desired action to apply to all objects of that type.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;9.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;After
you have set the “Update Action” of every object appropriately, you can migrate your
changes to the database project by clicking the &lt;strong&gt;Write Updates&lt;/strong&gt; toolbar
button.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Click Yes
at the confirmation to write the updates to the database project.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD02_WriteUpdates.jpg" target=_pix&gt;&lt;img border=0 src="http://www.davidgiard.com/content/binary/DD02_WriteUpdates.jpg"&gt; &lt;/a&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;Figure 4&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;10.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;If
you are using a source control repository, such as TFS, you will want to check in
your changes.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In the next article, we will discuss how to
use the Schema Compare tool to write changes to a new database environment.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=5f9a973b-417f-4010-84db-b8a783d8b618" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,5f9a973b-417f-4010-84db-b8a783d8b618.aspx</comments>
      <category>.Net</category>
      <category>SQL Server</category>
      <category>VSTS</category>
    </item>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=30b4fa79-a994-49f0-abe4-d644c77b8c65</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,30b4fa79-a994-49f0-abe4-d644c77b8c65.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,30b4fa79-a994-49f0-abe4-d644c77b8c65.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=30b4fa79-a994-49f0-abe4-d644c77b8c65</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">Microsoft Visual Studio
Team System 2008 Database Edition (aka “Data Dude”) provides tools for managing and
deploying SQL Server databases.<span style="mso-spacerun: yes">  </span>In order
to use Data Dude to manage an existing SQL Server database, the first step is to create
a database project.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">There are a couple key points you will
need to know before using Data<span style="mso-spacerun: yes">  </span>Dude.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpFirst">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">1.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The
current version of Data Dude only works on SQL Server 2000 and SQL Server 2005.<span style="mso-spacerun: yes">  </span>Visual
Studio 2008 Service Pack 1 should provide support for SQL Server 2008.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">I
will describe an example using SQL Server 2005.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">2.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The
validation engine in Data Dude requires that you install either SQL Server or SQL
Express on the same machine on which Data Dude is installed.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListParagraphCxSpLast">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">3.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">You
must grant “Create database” rights in this database engine to the currently logged-in
user.</font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">Now, let’s discuss how to create a database
project to manage an existing SQL Server 2005 database.</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpFirst">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">1.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">Open
Visual Studio.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">2.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Select <strong>File
| New Project…</strong> The <strong>New Project</strong> dialog displays</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">3.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Under <strong>Project
Type</strong>, select Database <em>Projects\Microsoft SQL Server</em></font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">4.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Under <strong>Templates</strong>,
select <em>SQL Server 2005 Wizard</em>.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">5.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">Enter
a meaningful name and location for this project.</font>
          </font>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-spacerun: yes">  </span>
                <br />
Typically, my databases have names like “AdventureWorks_Dev” and “AdventureWorks_QA”
which describe both the data and the environment to which the data belongs.<span style="mso-spacerun: yes">  </span>Because
a single database project is used for all environments, I name my database project
to describe the data and follow it with “DB” to make it obvious it is a database project.<span style="mso-spacerun: yes">  </span>In
the above example, I would name my database project “AdventureWorksDb”.<span style="mso-spacerun: yes">  </span>In
this exercise, I’ll create a project named “TestDB”.<br /><span style="mso-spacerun: yes"><a href="http://www.davidgiard.com/content/binary/DD01_Fig1.jpg" target="_pix"><img style="WIDTH: 462px; HEIGHT: 337px" border="0" alt="New Project dialog" src="http://www.davidgiard.com/content/binary/DD01_Fig1.jpg" width="594" height="448" /></a><br />
  </span><b style="mso-bidi-font-weight: normal">Figure 1</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">6.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font size="3" face="Calibri">The <strong>New
Database Project Wizard</strong> displays with the <strong>Welcome</strong> screen
active.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
            <span style="mso-list: Ignore">
              <font color="#000000">
                <font size="3" face="Calibri">7.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </font>
            </span>
          </span>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">At
the <strong>Welcome</strong> screen, click the <strong>Next</strong> button to advance
to the <strong>Project Properties</strong> screen. 
<br /><a href="http://www.davidgiard.com/content/binary/DD01_Fig2.jpg" target="_pix"><img style="WIDTH: 462px; HEIGHT: 445px" border="0" alt="Project Properties screen" src="http://www.davidgiard.com/content/binary/DD01_Fig2.jpg" width="594" height="503" /></a><br /><span style="mso-spacerun: yes">  </span><b style="mso-bidi-font-weight: normal">Figure
2</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">8.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">I
almost never change the options on the <strong>Project Properties</strong> screen.<span style="mso-spacerun: yes">   </span></font>
              <font size="3">If
my database contains any stored procedures or functions written in C# or VB.Net, I
will check the <strong>Enable SQLCLR</strong> checkbox.</font>
              <span style="mso-spacerun: yes">
                <font size="3">  </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
            <span style="mso-list: Ignore">
              <font color="#000000">
                <font size="3" face="Calibri">9.</font>
                <span style="FONT: 7pt 'Times New Roman'">       </span>
              </font>
            </span>
          </span>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">Click
the <strong>Next</strong> button to advance to the <strong>Set Database Options</strong> screen. 
<br /><a href="http://www.davidgiard.com/content/binary/DD01_Fig3.jpg" target="_pix"><img style="WIDTH: 463px; HEIGHT: 461px" border="0" alt="Set Database Options screen" src="http://www.davidgiard.com/content/binary/DD01_Fig3.jpg" width="594" height="495" /></a><br /><span style="mso-spacerun: yes">  </span><b style="mso-bidi-font-weight: normal">Figure
3</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">10.</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The
options on the<strong> Set Database Options</strong> screen correspond to the settings
you will find in SQL Server Management Studio when you right-click a database and
select Properties.<span style="mso-spacerun: yes">  </span>The defaults in the
database project wizard are also the defaults in SQL Server.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Since
I seldom override these defaults in SQL Server, there is usually no reason to change
them on this screen.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
            <span style="mso-list: Ignore">
              <font color="#000000">
                <font size="3" face="Calibri">11.</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </font>
            </span>
          </span>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">Click
the <strong>Next</strong> button to advance to the <strong>Import Database Schema</strong> screen. 
<br /><a href="http://www.davidgiard.com/content/binary/DD01_Fig4.jpg" target="_pix"><img style="WIDTH: 462px; HEIGHT: 428px" border="0" alt="Import Database Schema screen" src="http://www.davidgiard.com/content/binary/DD01_Fig4.jpg" width="589" height="485" /></a><br /><span style="mso-spacerun: yes">  </span><b style="mso-bidi-font-weight: normal">Figure
4</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">12.</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">On
the <strong>Import Database Schema</strong> screen, check the <strong>Import Existing
S</strong>chema checkbox.<span style="mso-spacerun: yes">  </span>This enables
the Source database connection dropdown.<span style="mso-spacerun: yes">  </span>If
you already have created a connection to your database, select it from the dropdown.<span style="mso-spacerun: yes">   </span>If
you have not yet created a connection, click the <strong>New Connection</strong> button
to create one now.<span style="mso-spacerun: yes">  </span>The process for creating
a database connection in Visual Studio hasn’t changed for several versions of the
product so I won’t repeat it here.<span style="mso-spacerun: yes">  </span>However
it is worth noting that, although Data Dude requires that you have a local installation
of SQL Server, the database you connect to here can be located on any server to which
you have access.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">I
always usually connect to the Development database because this is the first database
I create for an application.</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
            <span style="mso-list: Ignore">
              <font color="#000000">
                <font size="3" face="Calibri">13.</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </font>
            </span>
          </span>
          <font size="3">
            <font color="#000000">
              <font face="Calibri">Click
the <strong>Next</strong> button to advance to the <strong>Configure Build and Deploy</strong> screen. 
<br /><a href="http://www.davidgiard.com/content/binary/DD01_Fig5.jpg" target="_pix"><img style="WIDTH: 461px; HEIGHT: 405px" border="0" alt="Configure Build and Deploy screen" src="http://www.davidgiard.com/content/binary/DD01_Fig5.jpg" width="543" height="440" /></a><br /><span style="mso-spacerun: yes">  </span><b style="mso-bidi-font-weight: normal">Figure
5</b></font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">14.</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">The <strong>Configure
Build and Deploy</strong> screen contains settings that will take effect when you
“deploy” your database project.<span style="mso-spacerun: yes">  </span>Deploying
a database project writes changes to the schema of a target database (specified in
the Target database name field of this screen) and is accomplished by selecting the
menu options <strong>Build | Deploy</strong> with the database project open and selected.<span style="mso-spacerun: yes">  </span></font>
              <font size="3">Deploying
is most useful when each developer has his own copy of the development database and
needs a quick way to synchronize his schema with a master copy. </font>
              <span style="mso-spacerun: yes">
                <font size="3"> </font>
              </span>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpLast">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">15.</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font size="3" face="Calibri">Click
the <strong>Finish</strong> button to create the database project initialized
with schema objects found in the source database and with the settings you chose in
the wizard screens.</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpLast">
          <font color="#000000" size="3" face="Calibri">16. </font>
          <font color="#000000" size="3" face="Calibri">After
Visual Studio finishes creating the database project, view the objects in the Solution
Explorer (Select <strong>View | Solution Explorer</strong>).  You should
see a "Schema Objects" folder in the project containing a subfolder for each type
of database object.  Open the "tables" subfolder to view you will see files containing
scripts for each table in your database.  Double-click one of these script files
to see the SQL code generated for you.<br /><a href="http://www.davidgiard.com/content/binary/DD01_Fig6.jpg" target="_pix"><img border="1" alt="Database project in Solution Explorer" src="http://www.davidgiard.com/content/binary/DD01_Fig6.jpg" /></a><br />
    <strong>Figure 6</strong></font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraphCxSpLast">
          <font color="#000000" size="3" face="Calibri">17. If you use a source control repository,
such as TFS, you will want to check this project into the repository to make it easier
to share with others.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">As you can see, when you use the wizard
to create your project, most of the work is done for you.<span style="mso-spacerun: yes">  </span>You
are able to change the default settings, but in most cases this is not necessary.<span style="mso-spacerun: yes">  </span>Often,
the only change I make on the wizard screens is when I select a database connection.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">In the next article, we will discuss
how to use the Schema Compare tool to bring data changes into or out of your database
project.</font>
        </p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=30b4fa79-a994-49f0-abe4-d644c77b8c65" />
      </body>
      <title>Data Dude tutorial 1 - Creating a database project</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,30b4fa79-a994-49f0-abe4-d644c77b8c65.aspx</guid>
      <link>http://www.davidgiard.com/2008/08/11/DataDudeTutorial1CreatingADatabaseProject.aspx</link>
      <pubDate>Mon, 11 Aug 2008 14:12:22 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;Microsoft Visual Studio Team System
2008 Database Edition (aka “Data Dude”) provides tools for managing and deploying
SQL Server databases.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;In order to use
Data Dude to manage an existing SQL Server database, the first step is to create a
database project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;There are a couple key points you will need
to know before using Data&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Dude.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;1.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The
current version of Data Dude only works on SQL Server 2000 and SQL Server 2005.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Visual
Studio 2008 Service Pack 1 should provide support for SQL Server 2008.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;I
will describe an example using SQL Server 2005.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;2.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The
validation engine in Data Dude requires that you install either SQL Server or SQL
Express on the same machine on which Data Dude is installed.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l1 level1 lfo1" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;3.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;You
must grant “Create database” rights in this database engine to the currently logged-in
user.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;Now, let’s discuss how to create a database
project to manage an existing SQL Server 2005 database.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpFirst&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;1.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Open
Visual Studio.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;2.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Select &lt;strong&gt;File
| New Project…&lt;/strong&gt; The &lt;strong&gt;New Project&lt;/strong&gt; dialog displays&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;3.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Under &lt;strong&gt;Project
Type&lt;/strong&gt;, select Database &lt;em&gt;Projects\Microsoft SQL Server&lt;/em&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;4.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Under &lt;strong&gt;Templates&lt;/strong&gt;,
select &lt;em&gt;SQL Server 2005 Wizard&lt;/em&gt;.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;5.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Enter
a meaningful name and location for this project.&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;
&lt;br&gt;
Typically, my databases have names like “AdventureWorks_Dev” and “AdventureWorks_QA”
which describe both the data and the environment to which the data belongs.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Because
a single database project is used for all environments, I name my database project
to describe the data and follow it with “DB” to make it obvious it is a database project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;In
the above example, I would name my database project “AdventureWorksDb”.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;In
this exercise, I’ll create a project named “TestDB”.&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&lt;a href="http://www.davidgiard.com/content/binary/DD01_Fig1.jpg" target=_pix&gt;&lt;img style="WIDTH: 462px; HEIGHT: 337px" border=0 alt="New Project dialog" src="http://www.davidgiard.com/content/binary/DD01_Fig1.jpg" width=594 height=448&gt; &lt;/a&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure 1&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;6.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;The &lt;strong&gt;New
Database Project Wizard&lt;/strong&gt; displays with the &lt;strong&gt;Welcome&lt;/strong&gt; screen
active.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font color=#000000&gt;&lt;font size=3 face=Calibri&gt;7.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;At
the &lt;strong&gt;Welcome&lt;/strong&gt; screen, click the &lt;strong&gt;Next&lt;/strong&gt; button to advance
to the &lt;strong&gt;Project Properties&lt;/strong&gt; screen. 
&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD01_Fig2.jpg" target=_pix&gt;&lt;img style="WIDTH: 462px; HEIGHT: 445px" border=0 alt="Project Properties screen" src="http://www.davidgiard.com/content/binary/DD01_Fig2.jpg" width=594 height=503&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
2&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;8.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;I
almost never change the options on the &lt;strong&gt;Project Properties&lt;/strong&gt; screen.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;If
my database contains any stored procedures or functions written in C# or VB.Net, I
will check the &lt;strong&gt;Enable SQLCLR&lt;/strong&gt; checkbox.&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font color=#000000&gt;&lt;font size=3 face=Calibri&gt;9.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;Click
the &lt;strong&gt;Next&lt;/strong&gt; button to advance to the &lt;strong&gt;Set Database Options&lt;/strong&gt; screen. 
&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD01_Fig3.jpg" target=_pix&gt;&lt;img style="WIDTH: 463px; HEIGHT: 461px" border=0 alt="Set Database Options screen" src="http://www.davidgiard.com/content/binary/DD01_Fig3.jpg" width=594 height=495&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
3&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;10.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The
options on the&lt;strong&gt; Set Database Options&lt;/strong&gt; screen correspond to the settings
you will find in SQL Server Management Studio when you right-click a database and
select Properties.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The defaults in the
database project wizard are also the defaults in SQL Server.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Since
I seldom override these defaults in SQL Server, there is usually no reason to change
them on this screen.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font color=#000000&gt;&lt;font size=3 face=Calibri&gt;11.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;Click
the &lt;strong&gt;Next&lt;/strong&gt; button to advance to the &lt;strong&gt;Import Database Schema&lt;/strong&gt; screen. 
&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD01_Fig4.jpg" target=_pix&gt;&lt;img style="WIDTH: 462px; HEIGHT: 428px" border=0 alt="Import Database Schema screen" src="http://www.davidgiard.com/content/binary/DD01_Fig4.jpg" width=589 height=485&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
4&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;12.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;On
the &lt;strong&gt;Import Database Schema&lt;/strong&gt; screen, check the &lt;strong&gt;Import Existing
S&lt;/strong&gt;chema checkbox.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This enables
the Source database connection dropdown.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If
you already have created a connection to your database, select it from the dropdown.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If
you have not yet created a connection, click the &lt;strong&gt;New Connection&lt;/strong&gt; button
to create one now.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The process for creating
a database connection in Visual Studio hasn’t changed for several versions of the
product so I won’t repeat it here.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;However
it is worth noting that, although Data Dude requires that you have a local installation
of SQL Server, the database you connect to here can be located on any server to which
you have access.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;I
always usually connect to the Development database because this is the first database
I create for an application.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font color=#000000&gt;&lt;font size=3 face=Calibri&gt;13.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;Click
the &lt;strong&gt;Next&lt;/strong&gt; button to advance to the &lt;strong&gt;Configure Build and Deploy&lt;/strong&gt; screen. 
&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD01_Fig5.jpg" target=_pix&gt;&lt;img style="WIDTH: 461px; HEIGHT: 405px" border=0 alt="Configure Build and Deploy screen" src="http://www.davidgiard.com/content/binary/DD01_Fig5.jpg" width=543 height=440&gt; &lt;/a&gt;
&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Figure
5&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;14.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;The &lt;strong&gt;Configure
Build and Deploy&lt;/strong&gt; screen contains settings that will take effect when you
“deploy” your database project.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Deploying
a database project writes changes to the schema of a target database (specified in
the Target database name field of this screen) and is accomplished by selecting the
menu options &lt;strong&gt;Build | Deploy&lt;/strong&gt; with the database project open and selected.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;Deploying
is most useful when each developer has his own copy of the development database and
needs a quick way to synchronize his schema with a master copy. &lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font size=3&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;15.&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Click
the&amp;nbsp;&lt;strong&gt;Finish&lt;/strong&gt; button to create the database project initialized
with schema objects found in the source database and with the settings you chose in
the wizard screens.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;16. &lt;/font&gt;&lt;font color=#000000 size=3 face=Calibri&gt;After
Visual Studio finishes creating the database project, view the objects in the Solution
Explorer (Select &lt;strong&gt;View&amp;nbsp;| Solution Explorer&lt;/strong&gt;).&amp;nbsp; You should
see a "Schema Objects" folder in the project containing a subfolder for each type
of database object.&amp;nbsp; Open the "tables" subfolder to view you will see files containing
scripts for each table in your database.&amp;nbsp; Double-click one of these script files
to see the SQL code generated for you.&lt;br&gt;
&lt;a href="http://www.davidgiard.com/content/binary/DD01_Fig6.jpg" target=_pix&gt;&lt;img border=1 alt="Database project in Solution Explorer" src="http://www.davidgiard.com/content/binary/DD01_Fig6.jpg"&gt; &lt;/a&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;Figure 6&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;17. If you use a source control repository,
such as TFS, you will want to check this project into the repository to make it easier
to share with others.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;As you can see, when you use the wizard to
create your project, most of the work is done for you.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;You
are able to change the default settings, but in most cases this is not necessary.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Often,
the only change I make on the wizard screens is when I select a database connection.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In the next article, we will discuss how to
use the Schema Compare tool to bring data changes into or out of your database project.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=30b4fa79-a994-49f0-abe4-d644c77b8c65" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,30b4fa79-a994-49f0-abe4-d644c77b8c65.aspx</comments>
      <category>.Net</category>
      <category>SQL Server</category>
      <category>VSTS</category>
    </item>
    <item>
      <trackback:ping>http://www.davidgiard.com/Trackback.aspx?guid=b6b26260-96b7-4492-b58b-5aef6edc3759</trackback:ping>
      <pingback:server>http://www.davidgiard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.davidgiard.com/PermaLink,guid,b6b26260-96b7-4492-b58b-5aef6edc3759.aspx</pingback:target>
      <dc:creator>David Giard</dc:creator>
      <wfw:comment>http://www.davidgiard.com/CommentView,guid,b6b26260-96b7-4492-b58b-5aef6edc3759.aspx</wfw:comment>
      <wfw:commentRss>http://www.davidgiard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b6b26260-96b7-4492-b58b-5aef6edc3759</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Visual Studio Team System 2008 Database Edition is a mouthful to say, so a lot of
people affectionately call it “Data Dude”.
</p>
        <p>
Data Dude provides a set of tools integrated into Visual Studio that assist developers
in managing and deploying SQL Server database objects.
</p>
        <p>
There are four tools in this product that I have found particularly useful: the Database
Project; the Schema Compare tool; the Data Compare Tool; and Database Unit Tests.
</p>
        <p>
A <strong>Database Project </strong>is a Visual Studio project just as a class library
or ASP.Net web project is.  However, instead of holding .Net source code, a Database
Project holds the source code for database objects, such as tables, views and stored
procedures.  This code is typically written in SQL Data Definition Language (DDL). 
Storing this code in a Database Project makes it easier to check it into a source
code repository such as Team Foundation Server (TFS); and simplifies the process of
migrating database objects to other environments.
</p>
        <p>
The <strong>Schema Compare </strong>tool is most useful when comparing a database
with a Visual Studio Database Project.  Developers can use this tool after adding,
modifying or deleting objects from a database in order to propagate those changes
to a Database Project.  Later, a Database Administrator (DBA) can compare the
Database Project to a different database to see what objects have been added, dropped
or modified since the last compare.  The DBA can then deploy those changes to
the other database.  This is useful for migrating data objects from one environment
to another, for example when moving code changes from a Development database to a
QA or Production database.
</p>
        <p>
The <strong>Data Compare </strong>is another tool for migrating from one database
environment to the next.  This tool facilitates the migration of records in a
given table from one database to another.  The table in both the source and destination
database must have the same structure.  I use this when I want to seed values
into lookup tables, such as a list of states or a list of valid customer types that
are stored in database tables.
</p>
        <p>
          <strong>Unit tests </strong>have increased in popularity the last few years as developers
have come to realize their importance in maintaining robust, error-free code. 
But unit testing stored procedures is still relatively rare, even though code in stored
procedures is no less important than code in .Net assemblies.  Data Dude provides
the ability to write unit tests for stored procedures using the same testing framework
(MS Test) you used for unit tests of .Net code.  The tests work the same as your
other unit tests – you write code and assert what you expect to be true.  Each
test passes only if all its assertions are true at runtime.  The only difference
is that your code is written in T-SQL, instead of C# or Visual Basic.Net.  
</p>
        <p>
There are some limitations.  In order to use Data Dude, you must have either
SQL Server 2008 or SQL Express installed locally on your development machine and you
(the logged-in user) must have "Create Database" rights on that local installation. 
To my knowledge, Data Dude only works with SQL Server 2000 and 2005 databases. 
Plans to integrate with SQL Server 2008 have been announced but I don't know Microsoft's
plans for other database engines.   I also occasionally find myself wishing
Data Dude could accomplish its tasks more easily or in a more automated fashion. 
I wish, for example, I could specify that I always want to ignore database users in
a database and always want to migrate everything else when using the Schema Compare
tool.  But overall, the tools in this product have increased my productivity
significantly.  Nearly every application I write has a database element to it
and anything that can help me with database development, management and deployment
improves the quality of my applications.
</p>
        <img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=b6b26260-96b7-4492-b58b-5aef6edc3759" />
      </body>
      <title>The Goodness of Data Dude</title>
      <guid isPermaLink="false">http://www.davidgiard.com/PermaLink,guid,b6b26260-96b7-4492-b58b-5aef6edc3759.aspx</guid>
      <link>http://www.davidgiard.com/2008/08/10/TheGoodnessOfDataDude.aspx</link>
      <pubDate>Sun, 10 Aug 2008 12:34:41 GMT</pubDate>
      <description>&lt;p&gt;
Visual Studio Team System 2008 Database Edition is a mouthful to say, so a lot of
people affectionately call it “Data Dude”.
&lt;/p&gt;
&lt;p&gt;
Data Dude provides a set of tools integrated into Visual Studio that assist developers
in managing and deploying SQL Server database objects.
&lt;/p&gt;
&lt;p&gt;
There are four tools in this product that I have found particularly useful: the Database
Project; the Schema Compare tool; the Data Compare Tool; and Database Unit Tests.
&lt;/p&gt;
&lt;p&gt;
A &lt;strong&gt;Database Project &lt;/strong&gt;is a Visual Studio project just as a class library
or ASP.Net web project is.&amp;nbsp; However, instead of holding .Net source code, a Database
Project holds the source code for database objects, such as tables, views and stored
procedures.&amp;nbsp; This code is typically written in SQL Data Definition Language (DDL).&amp;nbsp;
Storing this code in a Database Project makes it easier to check it into a source
code repository such as Team Foundation Server (TFS); and simplifies the process of
migrating database objects to other environments.
&lt;/p&gt;
&lt;p&gt;
The &lt;strong&gt;Schema Compare &lt;/strong&gt;tool is most useful when comparing a database
with a Visual Studio Database Project.&amp;nbsp; Developers can use this tool after adding,
modifying or deleting objects from a database in order to propagate those changes
to a Database Project.&amp;nbsp; Later, a Database Administrator (DBA) can compare the
Database Project to a different database to see what objects have been added, dropped
or modified since the last compare.&amp;nbsp; The DBA can then deploy those changes to
the other database.&amp;nbsp; This is useful for migrating data objects from one environment
to another, for example when moving code changes from a Development database to a
QA or Production database.
&lt;/p&gt;
&lt;p&gt;
The &lt;strong&gt;Data Compare &lt;/strong&gt;is another tool for migrating from one database
environment to the next.&amp;nbsp; This tool facilitates the migration of records in a
given table from one database to another.&amp;nbsp; The table in both the source and destination
database must have the same structure.&amp;nbsp; I use this when I want to seed values
into lookup tables, such as a list of states or a list of valid customer types that
are stored in database tables.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Unit tests &lt;/strong&gt;have increased in popularity the last few years as developers
have come to realize their importance in maintaining robust, error-free code.&amp;nbsp;
But unit testing stored procedures is still relatively rare, even though code in stored
procedures is no less important than code in .Net assemblies.&amp;nbsp; Data Dude provides
the ability to write unit tests for stored procedures using the same testing framework
(MS Test) you used for unit tests of .Net code.&amp;nbsp; The tests work the same as your
other unit tests – you write code and assert what you expect to be true.&amp;nbsp; Each
test passes only if all its assertions are true at runtime.&amp;nbsp; The only difference
is that your code is written in T-SQL, instead of C# or Visual Basic.Net.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
There are some limitations.&amp;nbsp; In order to use Data Dude, you must have either
SQL Server 2008 or SQL Express installed locally on your development machine and you
(the logged-in user) must have "Create Database" rights on that local installation.&amp;nbsp;
To my knowledge, Data Dude only works with SQL Server 2000 and 2005 databases.&amp;nbsp;
Plans to integrate with SQL Server 2008 have been announced but I don't know Microsoft's
plans for other database engines.&amp;nbsp;&amp;nbsp; I also occasionally find myself wishing
Data Dude could accomplish its tasks more easily or in a more automated fashion.&amp;nbsp;
I wish, for example, I could specify that I always want to ignore database users in
a database and always want to migrate everything else when using the Schema Compare
tool.&amp;nbsp; But overall, the tools in this product have increased my productivity
significantly.&amp;nbsp; Nearly every application I write has a database element to it
and anything that can help me with database development, management and deployment
improves the quality of my applications.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.davidgiard.com/aggbug.ashx?id=b6b26260-96b7-4492-b58b-5aef6edc3759" /&gt;</description>
      <comments>http://www.davidgiard.com/CommentView,guid,b6b26260-96b7-4492-b58b-5aef6edc3759.aspx</comments>
      <category>.Net</category>
      <category>SQL Server</category>
      <category>VSTS</category>
    </item>
  </channel>
</rss>