<?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>Code Smart Not Hard</title>
    <link>http://www.codesmartnothard.com/</link>
    <description>Continuous Learning and Sharing of Team Foundation Server and Application Lifecycle Management</description>
    <language>en-us</language>
    <copyright>Mike Douglas</copyright>
    <lastBuildDate>Mon, 23 Apr 2012 22:41:00 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>mikedouglasdev@gmail.com</managingEditor>
    <webMaster>mikedouglasdev@gmail.com</webMaster>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=bac325de-9070-4c65-ada5-28aa7dba3025</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,bac325de-9070-4c65-ada5-28aa7dba3025.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,bac325de-9070-4c65-ada5-28aa7dba3025.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bac325de-9070-4c65-ada5-28aa7dba3025</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
SQL Server 2012 was just launched and is packed a number of new features.  See
the <a href="http://www.microsoft.com/sql" target="_blank">Microsoft SQL Server 2012
landing page</a> for more information on SQL Server 2012.  SQL Server 2012 includes
everything you need (almost, as I’ll show you below) to being utilizing the ALM features
in Team Foundation Server 2010 without the developer edition of Visual Studio. 
I’m going to walk you though the options to install, the configuration, and the additional
downloads to begin using all of the features.
</p>
        <p>
If you opened SQL Server Management Studio 2012 then you have probably noticed how
it now powered by Visual Studio 2010.  In addition, the Business Intelligence
Development Studio (BIDS) has been renamed to SQL Server Data Tools (SSDT). 
Not only is SSDT powered by Visual Studio 2010, it now includes the Database Project
template.  By integrating “Data Dude” (Microsoft’s original code name for the
database development tools that keeps sticking) into the SQL Server installation,
I think Microsoft is sending the message that ALM features for database artifacts
are very important for database professionals and not just developers.  
</p>
        <h3>SQL Server Installation
</h3>
        <p>
This first step is choose the proper features when installing SQL Server.  If
you have already installed it without these features, you will need to rerun the installation
and add these features.  During the Feature Selection of the SQL Server 2012
installation wizard, choose the <strong>SQL Server Data Tools</strong> and <strong>Management
Tools</strong> to install the Visual Studio 2010 powered client tools as shown in
Figure 1.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_1.png" width="644" height="483" />
          </a>
        </p>
        <p>
          <strong>Figure 1 – Choosing the SQL Server Data Tools</strong>
        </p>
        <p>
Once this installation has completed, the two client tool programs will be available
from the Microsoft SQL Server 2012 program menu.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_6.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_2.png" width="240" height="195" />
          </a>
        </p>
        <p>
          <strong>Figure 2 – SQL Server Data Tools and Management Studio programs</strong>
        </p>
        <h3>Enabling Database Projects in SQL Server Data Tools
</h3>
        <p>
Open the SQL Server Data Tools and choose New Project. The Business Intelligence project
templates are listed below for Analysis Services, Integration Services, and Reporting
Services.  The SQL Server item has the option to install the additional functionality
including for Database Projects.  Choose this option to download and install
the additional functionality. 
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_8.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_3.png" width="644" height="446" />
          </a>
        </p>
        <p>
          <strong>Figure 3 – Microsoft SQL Server Data Tools (Web Install) option</strong>
        </p>
        <p>
The dialog appears and provides the option to Install the features.  Click Install
to take you to the link below.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_10.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_4.png" width="404" height="226" />
          </a>
        </p>
        <p>
          <strong>Figure 4 – Installing Microsoft SQL Server Data Tools</strong>
        </p>
        <p>
The <a href="http://msdn.microsoft.com/en-us/data/hh297027" target="_blank">Get Started
with Microsoft SQL Server Data Tools page</a> includes the instructions for installing
the tools for both Visual Studio 2010 Professional (or above) and SQL Server Data
Tools.  The second bullet covers our scenario of the Visual Studio 2010 Integrated
Shell and will download all of the required components from the link.  Click
on the <a href="http://www.microsoft.com/web/gallery/install.aspx?appid=SSDT" target="_blank">Download
SQL Server Data Tools link</a> to launch the Web Platform Installer 3.0 to install
the SSDT application.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_12.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_5.png" width="644" height="446" />
          </a>
        </p>
        <p>
          <strong>Figure 5 – Get Started with Microsoft SQL Server Data Tools</strong>
        </p>
        <p>
Click the<strong> Install Now</strong> link to run the Web Platform Installer powered
installation.  Then click the <strong>Install</strong> button below to begin
the installation process.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_14.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_6.png" width="404" height="281" />
          </a>
        </p>
        <p>
          <strong>Figure 6 – Install Microsoft SQL Server Data Tools</strong>
        </p>
        <p>
Once the installation completes, you will have the Database Projects template available
to use, however not all of the functionality that was included in previous versions
of the Database Project is available.  The SSDT team is planning on using the
SSDT Power Tools as a the delivery mechanism to continue to add functionality to SSDT
based on the users requests and needs.  The first release of the SSDT Power Tools
adds Schema View to the Database Projects.  Download and install the latest version
the <a href="http://visualstudiogallery.msdn.microsoft.com/9b0228c6-15d1-44de-9279-66dde12bf861?SRC=Featured" target="_blank">SSDT
Power Tools</a> to add this functionality. Continue to monitor this post and the <a href="http://blogs.msdn.com/b/ssdt/archive/2012/04/02/first-release-of-ssdt-power-tools.aspx" target="_blank">SSDT
Team blog</a> for further improvements.  
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_18.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_8.png" width="504" height="381" />
          </a>
        </p>
        <p>
          <strong>Figure 7 – SSDT Power Tools Download Page</strong>
        </p>
        <p>
Finally, when you reopen the SSDT, the SQL Server Data Project template is now available. 
You can now create Database Projects to manage your database artifacts with rich features
such as smart rename and schema compare.  Furthermore you can leverage these
projects to create automated builds and deployments to align with the application
source code builds and deployments.  See my previous post, <a href="http://www.codesmartnothard.com/2011/10/31/ImplementingContinuousIntegrationCIAndDeliveryForSQLServerDatabases.aspx" target="_blank">Implementing
Continuous Integration (CI) and Deliveron for SQL Server Databases</a> for some background
on Database Projects especially for automated deployments.
</p>
        <p>
There is one critical capability missing with this solution so far.  The Database
Projects are important for following Configuration Management (CM) practices but it
is not complete without the ability to use them with a Source Control Management (SCM)
system.  Fortunately, by being powered by Visual Studio, SSDT can be tightly
integrated with Team Foundation Server 2010 (TFS).   TFS 2010 provides a
number of integrated ALM features including SCM and is even free to install if you
have a MSDN license.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_16.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_7.png" width="644" height="446" />
          </a>
        </p>
        <p>
          <strong>Figure 8 – Create SQL Server 2012 Database Projects</strong>
        </p>
        <h3>Connecting to Team Foundation Server 2010
</h3>
        <p>
The Visual Studio integrated shell that powers SSDT does not include the Team Explorer
component that provides the full integration with TFS 2010.  Team Explorer is
a free download (but requires a TFS CAL, also included with your MSDN license) that
you can install to add this functionality.  Download and install <a href="http://www.microsoft.com/download/en/details.aspx?id=329" target="_blank">Team
Explorer 2010</a>.  When the installation completes, you should download and
re-install the <a href="http://www.microsoft.com/download/en/details.aspx?id=23691" target="_blank">Visual
Studio 2010 SP1</a> (this was automatically installed for you).  To connect to
TFS 2010, first make sure the Team Explorer view is visible.  If not go to the <strong>View</strong> menu
and select <strong>Team Explorer</strong>.  In the Team Explorer toolbar, select
the<strong> plus icon</strong> highlighted below to open the Connect to Team Project
dialog and then select Servers to show you the Add/Remove Team Foundation Server dialog.
Finally, click the <strong>Add</strong> button to create the connection to the appropriate
TFS 2010 Server.  In addition to the SCM features with TFS 2010, this includes
bug tracking, agile project management capabilities, build automation, test case management,
and more.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_20.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_9.png" width="644" height="271" />
          </a>
        </p>
        <p>
          <strong>Figure 9 – Connecting to Team Foundation Server 2010</strong>
        </p>
        <p>
I hope this provided the information you need get started using Database Projects
with SQL Server 2012.  In a future post, I’ll go into detail on how to use the
Database Projects.  If you are using the Visual Studio 2010 Professional or higher,
the same <a href="http://msdn.microsoft.com/en-us/data/hh297027" target="_blank">link</a> above
will install the capabilities for this.  Finally if you are using the Visual
Studio 11 beta or newer, the Database Project template for SQL Server 2012 is already
included.  You will also want to download the SSDT Power Tools.
</p>
        <p>
This was also cross posted on the <a href="http://www.deliveron.com/blog/post/Configure-SQL-Server-2012-Data-Tools-for-ALM-and-TFS-Features.aspx" target="_blank">Deliveron
blog</a></p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=bac325de-9070-4c65-ada5-28aa7dba3025" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Configure SQL Server 2012 Data Tools for ALM and TFS Features</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,bac325de-9070-4c65-ada5-28aa7dba3025.aspx</guid>
      <link>http://www.codesmartnothard.com/2012/04/23/ConfigureSQLServer2012DataToolsForALMAndTFSFeatures.aspx</link>
      <pubDate>Mon, 23 Apr 2012 22:41:00 GMT</pubDate>
      <description>&lt;p&gt;
SQL Server 2012 was just launched and is packed a number of new features.&amp;nbsp; See
the &lt;a href="http://www.microsoft.com/sql" target="_blank"&gt;Microsoft SQL Server 2012
landing page&lt;/a&gt; for more information on SQL Server 2012.&amp;nbsp; SQL Server 2012 includes
everything you need (almost, as I’ll show you below) to being utilizing the ALM features
in Team Foundation Server 2010 without the developer edition of Visual Studio.&amp;nbsp;
I’m going to walk you though the options to install, the configuration, and the additional
downloads to begin using all of the features.
&lt;/p&gt;
&lt;p&gt;
If you opened SQL Server Management Studio 2012 then you have probably noticed how
it now powered by Visual Studio 2010.&amp;nbsp; In addition, the Business Intelligence
Development Studio (BIDS) has been renamed to SQL Server Data Tools (SSDT).&amp;nbsp;
Not only is SSDT powered by Visual Studio 2010, it now includes the Database Project
template.&amp;nbsp; By integrating “Data Dude” (Microsoft’s original code name for the
database development tools that keeps sticking) into the SQL Server installation,
I think Microsoft is sending the message that ALM features for database artifacts
are very important for database professionals and not just developers.&amp;nbsp; 
&lt;/p&gt;
&lt;h3&gt;SQL Server Installation
&lt;/h3&gt;
&lt;p&gt;
This first step is choose the proper features when installing SQL Server.&amp;nbsp; If
you have already installed it without these features, you will need to rerun the installation
and add these features.&amp;nbsp; During the Feature Selection of the SQL Server 2012
installation wizard, choose the &lt;strong&gt;SQL Server Data Tools&lt;/strong&gt; and &lt;strong&gt;Management
Tools&lt;/strong&gt; to install the Visual Studio 2010 powered client tools as shown in
Figure 1.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_1.png" width="644" height="483"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Figure 1 – Choosing the SQL Server Data Tools&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Once this installation has completed, the two client tool programs will be available
from the Microsoft SQL Server 2012 program menu.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_2.png" width="240" height="195"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Figure 2 – SQL Server Data Tools and Management Studio programs&lt;/strong&gt;
&lt;/p&gt;
&lt;h3&gt;Enabling Database Projects in SQL Server Data Tools
&lt;/h3&gt;
&lt;p&gt;
Open the SQL Server Data Tools and choose New Project. The Business Intelligence project
templates are listed below for Analysis Services, Integration Services, and Reporting
Services.&amp;nbsp; The SQL Server item has the option to install the additional functionality
including for Database Projects.&amp;nbsp; Choose this option to download and install
the additional functionality. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_3.png" width="644" height="446"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Figure 3 – Microsoft SQL Server Data Tools (Web Install) option&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The dialog appears and provides the option to Install the features.&amp;nbsp; Click Install
to take you to the link below.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_4.png" width="404" height="226"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Figure 4 – Installing Microsoft SQL Server Data Tools&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The &lt;a href="http://msdn.microsoft.com/en-us/data/hh297027" target="_blank"&gt;Get Started
with Microsoft SQL Server Data Tools page&lt;/a&gt; includes the instructions for installing
the tools for both Visual Studio 2010 Professional (or above) and SQL Server Data
Tools.&amp;nbsp; The second bullet covers our scenario of the Visual Studio 2010 Integrated
Shell and will download all of the required components from the link.&amp;nbsp; Click
on the &lt;a href="http://www.microsoft.com/web/gallery/install.aspx?appid=SSDT" target="_blank"&gt;Download
SQL Server Data Tools link&lt;/a&gt; to launch the Web Platform Installer 3.0 to install
the SSDT application.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_5.png" width="644" height="446"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Figure 5 – Get Started with Microsoft SQL Server Data Tools&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Click the&lt;strong&gt; Install Now&lt;/strong&gt; link to run the Web Platform Installer powered
installation.&amp;nbsp; Then click the &lt;strong&gt;Install&lt;/strong&gt; button below to begin
the installation process.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_6.png" width="404" height="281"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Figure 6 – Install Microsoft SQL Server Data Tools&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Once the installation completes, you will have the Database Projects template available
to use, however not all of the functionality that was included in previous versions
of the Database Project is available.&amp;nbsp; The SSDT team is planning on using the
SSDT Power Tools as a the delivery mechanism to continue to add functionality to SSDT
based on the users requests and needs.&amp;nbsp; The first release of the SSDT Power Tools
adds Schema View to the Database Projects.&amp;nbsp; Download and install the latest version
the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/9b0228c6-15d1-44de-9279-66dde12bf861?SRC=Featured" target="_blank"&gt;SSDT
Power Tools&lt;/a&gt; to add this functionality. Continue to monitor this post and the &lt;a href="http://blogs.msdn.com/b/ssdt/archive/2012/04/02/first-release-of-ssdt-power-tools.aspx" target="_blank"&gt;SSDT
Team blog&lt;/a&gt; for further improvements.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_18.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_8.png" width="504" height="381"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Figure 7 – SSDT Power Tools Download Page&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Finally, when you reopen the SSDT, the SQL Server Data Project template is now available.&amp;nbsp;
You can now create Database Projects to manage your database artifacts with rich features
such as smart rename and schema compare.&amp;nbsp; Furthermore you can leverage these
projects to create automated builds and deployments to align with the application
source code builds and deployments.&amp;nbsp; See my previous post, &lt;a href="http://www.codesmartnothard.com/2011/10/31/ImplementingContinuousIntegrationCIAndDeliveryForSQLServerDatabases.aspx" target="_blank"&gt;Implementing
Continuous Integration (CI) and Deliveron for SQL Server Databases&lt;/a&gt; for some background
on Database Projects especially for automated deployments.
&lt;/p&gt;
&lt;p&gt;
There is one critical capability missing with this solution so far.&amp;nbsp; The Database
Projects are important for following Configuration Management (CM) practices but it
is not complete without the ability to use them with a Source Control Management (SCM)
system.&amp;nbsp; Fortunately, by being powered by Visual Studio, SSDT can be tightly
integrated with Team Foundation Server 2010 (TFS).&amp;nbsp;&amp;nbsp; TFS 2010 provides a
number of integrated ALM features including SCM and is even free to install if you
have a MSDN license.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_16.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_7.png" width="644" height="446"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Figure 8 – Create SQL Server 2012 Database Projects&lt;/strong&gt;
&lt;/p&gt;
&lt;h3&gt;Connecting to Team Foundation Server 2010
&lt;/h3&gt;
&lt;p&gt;
The Visual Studio integrated shell that powers SSDT does not include the Team Explorer
component that provides the full integration with TFS 2010.&amp;nbsp; Team Explorer is
a free download (but requires a TFS CAL, also included with your MSDN license) that
you can install to add this functionality.&amp;nbsp; Download and install &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=329" target="_blank"&gt;Team
Explorer 2010&lt;/a&gt;.&amp;nbsp; When the installation completes, you should download and
re-install the &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=23691" target="_blank"&gt;Visual
Studio 2010 SP1&lt;/a&gt; (this was automatically installed for you).&amp;nbsp; To connect to
TFS 2010, first make sure the Team Explorer view is visible.&amp;nbsp; If not go to the &lt;strong&gt;View&lt;/strong&gt; menu
and select &lt;strong&gt;Team Explorer&lt;/strong&gt;.&amp;nbsp; In the Team Explorer toolbar, select
the&lt;strong&gt; plus icon&lt;/strong&gt; highlighted below to open the Connect to Team Project
dialog and then select Servers to show you the Add/Remove Team Foundation Server dialog.
Finally, click the &lt;strong&gt;Add&lt;/strong&gt; button to create the connection to the appropriate
TFS 2010 Server.&amp;nbsp; In addition to the SCM features with TFS 2010, this includes
bug tracking, agile project management capabilities, build automation, test case management,
and more.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_20.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/6d46c5d8d5b1_12484/image_thumb_9.png" width="644" height="271"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Figure 9 – Connecting to Team Foundation Server 2010&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
I hope this provided the information you need get started using Database Projects
with SQL Server 2012.&amp;nbsp; In a future post, I’ll go into detail on how to use the
Database Projects.&amp;nbsp; If you are using the Visual Studio 2010 Professional or higher,
the same &lt;a href="http://msdn.microsoft.com/en-us/data/hh297027" target="_blank"&gt;link&lt;/a&gt; above
will install the capabilities for this.&amp;nbsp; Finally if you are using the Visual
Studio 11 beta or newer, the Database Project template for SQL Server 2012 is already
included.&amp;nbsp; You will also want to download the SSDT Power Tools.
&lt;/p&gt;
&lt;p&gt;
This was also cross posted on the &lt;a href="http://www.deliveron.com/blog/post/Configure-SQL-Server-2012-Data-Tools-for-ALM-and-TFS-Features.aspx" target="_blank"&gt;Deliveron
blog&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=bac325de-9070-4c65-ada5-28aa7dba3025" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,bac325de-9070-4c65-ada5-28aa7dba3025.aspx</comments>
      <category>ALM</category>
      <category>SQL Server 2012</category>
      <category>Team Foundation Server</category>
      <category>TFS 2010</category>
      <category>Visual Studio 2010</category>
    </item>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=2fc47af3-f779-4f8f-af1f-d3eb845ff646</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,2fc47af3-f779-4f8f-af1f-d3eb845ff646.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,2fc47af3-f779-4f8f-af1f-d3eb845ff646.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=2fc47af3-f779-4f8f-af1f-d3eb845ff646</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last Wednesday (Leap Day 2012), Microsoft made Visual Studio 11 and Team Foundation
Server 11 betas available for download.  This new version includes a number of
new ALM features such as Code Reviews, Agile Project Management Tools, IntelliTrace
in production, Unit Test multi-framework support, and many others.    
</p>
        <p>
Use download links below to begin taking advantage of the new version.  These
betas have a go-live license and will have a supported upgrade path to RTM. 
In addition the new version can be installed and run side by side with previous versions
of Visual Studio.  The VS 11 Beta can even open existing VS 2010 SP1 solutions
without upgrading the solutions allowing other developers with VS 2010 SP1 to continue
to work in the same solution.  See <a href="http://msdn.microsoft.com/en-us/library/hh266747(v=vs.110).aspx" target="_blank">Visual
Studio 11 Compatibility</a> for more details.  View <a href="http://msdn.microsoft.com/en-us/library/bb386063(v=vs.110).aspx" target="_blank">Product
Highlights for Visual Studio 11 Beta</a> for more details on everything that is included. 
</p>
        <p>
          <strong>Downloads are available here:</strong>
        </p>
        <ul>
          <li>
            <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual
Studio 11 and Team Foundation Server Betas</a> – This link provides downloads the
Visual Studio 11, TFS 11, and Express beta downloads.</li>
          <li>
            <a href="http://windows.microsoft.com/en-US/windows-8/download" target="_blank">Windows
8 Consumer Preview</a> – Not required for any of the VS 11 projects but includes the
new and innovative Metro UI.</li>
        </ul>
        <p>
In addition to the Beta downloads.  There was also a number of resources that
also launched the same day to show you how to leverage all of the features in Visual
Studio ALM 11.  
</p>
        <ul>
          <li>
            <a href="http://blogs.msdn.com/b/visualstudioalm/archive/2012/02/29/welcome-to-visual-studio-11-alm-rangers-readiness-beta-wave.aspx" target="_blank">Visual
Studio ALM Rangers Readiness Beta “Wave” of Projects</a> – The VS ALM Rangers, that
I am a part of, released number of VS ALM Rangers Projects focused real world guidance
that include the VS 11 and TFS 11 enhancements.</li>
          <li>
            <a href="http://blogs.msdn.com/b/briankel/archive/2011/09/16/visual-studio-11-application-lifecycle-management-virtual-machine-and-hands-on-labs-demo-scripts.aspx" target="_blank">Visual
Studio 11 Application Lifecycle Management Virtual Machine and Hands-on-Labs / Demo
Scripts</a> – For those of you that want to try TFS without having to install it,
this VM is a great resource to try out the features in a sandbox.  The VM includes
6 Hands on Labs for several of the new features and includes all of the data to support
them.</li>
        </ul>
        <p>
I have already started using the VS 11 beta for several projects and the new experience
and features are great (I did switch the color theme to “Dark”).  
</p>
        <p>
Mike
</p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=2fc47af3-f779-4f8f-af1f-d3eb845ff646" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Visual Studio 11 and Team Foundation Server 11 Betas are available</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,2fc47af3-f779-4f8f-af1f-d3eb845ff646.aspx</guid>
      <link>http://www.codesmartnothard.com/2012/03/04/VisualStudio11AndTeamFoundationServer11BetasAreAvailable.aspx</link>
      <pubDate>Sun, 04 Mar 2012 06:57:00 GMT</pubDate>
      <description>&lt;p&gt;
Last Wednesday (Leap Day 2012), Microsoft made Visual Studio 11 and Team Foundation
Server 11 betas available for download.&amp;nbsp; This new version includes a number of
new ALM features such as Code Reviews, Agile Project Management Tools, IntelliTrace
in production, Unit Test multi-framework support, and many others.&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Use download links below to begin taking advantage of the new version.&amp;nbsp; These
betas have a go-live license and will have a supported upgrade path to RTM.&amp;nbsp;
In addition the new version can be installed and run side by side with previous versions
of Visual Studio.&amp;nbsp; The VS 11 Beta can even open existing VS 2010 SP1 solutions
without upgrading the solutions allowing other developers with VS 2010 SP1 to continue
to work in the same solution.&amp;nbsp; See &lt;a href="http://msdn.microsoft.com/en-us/library/hh266747(v=vs.110).aspx" target="_blank"&gt;Visual
Studio 11 Compatibility&lt;/a&gt; for more details.&amp;nbsp; View &lt;a href="http://msdn.microsoft.com/en-us/library/bb386063(v=vs.110).aspx" target="_blank"&gt;Product
Highlights for Visual Studio 11 Beta&lt;/a&gt; for more details on everything that is included. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Downloads are available here:&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank"&gt;Visual
Studio 11 and Team Foundation Server Betas&lt;/a&gt; – This link provides downloads the
Visual Studio 11, TFS 11, and Express beta downloads.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://windows.microsoft.com/en-US/windows-8/download" target="_blank"&gt;Windows
8 Consumer Preview&lt;/a&gt; – Not required for any of the VS 11 projects but includes the
new and innovative Metro UI.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In addition to the Beta downloads.&amp;nbsp; There was also a number of resources that
also launched the same day to show you how to leverage all of the features in Visual
Studio ALM 11.&amp;nbsp; 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://blogs.msdn.com/b/visualstudioalm/archive/2012/02/29/welcome-to-visual-studio-11-alm-rangers-readiness-beta-wave.aspx" target="_blank"&gt;Visual
Studio ALM Rangers Readiness Beta “Wave” of Projects&lt;/a&gt; – The VS ALM Rangers, that
I am a part of, released number of VS ALM Rangers Projects focused real world guidance
that include the VS 11 and TFS 11 enhancements.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://blogs.msdn.com/b/briankel/archive/2011/09/16/visual-studio-11-application-lifecycle-management-virtual-machine-and-hands-on-labs-demo-scripts.aspx" target="_blank"&gt;Visual
Studio 11 Application Lifecycle Management Virtual Machine and Hands-on-Labs / Demo
Scripts&lt;/a&gt; – For those of you that want to try TFS without having to install it,
this VM is a great resource to try out the features in a sandbox.&amp;nbsp; The VM includes
6 Hands on Labs for several of the new features and includes all of the data to support
them.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I have already started using the VS 11 beta for several projects and the new experience
and features are great (I did switch the color theme to “Dark”).&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Mike
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=2fc47af3-f779-4f8f-af1f-d3eb845ff646" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,2fc47af3-f779-4f8f-af1f-d3eb845ff646.aspx</comments>
      <category>TFS 11</category>
      <category>Visual Studio 11</category>
    </item>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=17d25be4-b83f-4618-a07a-bcb1626c04f4</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,17d25be4-b83f-4618-a07a-bcb1626c04f4.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,17d25be4-b83f-4618-a07a-bcb1626c04f4.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=17d25be4-b83f-4618-a07a-bcb1626c04f4</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In the weeks before the 2012 MVP Summit, I had been talking to colleagues and customers
about feature requests and pain points in Team Foundation Server 2010 and Visual Studio
2010.  One the first day of the MVP Summit, I was reminded of the Visual Studio
UserVoice web site.  This is a site where anyone can submit a feature idea and
vote for existing ones.  Sign up for free and use your 10 votes to vote for your
favorite ideas and/or create your ideas. Your votes do matter!
</p>
        <p>
          <a title="http://visualstudio.uservoice.com/forums/121579-visual-studio" href="http://visualstudio.uservoice.com/forums/121579-visual-studio">http://visualstudio.uservoice.com/forums/121579-visual-studio</a>
        </p>
        <p>
I would still like to hear what you think.  Leave your favorites in the comments
below.
</p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=17d25be4-b83f-4618-a07a-bcb1626c04f4" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Visual Studio Feature Requests: Be Heard with UserVoice</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,17d25be4-b83f-4618-a07a-bcb1626c04f4.aspx</guid>
      <link>http://www.codesmartnothard.com/2012/02/29/VisualStudioFeatureRequestsBeHeardWithUserVoice.aspx</link>
      <pubDate>Wed, 29 Feb 2012 00:37:00 GMT</pubDate>
      <description>&lt;p&gt;
In the weeks before the 2012 MVP Summit, I had been talking to colleagues and customers
about feature requests and pain points in Team Foundation Server 2010 and Visual Studio
2010.&amp;nbsp; One the first day of the MVP Summit, I was reminded of the Visual Studio
UserVoice web site.&amp;nbsp; This is a site where anyone can submit a feature idea and
vote for existing ones.&amp;nbsp; Sign up for free and use your 10 votes to vote for your
favorite ideas and/or create your ideas. Your votes do matter!
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://visualstudio.uservoice.com/forums/121579-visual-studio" href="http://visualstudio.uservoice.com/forums/121579-visual-studio"&gt;http://visualstudio.uservoice.com/forums/121579-visual-studio&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I would still like to hear what you think.&amp;nbsp; Leave your favorites in the comments
below.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=17d25be4-b83f-4618-a07a-bcb1626c04f4" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,17d25be4-b83f-4618-a07a-bcb1626c04f4.aspx</comments>
      <category>ALM</category>
      <category>TFS 2010</category>
      <category>Visual Studio 2010</category>
    </item>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=ad951488-68b8-4077-a918-c0f456233e07</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,ad951488-68b8-4077-a918-c0f456233e07.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,ad951488-68b8-4077-a918-c0f456233e07.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ad951488-68b8-4077-a918-c0f456233e07</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Team Foundation Server 2010 provides functionality for testing applications with built
in support for test plan and test case management    In our Agile/Scrum
projects, we define all of the Test Cases in our planning meeting to define done for
each User Story.  When starting new projects, team members often ask is how to
format the Test Cases so they are clear.  One way we have found to be very useful
is to use the same format as found in <a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development" target="_blank">Behavior
Driven Development</a>(BDD).  BDD uses a format for communicating Test Cases
called Gherkin.  The Gherkin format follows the pattern below:
</p>
        <p align="center">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/image_thumb.png" width="240" height="124" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 1 – Given, When, and Then definition</strong>
        </p>
        <p>
Just like the User Story format (As a [user], I want to be able to do [business process],
so that [business value]), we have found the Gherkin format is very useful for teams
learning Agile.  In fact, these Test Cases can be written for Acceptance/Functional
tests and for Unit Tests.  When we work with customers and our own projects we
install our customized Deliveron Agile Process Template as part of the Deliveron Agile
Delivery Process.  The Deliveron Agile Process Template is a slightly customized
version of the MSF for Agile 5.0 process template.  In the Test Case work item,
we have added fields for Given, When, and Then.  The “Then” should also match
the expected result in the test steps.
</p>
        <p align="center">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/SNAGHTML3f2b686e.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML3f2b686e" border="0" alt="SNAGHTML3f2b686e" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/SNAGHTML3f2b686e_thumb.png" width="640" height="158" />
          </a>
          <br />
          <strong>Figure 2 – BDD additions for TFS Test Case Work Item</strong>
        </p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/image_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/image_thumb_1.png" width="644" height="37" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 3 – Expected result matches the “Then”</strong>
        </p>
        <p align="left">
Customizing the TFS Test Case Work Item Templates (WIT)  to add these fields
is straight forward.  Follow the steps in this <a href="http://www.codesmartnothard.com/2009/11/27/StepsToModifyAWorkItemTemplateInTeamFoundationServer2008.aspx" target="_blank">post</a> I
did a couple years ago.  It was for TFS 2008 but the steps are the same in TFS
2010.
</p>
        <p align="left">
In summary, use Test Cases to define done of the User Story and use BDD and Gherkin
for the language of the Test Case.  Feel free to contact us if you have any questions
about these changes or about the Deliveron Agile Delivery Process.
</p>
        <p>
This has also be cross posted at <a title="http://www.deliveron.com/blog/post/Adding-BDD-to-the-TFS-2010-Test-Case.aspx" href="http://www.deliveron.com/blog/post/Adding-BDD-to-the-TFS-2010-Test-Case.aspx">http://www.deliveron.com/blog/post/Adding-BDD-to-the-TFS-2010-Test-Case.aspx</a></p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=ad951488-68b8-4077-a918-c0f456233e07" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Adding BDD to TFS 2010 Test Cases</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,ad951488-68b8-4077-a918-c0f456233e07.aspx</guid>
      <link>http://www.codesmartnothard.com/2011/12/13/AddingBDDToTFS2010TestCases.aspx</link>
      <pubDate>Tue, 13 Dec 2011 09:33:00 GMT</pubDate>
      <description>&lt;p&gt;
Team Foundation Server 2010 provides functionality for testing applications with built
in support for test plan and test case management&amp;nbsp;&amp;nbsp;&amp;nbsp; In our Agile/Scrum
projects, we define all of the Test Cases in our planning meeting to define done for
each User Story.&amp;nbsp; When starting new projects, team members often ask is how to
format the Test Cases so they are clear.&amp;nbsp; One way we have found to be very useful
is to use the same format as found in &lt;a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development" target="_blank"&gt;Behavior
Driven Development&lt;/a&gt;(BDD).&amp;nbsp; BDD uses a format for communicating Test Cases
called Gherkin.&amp;nbsp; The Gherkin format follows the pattern below:
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/image_thumb.png" width="240" height="124"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 1 – Given, When, and Then definition&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Just like the User Story format (As a [user], I want to be able to do [business process],
so that [business value]), we have found the Gherkin format is very useful for teams
learning Agile.&amp;nbsp; In fact, these Test Cases can be written for Acceptance/Functional
tests and for Unit Tests.&amp;nbsp; When we work with customers and our own projects we
install our customized Deliveron Agile Process Template as part of the Deliveron Agile
Delivery Process.&amp;nbsp; The Deliveron Agile Process Template is a slightly customized
version of the MSF for Agile 5.0 process template.&amp;nbsp; In the Test Case work item,
we have added fields for Given, When, and Then.&amp;nbsp; The “Then” should also match
the expected result in the test steps.
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/SNAGHTML3f2b686e.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML3f2b686e" border="0" alt="SNAGHTML3f2b686e" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/SNAGHTML3f2b686e_thumb.png" width="640" height="158"&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;strong&gt;Figure 2 – BDD additions for TFS Test Case Work Item&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Adding-a-little-BDD-to-TFS-Test-Case_CFAB/image_thumb_1.png" width="644" height="37"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 3 – Expected result matches the “Then”&lt;/strong&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
Customizing the TFS Test Case Work Item Templates (WIT)&amp;nbsp; to add these fields
is straight forward.&amp;nbsp; Follow the steps in this &lt;a href="http://www.codesmartnothard.com/2009/11/27/StepsToModifyAWorkItemTemplateInTeamFoundationServer2008.aspx" target="_blank"&gt;post&lt;/a&gt; I
did a couple years ago.&amp;nbsp; It was for TFS 2008 but the steps are the same in TFS
2010.
&lt;/p&gt;
&lt;p align="left"&gt;
In summary, use Test Cases to define done of the User Story and use BDD and Gherkin
for the language of the Test Case.&amp;nbsp; Feel free to contact us if you have any questions
about these changes or about the Deliveron Agile Delivery Process.
&lt;/p&gt;
&lt;p&gt;
This has also be cross posted at &lt;a title="http://www.deliveron.com/blog/post/Adding-BDD-to-the-TFS-2010-Test-Case.aspx" href="http://www.deliveron.com/blog/post/Adding-BDD-to-the-TFS-2010-Test-Case.aspx"&gt;http://www.deliveron.com/blog/post/Adding-BDD-to-the-TFS-2010-Test-Case.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=ad951488-68b8-4077-a918-c0f456233e07" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,ad951488-68b8-4077-a918-c0f456233e07.aspx</comments>
      <category>Agile</category>
      <category>ALM</category>
      <category>Test Case Management</category>
      <category>TFS 2010</category>
    </item>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=3448c757-600c-476a-9b69-2bf87b8d74aa</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,3448c757-600c-476a-9b69-2bf87b8d74aa.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,3448c757-600c-476a-9b69-2bf87b8d74aa.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=3448c757-600c-476a-9b69-2bf87b8d74aa</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="2">I recently worked with a client to create a fairly comprehensive solution
for implementing Continuous Integration and Delivery for SQL Server Databases using
Visual Studio 2010 Database Projects.  I had the opportunity to give a talk on
the project at SQL Saturday in Omaha.  The presentation is <a href="http://www.sqlsaturday.com/viewsession.aspx?sat=91&amp;sessionid=5537" target="_blank">here</a> if
you want the slides.  I think there is some context missing with the slides alone
so I wanted to do this post to further explain the solution.</font>
        </p>
        <p>
          <font size="2">Before talking about the solution, let me describe three different
continuous processes.  Continuous Integration (CI) is most familiar and is often
used to describe all three of these processes.  I think the differences between
these three processes is more clear by using these terms.</font>
        </p>
        <p>
 
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb.png" width="240" height="90" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 1 – Continuous Processes</strong>
        </p>
        <p>
          <font size="2">
            <strong>Continuous Integration</strong> – Verifying code quality by
compiling and running unit tests on the build server when a developer checks in changes. 
Often abbreviated as CI.</font>
        </p>
        <p>
          <font size="2">
            <strong>Continuous Delivery</strong> – Adds the deployment of the application
and database to an isolated test environment where additional integrated and UI automated
tests can be run.  </font>
        </p>
        <p>
          <font size="2">
            <strong>Continuous Deployment</strong> – Includes automated deployment
of the application through each environment through production.</font>
        </p>
        <p>
          <font size="2">In this post I will primary review our solution for CI and Continuous
Delivery.  This works lays the foundation for the deployment into Staging and
Production but I will discuss this in a future post.</font>
        </p>
        <h3>Database Projects
</h3>
        <p>
          <font size="2">Database tools in the past have been different than the tools used
application code development.  These database tools have been difficult to implement
change management practices and Application Lifecycle Management (ALM) practices. 
Today there is an increasingly amount of application developers managing database
changes.   These are some of the reasons that have led to need for a tool
like Visual Studio Database Projects (DBPro for short).  This tool is part of
Visual Studio 2010 (Premium and higher).  To create a Visual Studio Database
Project, select SQL Server from the process template menu and then choose SQL Server
2008 Wizard or SQL Server 2008 Database Project. </font>
        </p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_28.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_13.png" width="504" height="350" />
          </a>
        </p>
        <p align="center">
          <strong>
            <font size="1">Figure 2 – SQL Server Database Project Templates in Visual
Studio 2010</font>
          </strong>
        </p>
        <p>
          <font size="2">
          </font>
        </p>
        <p>
          <font size="2">The primary purpose of the Database Projects are to manage the the
version control of database objects in SQL Server databases. The solution we established
utilizes this and many of the features of DBPro including TFS Build Integration, Data
Generation, Database Unit Testing, Static Code Analysis, and Database and Data Deployments. 
In this post I’m not going to cover how to use all of these features but focus on
how to implement the features for Continuous Integration, Delivery and Deployment
processes.  For more information, please take a look at the Visual Studio ALM
Rangers </font>
          <a href="http://vsdatabaseguide.codeplex.com/" target="_blank">
            <font size="2">Visual
Studio Database Guide</font>
          </a>
          <font size="2">.  This solution is complimentary
to the guide and goes into more more specifics for CI.</font>
        </p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_1.png" width="450" height="306" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 3 – Visual Studio Database Guide</strong>
        </p>
        <h4 align="left">Challenges
</h4>
        <p align="left">
          <font size="2">Visual Studio Database Projects are a great tool and I highly recommend
teams utilize these for managing version control for the SQL Server Databases. 
However, successfully using Database Projects can be challenging.</font>
          <font size="2"> 
I believe the benefits greatly out weigh the challenges but it is important for the
team to be aware of these for a successful implementation.</font>
        </p>
        <p align="left">
          <font size="2">
            <strong>Visual Studio</strong> – Visual Studio probably seems like
an odd challenge considering this is the tool to use for the solution, however Visual
Studio is a beast.  Visual Studio has become everything development.  Developers
are used to Visual Studio and I have seen DBAs and other database professions get
frustrated using it when they first start.  Stay with it.  It will get easier
and is the future direction of Microsoft in SQL Server 2012.  From what I have
seen SQL Server Management Studio 2012 is based on Visual Studio.</font>
        </p>
        <p align="left">
          <font size="2">
            <strong>“Truth Center” Shift</strong> – Development teams have been
used to using a shared database server and making changes directly on server since
the stone age.  Managing source control of the database in DBPro essentially
changes the “truth center” of the database project to DBPro.  Changes to the
schema should be made in DBPro and then executed or deployed from DBPro to the shared
server.  Development can also be done in local sandbox called offline schema
development where the developer can make the changes locally and check them in. 
Changes made directly to the shared SQL Server database risk being overwritten by
the next deployment from DBPro.</font>
        </p>
        <p align="left">
          <font size="2">
            <strong>Permissions</strong> – I have found DBPro does a great job
managing almost all of the artifacts for databases.  The biggest challenge and
frustration has been permissions.  The problem is that the database project holds
the specific version of the database.  For permissions this doesn’t work in most
real world examples because permissions change in each environment.  For examples,
developers need different permissions in development versus what they need in production. 
In addition, many enterprises use a separate domain for each environment.  As
shown in <strong>Figure 4</strong> below, Database Roles for the most part are consistent
between environments and primarily the users and their role membership in those roles
will vary.  The best method I found for handling these permission differences
is to exclude them altogether.  Use the following steps to handle permissions
when importing the schema and adding new objects to the project.  One advantage
of removing the users is that that they are normally connected to a login and the
login lives outside of the database in the Master database.  Including the users
and logins in the project requires an additional project called SQL Server Server
Project that contains the Master database.  This solution does not require a
SQL Server Server Project.</font>
        </p>
        <p align="left">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_14.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_6.png" width="404" height="209" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 4 – Managing Permissions Across Environments</strong>
        </p>
        <p align="left">
          <strong>
            <font size="2">Importing Databases </font>
          </strong>
        </p>
        <p align="left">
          <font size="2">When using the importing the schema and objects into your project,
make sure you perform the following steps to first import all of the permissions and
the remove those that will change in different events.</font>
        </p>
        <ul>
          <li>
            <div align="left">
              <font size="2">Enable Import permissions in the Import Wizard to
import all of the permissions including Roles, Users, and Role Membership.</font>
            </div>
          </li>
          <li>
            <div align="left">
              <font size="2">After Import has completed:</font>
            </div>
            <ul>
              <li>
                <div align="left">
                  <font size="2">Role permissions are to be kept in the .sqlpermissions
file. </font>
                </div>
              </li>
              <li>
                <div align="left">
                  <font size="2">Schema Users (without login) are to be kept. </font>
                </div>
              </li>
              <li>
                <div align="left">
                  <font size="2">The other users must be removed</font>
                </div>
                <ul>
                  <li>
                    <div align="left">
                      <font size="2">from sqlpermissions </font>
                    </div>
                  </li>
                  <li>
                    <div align="left">
                      <font size="2">From Security\Users </font>
                    </div>
                  </li>
                  <li>
                    <div align="left">
                      <font size="2">From RoleMemberships </font>
                    </div>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
        </ul>
        <p align="left">
          <font size="2">
            <strong>Adding New Objects</strong>
          </font>
        </p>
        <p align="left">
          <font size="2">When adding new objects in the Database Project </font>
        </p>
        <ul>
          <li>
            <div align="left">
              <font size="2">Use Schema View</font>
            </div>
          </li>
          <li>
            <div align="left">
              <font size="2">Manually modify the Properties\Database.sqlpermissions
and add the new permission</font>
            </div>
            <ul>
              <li>
                <div align="left">
                  <font size="2">EX: Grant Execute to Role for Stored Procedures 
<permissionstatement action="GRANT"><permission>
EXECUTE
</permission><grantee>
TestRole
</grantee></permissionstatement></font>
                </div>
              </li>
            </ul>
          </li>
        </ul>
        <blockquote>
          <pre class="csharpcode">
            <span class="kwrd">&lt;</span>
            <span class="html">PermissionStatement</span>
            <span class="attr">Action</span>
            <span class="kwrd">="GRANT"</span>
            <span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span>
            <span class="html">Permission</span>
            <span class="kwrd">&gt;</span>EXECUTE<span class="kwrd">&lt;/</span><span class="html">Permission</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">Grantee</span><span class="kwrd">&gt;</span>TestRole<span class="kwrd">&lt;/</span><span class="html">Grantee</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">Object</span><span class="attr">Name</span><span class="kwrd">="spTestFromSSMS2"</span><span class="attr">Schema</span><span class="kwrd">="dbo"</span><span class="attr">Type</span><span class="kwrd">="OBJECT"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">Grantor</span><span class="kwrd">&gt;</span>dbo<span class="kwrd">&lt;/</span><span class="html">Grantor</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;/</span><span class="html">PermissionStatement</span><span class="kwrd">&gt;</span></pre>
        </blockquote>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <h4 align="left">
          <font size="2">Permission Scripts</font>
        </h4>
        <p align="left">
          <font size="2">By removing the permissions from the project, there needs to be a place
to account for these.  This solution accomplishes this by creating a script in
the Scripts folder for environment that essentially creates the logins, users, and
assigns the role membership for each user.  This allows the flexibility to store
any variations between the environments and still store these in the database project
and in source control.  Do not set the Build Action to PostDeploy because you
can only have one for each project and it will be combined with the Deployment script.  
Instead set the “Copy to Output Directory” property on the script to “Copy Always”. 
This will create an Scripts folder and the permission files in the build output directory
so it can be called by the deployment scripts.</font>
        </p>
        <h4 align="left">Source Control
</h4>
        <p align="left">
          <font size="2">The primary benefit for using the Database Projects is that all of
the database changes can be managed in source control.  There are a lot of ways
to organize your source control and with branching and merging this can become complex
to manage.  I like to take a pragmatic approach to source control and keep things
simple but allow for complexity if needed in the future.  The <a href="http://tfsbranchingguideiii.codeplex.com/" target="_blank">Visual
Studio TFS Branching Build 2010</a> is a great reference for adopting branching and
merging strategy.  For this post I want to simply show the relationships between
Production, Development, and Work Orders.  The main points is that the database
projects should be branched and merged along side the application source control with
some sort of release branch that has the current production version.  The Work
Order branch is for production support changes that will be made into production. 
Development teams should do downward merges often to always have any work order changes
incorporated early.  When the application and database changes are deployed to
production, the development branch should be merged up to the Production branch. 
The diagrams below show how this is organized from a logic view and physical view.</font>
        </p>
        <p align="left">
          <font size="2">
            <strong>Logical View</strong>
          </font>
        </p>
        <p align="center">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_30.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_14.png" width="400" height="238" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 5 – Logical View of the Database Project Source Control Branches</strong>
        </p>
        <p align="left">
 
</p>
        <p align="left">
          <strong>
            <font size="2">Physical view</font>
          </strong>
        </p>
        <p align="left">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_32.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_15.png" width="400" height="248" />
          </a>
        </p>
        <h3 align="left">
        </h3>
        <p align="center">
          <strong>Figure 6 – Physical View of the Database Project Source Control Branches</strong>
        </p>
        <h4 align="left">Continuous Integration (CI)
</h4>
        <p align="left">
          <font size="2">To setup the most basic CI process for your Database projects, you
can simply add the Solutions containing the database projects to your CI build that
is building your application code.  The benefit of this is that it will build
your database projects and validate that there are no schema errors and can validate
any static code analysis rules.</font>
        </p>
        <h4 align="left">Continuous Delivery
</h4>
        <p align="left">
          <font size="2">For Continuous Delivery, we want to expand the process to include deploying
the database, insert any test data we need, and then run the database unit tests. 
This adds validation that the schema in source control can correctly build the database
and that stored procedures can pass any number of validations with the unit tests. 
These steps would look like the following:</font>
        </p>
        <p align="left">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_6.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_2.png" width="200" height="262" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 7 – Simple Continuous Delivery Process</strong>
        </p>
        <p align="left">
          <font size="2">Visual Studio Database projects make implementing this process very
simple and only requires a couple simple settings.  The dialog below shows the
out of the box settings.  To open this dialog, select Test &gt; Test Configuration
from the menu.   The sections are slightly out of order.  To start
we want to set the Deployment database project to the project we want to deploy. 
Next choose the configuration.  The configuration settings in the database project
will specify the target connection string and other deployment properties.  Next,
the Database state setting will generate the test data for the unit tests by running
one of the data generation plans.</font>
        </p>
        <p align="left">
 
</p>
        <p align="left">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_8.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_3.png" width="454" height="569" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 8 – Database Test Settings</strong>
        </p>
        <h4 align="left">Types of Continuous Delivery
</h4>
        <p align="left">
          <font size="2">The example above basically deploys the current version of the schema
to the target but doesn’t is not a good practice run into production.  
It basically deploys the changes from the last deployment.  My goal of the Continuous
Delivery process should be a practice run into production and essentially deploy the
application and database the way it will be done for the production deployment.  
There are two types of delivery based on whether or not the application is already
in production.  For new systems that haven’t been deployed to production, the
deployment will be to deploy all of the schema.  This is referred to as <strong>Greenfield</strong>. 
For existing systems, the schema will the difference of what is currently in production
with what has been developed.  This is referred to as <strong>Brownfield</strong> deployments.</font>
        </p>
        <p align="left">
          <font size="2">From a Visual Studio Database Project standpoint, Greenfield deployments
are a simple using the deploy option.  This will drop the database and execute
the full schema script to create the database.</font>
        </p>
        <p align="left">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_10.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_4.png" width="404" height="82" />
          </a>
        </p>
        <p align="center">
          <strong>
            <font size="1">Figure 9 – Greenfield Process</font>
          </strong>
        </p>
        <p align="left">
          <font size="2">For Brownfield deployments in Visual Studio Database Projects, the
process is accomplished in two steps using Production and Development versions of
the database projects.  The first step is to use the Production version of the
Database Project to create the full CREATE script.  Next, use the compare feature
to compare the Production and Development versions to create the DELTA script. 
Again, the key is not to compare the development against the live production database
but to use the version of the Database Project that was created either from the production
database or from the Release branch in source control.  Once you have these two
database scripts, run the CREATE script to drop the database and create the database
to the production level.  Then execute DELTA script to bring it to the current
development level.  From there you can follow the similar steps to execute the
data generation plan and automated tests to complete.  See below to see how this
fits together </font>
        </p>
        <p align="left">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_12.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_5.png" width="404" height="212" />
          </a>
        </p>
        <p align="center">
          <strong>
            <font size="1">Figure 10 – Brownfield Process</font>
          </strong>
        </p>
        <p align="left">
          <font size="2">Putting this all together, here are the steps in order for a good SQL
Server database Continuous Delivery process.  There is some customization that
has to be done for this.  The database testing options that were available for
the simple process, won’t work out of the box for this solution.  This is because
the Database Project doesn’t know about the production and delta scripts.  The
build by default would create the database and run the data generation plan before
unit tests including the database unit tests.  However, the unit tests are run
immediately after the application is built and we need to specify the a step to build
create the scripts and then execute them.  I customized the build definition
by moving the unit test execution activities to later in the process so I could execute
the SQL scripts before the Unit Tests are run.  Once this was moved, I could
use the built in features to run the data generation plan.  Below are the steps
for the full end to end Database Continuous Delivery process.</font>
        </p>
        <h3 align="left">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_24.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_11.png" width="200" height="338" />
          </a>
        </h3>
        <p align="center">
          <font size="1">
            <strong>Figure 11 – End to End Database Continuous Delivery Process</strong>
          </font>
        </p>
        <p align="left">
          <font size="2">To combine this process into the application continuous delivery process,
the same tasks above can executed along with the application steps.  This process
is grouped into three groups: Build/Stage, Deploy, and Execute Automated Tests. 
The process is outlined below.</font>
        </p>
        <h3 align="left">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_26.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_12.png" width="500" height="312" />
          </a>
        </h3>
        <p align="center">
          <strong>Figure 12 – End to End Application and Database Continuous Delivery Process</strong>
        </p>
        <h3 align="left"> 
</h3>
        <h3 align="left"> 
</h3>
        <h3 align="left">VSDBCMD
</h3>
        <p>
          <font size="2">One of the great features of Visual Studio Database Projects is that
the deployment and compare functionality can be executed via a command line utility
called VSDBCMD.exe.  This allows us to perform the necessary steps in our Continuous
Delivery process.  I utilize a InvokeProcess Activity in the build definition
to call a PowerShell script to execute the VSDBCMD commands.  Below are examples
of how to create the Production CREATE script and the DELTA script.  The Production
Script creates the full CREATE script from the compiled Production version of the
Database Project.  The DELTA command shows how to compare two Database Projects
to generate the DELTA SQL Script.</font>
        </p>
        <p>
 
</p>
        <p>
          <strong>
            <font size="2">Create Production Script</font>
          </strong>
        </p>
        <blockquote>
          <pre class="csharpcode">&amp; <span class="str">"C:\program files (x86)\Microsoft
Visual Studio 10.0\VSTSDB\Deploy\vsdbcmd.exe"</span></pre>
          <pre class="csharpcode">/a:deploy /dsp:sql /model:Ecommerce.dbschema /DeploymentScriptFile:c:\temp\OutputFilename2.sql </pre>
          <pre class="csharpcode">/p:TargetDatabase=<span class="str">"NewEcommerce"</span></pre>
          <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        </blockquote>
        <p>
  
</p>
        <p>
          <strong>
            <font size="2">Create Production and Development Delta Script</font>
          </strong>
        </p>
        <blockquote>
          <pre class="csharpcode">&amp; <span class="str">"C:\program files (x86)\Microsoft
Visual Studio 10.0\VSTSDB\Deploy\vsdbcmd.exe"</span></pre>
          <pre class="csharpcode">/a:deploy /dsp:sql /model:Ecommerce.dbschema /DeploymentScriptFile:c:\temp\OutputFilename2.sql </pre>
          <pre class="csharpcode">/targetmodelfile:<span class="str">"C:\tfs\deliveron\Production\EcommerceSolution\Ecommerce\obj\Debug\ecommerce.dbschema"</span></pre>
          <pre class="csharpcode">/p:TargetDatabase=<span class="str">"NewEcommerce"</span></pre>
        </blockquote>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <h3 align="left"> 
</h3>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <h3 align="left">In Summary
</h3>
        <p align="left">
          <font size="2">This concludes the overview of the solution for Continuous Integration
and Delivery for SQL Server Databases.  I hope it gives you a complete overview
for creating your own Continuous Delivery process.  Feel free to contact me if
you have any questions or comments.</font>
        </p>
        <p align="left">
          <font size="2">
            <strong>Review of Key Concepts</strong>
          </font>
        </p>
        <ul>
          <li>
            <div align="left">
              <font size="2">There are three types of Continuous processes: Integration,
Delivery, and Deployment.</font>
            </div>
          </li>
          <li>
            <div align="left">
              <font size="2">Continuous Delivery should be set up to be a practice
run for Production.</font>
            </div>
          </li>
          <li>
            <div align="left">
              <font size="2">Create compare scripts between development and production
database projects and don’t compare against live databases.</font>
            </div>
          </li>
          <li>
            <div align="left">
              <font size="2">VSDBCMD is a command line utility that perform the
deployment and compare functionality in Visual Studio Database Projects.</font>
            </div>
          </li>
        </ul>
        <p>
This was also cross posted at <a title="http://www.deliveron.com/blog/post/Implementing-Continuous-Integration-(CI)-and-Delivery-for-SQL-Server-Databases.aspx" href="http://www.deliveron.com/blog/post/Implementing-Continuous-Integration-(CI)-and-Delivery-for-SQL-Server-Databases.aspx">http://www.deliveron.com/blog/post/Implementing-Continuous-Integration-(CI)-and-Delivery-for-SQL-Server-Databases.aspx</a></p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=3448c757-600c-476a-9b69-2bf87b8d74aa" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Implementing Continuous Integration (CI) and Delivery for SQL Server Databases</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,3448c757-600c-476a-9b69-2bf87b8d74aa.aspx</guid>
      <link>http://www.codesmartnothard.com/2011/10/31/ImplementingContinuousIntegrationCIAndDeliveryForSQLServerDatabases.aspx</link>
      <pubDate>Mon, 31 Oct 2011 07:52:00 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font size="2"&gt;I recently worked with a client to create a fairly comprehensive solution
for implementing Continuous Integration and Delivery for SQL Server Databases using
Visual Studio 2010 Database Projects.&amp;nbsp; I had the opportunity to give a talk on
the project at SQL Saturday in Omaha.&amp;nbsp; The presentation is &lt;a href="http://www.sqlsaturday.com/viewsession.aspx?sat=91&amp;amp;sessionid=5537" target="_blank"&gt;here&lt;/a&gt; if
you want the slides.&amp;nbsp; I think there is some context missing with the slides alone
so I wanted to do this post to further explain the solution.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;Before talking about the solution, let me describe three different
continuous processes.&amp;nbsp; Continuous Integration (CI) is most familiar and is often
used to describe all three of these processes.&amp;nbsp; I think the differences between
these three processes is more clear by using these terms.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb.png" width="240" height="90"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 1 – Continuous Processes&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;&lt;strong&gt;Continuous Integration&lt;/strong&gt; – Verifying code quality by
compiling and running unit tests on the build server when a developer checks in changes.&amp;nbsp;
Often abbreviated as CI.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;&lt;strong&gt;Continuous Delivery&lt;/strong&gt; – Adds the deployment of the application
and database to an isolated test environment where additional integrated and UI automated
tests can be run.&amp;nbsp; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;&lt;strong&gt;Continuous Deployment&lt;/strong&gt; – Includes automated deployment
of the application through each environment through production.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;In this post I will primary review our solution for CI and Continuous
Delivery.&amp;nbsp; This works lays the foundation for the deployment into Staging and
Production but I will discuss this in a future post.&lt;/font&gt;
&lt;/p&gt;
&lt;h3&gt;Database Projects
&lt;/h3&gt;
&lt;p&gt;
&lt;font size="2"&gt;Database tools in the past have been different than the tools used
application code development.&amp;nbsp; These database tools have been difficult to implement
change management practices and Application Lifecycle Management (ALM) practices.&amp;nbsp;
Today there is an increasingly amount of application developers managing database
changes.&amp;nbsp;&amp;nbsp; These are some of the reasons that have led to need for a tool
like Visual Studio Database Projects (DBPro for short).&amp;nbsp; This tool is part of
Visual Studio 2010 (Premium and higher).&amp;nbsp; To create a Visual Studio Database
Project, select SQL Server from the process template menu and then choose SQL Server
2008 Wizard or SQL Server 2008 Database Project. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_28.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_13.png" width="504" height="350"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;&lt;font size="1"&gt;Figure 2 – SQL Server Database Project Templates in Visual
Studio 2010&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;The primary purpose of the Database Projects are to manage the the
version control of database objects in SQL Server databases. The solution we established
utilizes this and many of the features of DBPro including TFS Build Integration, Data
Generation, Database Unit Testing, Static Code Analysis, and Database and Data Deployments.&amp;nbsp;
In this post I’m not going to cover how to use all of these features but focus on
how to implement the features for Continuous Integration, Delivery and Deployment
processes.&amp;nbsp; For more information, please take a look at the Visual Studio ALM
Rangers &lt;/font&gt;&lt;a href="http://vsdatabaseguide.codeplex.com/" target="_blank"&gt;&lt;font size="2"&gt;Visual
Studio Database Guide&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;.&amp;nbsp; This solution is complimentary
to the guide and goes into more more specifics for CI.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_1.png" width="450" height="306"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 3 – Visual Studio Database Guide&lt;/strong&gt;
&lt;/p&gt;
&lt;h4 align="left"&gt;Challenges
&lt;/h4&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;Visual Studio Database Projects are a great tool and I highly recommend
teams utilize these for managing version control for the SQL Server Databases.&amp;nbsp;
However, successfully using Database Projects can be challenging.&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;
I believe the benefits greatly out weigh the challenges but it is important for the
team to be aware of these for a successful implementation.&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;&lt;strong&gt;Visual Studio&lt;/strong&gt; – Visual Studio probably seems like
an odd challenge considering this is the tool to use for the solution, however Visual
Studio is a beast.&amp;nbsp; Visual Studio has become everything development.&amp;nbsp; Developers
are used to Visual Studio and I have seen DBAs and other database professions get
frustrated using it when they first start.&amp;nbsp; Stay with it.&amp;nbsp; It will get easier
and is the future direction of Microsoft in SQL Server 2012.&amp;nbsp; From what I have
seen SQL Server Management Studio 2012 is based on Visual Studio.&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;&lt;strong&gt;“Truth Center” Shift&lt;/strong&gt; – Development teams have been
used to using a shared database server and making changes directly on server since
the stone age.&amp;nbsp; Managing source control of the database in DBPro essentially
changes the “truth center” of the database project to DBPro.&amp;nbsp; Changes to the
schema should be made in DBPro and then executed or deployed from DBPro to the shared
server.&amp;nbsp; Development can also be done in local sandbox called offline schema
development where the developer can make the changes locally and check them in.&amp;nbsp;
Changes made directly to the shared SQL Server database risk being overwritten by
the next deployment from DBPro.&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;&lt;strong&gt;Permissions&lt;/strong&gt; – I have found DBPro does a great job
managing almost all of the artifacts for databases.&amp;nbsp; The biggest challenge and
frustration has been permissions.&amp;nbsp; The problem is that the database project holds
the specific version of the database.&amp;nbsp; For permissions this doesn’t work in most
real world examples because permissions change in each environment.&amp;nbsp; For examples,
developers need different permissions in development versus what they need in production.&amp;nbsp;
In addition, many enterprises use a separate domain for each environment.&amp;nbsp; As
shown in &lt;strong&gt;Figure 4&lt;/strong&gt; below, Database Roles for the most part are consistent
between environments and primarily the users and their role membership in those roles
will vary.&amp;nbsp; The best method I found for handling these permission differences
is to exclude them altogether.&amp;nbsp; Use the following steps to handle permissions
when importing the schema and adding new objects to the project.&amp;nbsp; One advantage
of removing the users is that that they are normally connected to a login and the
login lives outside of the database in the Master database.&amp;nbsp; Including the users
and logins in the project requires an additional project called SQL Server Server
Project that contains the Master database.&amp;nbsp; This solution does not require a
SQL Server Server Project.&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_6.png" width="404" height="209"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 4 – Managing Permissions Across Environments&lt;/strong&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;strong&gt;&lt;font size="2"&gt;Importing Databases &lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;When using the importing the schema and objects into your project,
make sure you perform the following steps to first import all of the permissions and
the remove those that will change in different events.&lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;Enable Import permissions in the Import Wizard to
import all of the permissions including Roles, Users, and Role Membership.&lt;/font&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;After Import has completed:&lt;/font&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;Role permissions are to be kept in the .sqlpermissions
file. &lt;/font&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;Schema Users (without login) are to be kept. &lt;/font&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;The other users must be removed&lt;/font&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;from sqlpermissions &lt;/font&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;From Security\Users &lt;/font&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;From RoleMemberships &lt;/font&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;&lt;strong&gt;Adding New Objects&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;When adding new objects in the Database Project &lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;Use Schema View&lt;/font&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;Manually modify the Properties\Database.sqlpermissions
and add the new permission&lt;/font&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;EX: Grant Execute to Role for Stored Procedures 
&lt;permissionstatement action="GRANT"&gt;
&lt;permission&gt;
EXECUTE
&lt;/permission&gt;
&lt;grantee&gt;
TestRole
&lt;/grantee&gt;
&lt;/font&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;&lt;pre class="csharpcode"&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;PermissionStatement&lt;/span&gt; &lt;span class="attr"&gt;Action&lt;/span&gt;&lt;span class="kwrd"&gt;="GRANT"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Permission&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;EXECUTE&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Permission&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grantee&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;TestRole&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grantee&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Object&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="spTestFromSSMS2"&lt;/span&gt; &lt;span class="attr"&gt;Schema&lt;/span&gt;&lt;span class="kwrd"&gt;="dbo"&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;="OBJECT"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grantor&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;dbo&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grantor&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;PermissionStatement&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt; &lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;h4 align="left"&gt;&lt;font size="2"&gt;Permission Scripts&lt;/font&gt;
&lt;/h4&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;By removing the permissions from the project, there needs to be a place
to account for these.&amp;nbsp; This solution accomplishes this by creating a script in
the Scripts folder for environment that essentially creates the logins, users, and
assigns the role membership for each user.&amp;nbsp; This allows the flexibility to store
any variations between the environments and still store these in the database project
and in source control.&amp;nbsp; Do not set the Build Action to PostDeploy because you
can only have one for each project and it will be combined with the Deployment script.&amp;nbsp;&amp;nbsp;
Instead set the “Copy to Output Directory” property on the script to “Copy Always”.&amp;nbsp;
This will create an Scripts folder and the permission files in the build output directory
so it can be called by the deployment scripts.&lt;/font&gt;
&lt;/p&gt;
&lt;h4 align="left"&gt;Source Control
&lt;/h4&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;The primary benefit for using the Database Projects is that all of
the database changes can be managed in source control.&amp;nbsp; There are a lot of ways
to organize your source control and with branching and merging this can become complex
to manage.&amp;nbsp; I like to take a pragmatic approach to source control and keep things
simple but allow for complexity if needed in the future.&amp;nbsp; The &lt;a href="http://tfsbranchingguideiii.codeplex.com/" target="_blank"&gt;Visual
Studio TFS Branching Build 2010&lt;/a&gt; is a great reference for adopting branching and
merging strategy.&amp;nbsp; For this post I want to simply show the relationships between
Production, Development, and Work Orders.&amp;nbsp; The main points is that the database
projects should be branched and merged along side the application source control with
some sort of release branch that has the current production version.&amp;nbsp; The Work
Order branch is for production support changes that will be made into production.&amp;nbsp;
Development teams should do downward merges often to always have any work order changes
incorporated early.&amp;nbsp; When the application and database changes are deployed to
production, the development branch should be merged up to the Production branch.&amp;nbsp;
The diagrams below show how this is organized from a logic view and physical view.&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;&lt;strong&gt;Logical View&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_30.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_14.png" width="400" height="238"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 5 – Logical View of the Database Project Source Control Branches&lt;/strong&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;strong&gt;&lt;font size="2"&gt;Physical view&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_32.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_15.png" width="400" height="248"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h3 align="left"&gt;
&lt;/h3&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 6 – Physical View of the Database Project Source Control Branches&lt;/strong&gt;
&lt;/p&gt;
&lt;h4 align="left"&gt;Continuous Integration (CI)
&lt;/h4&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;To setup the most basic CI process for your Database projects, you
can simply add the Solutions containing the database projects to your CI build that
is building your application code.&amp;nbsp; The benefit of this is that it will build
your database projects and validate that there are no schema errors and can validate
any static code analysis rules.&lt;/font&gt;
&lt;/p&gt;
&lt;h4 align="left"&gt;Continuous Delivery
&lt;/h4&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;For Continuous Delivery, we want to expand the process to include deploying
the database, insert any test data we need, and then run the database unit tests.&amp;nbsp;
This adds validation that the schema in source control can correctly build the database
and that stored procedures can pass any number of validations with the unit tests.&amp;nbsp;
These steps would look like the following:&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_2.png" width="200" height="262"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 7 – Simple Continuous Delivery Process&lt;/strong&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;Visual Studio Database projects make implementing this process very
simple and only requires a couple simple settings.&amp;nbsp; The dialog below shows the
out of the box settings.&amp;nbsp; To open this dialog, select Test &amp;gt; Test Configuration
from the menu.&amp;nbsp;&amp;nbsp; The sections are slightly out of order.&amp;nbsp; To start
we want to set the Deployment database project to the project we want to deploy.&amp;nbsp;
Next choose the configuration.&amp;nbsp; The configuration settings in the database project
will specify the target connection string and other deployment properties.&amp;nbsp; Next,
the Database state setting will generate the test data for the unit tests by running
one of the data generation plans.&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_3.png" width="454" height="569"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 8 – Database Test Settings&lt;/strong&gt;
&lt;/p&gt;
&lt;h4 align="left"&gt;Types of Continuous Delivery
&lt;/h4&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;The example above basically deploys the current version of the schema
to the target but doesn’t is not a good practice run into production.&amp;nbsp;&amp;nbsp;
It basically deploys the changes from the last deployment.&amp;nbsp; My goal of the Continuous
Delivery process should be a practice run into production and essentially deploy the
application and database the way it will be done for the production deployment.&amp;nbsp;&amp;nbsp;
There are two types of delivery based on whether or not the application is already
in production.&amp;nbsp; For new systems that haven’t been deployed to production, the
deployment will be to deploy all of the schema.&amp;nbsp; This is referred to as &lt;strong&gt;Greenfield&lt;/strong&gt;.&amp;nbsp;
For existing systems, the schema will the difference of what is currently in production
with what has been developed.&amp;nbsp; This is referred to as &lt;strong&gt;Brownfield&lt;/strong&gt; deployments.&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;From a Visual Studio Database Project standpoint, Greenfield deployments
are a simple using the deploy option.&amp;nbsp; This will drop the database and execute
the full schema script to create the database.&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_4.png" width="404" height="82"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;&lt;font size="1"&gt;Figure 9 – Greenfield Process&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;For Brownfield deployments in Visual Studio Database Projects, the
process is accomplished in two steps using Production and Development versions of
the database projects.&amp;nbsp; The first step is to use the Production version of the
Database Project to create the full CREATE script.&amp;nbsp; Next, use the compare feature
to compare the Production and Development versions to create the DELTA script.&amp;nbsp;
Again, the key is not to compare the development against the live production database
but to use the version of the Database Project that was created either from the production
database or from the Release branch in source control.&amp;nbsp; Once you have these two
database scripts, run the CREATE script to drop the database and create the database
to the production level.&amp;nbsp; Then execute DELTA script to bring it to the current
development level.&amp;nbsp; From there you can follow the similar steps to execute the
data generation plan and automated tests to complete.&amp;nbsp; See below to see how this
fits together &lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_5.png" width="404" height="212"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;&lt;font size="1"&gt;Figure 10 – Brownfield Process&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;Putting this all together, here are the steps in order for a good SQL
Server database Continuous Delivery process.&amp;nbsp; There is some customization that
has to be done for this.&amp;nbsp; The database testing options that were available for
the simple process, won’t work out of the box for this solution.&amp;nbsp; This is because
the Database Project doesn’t know about the production and delta scripts.&amp;nbsp; The
build by default would create the database and run the data generation plan before
unit tests including the database unit tests.&amp;nbsp; However, the unit tests are run
immediately after the application is built and we need to specify the a step to build
create the scripts and then execute them.&amp;nbsp; I customized the build definition
by moving the unit test execution activities to later in the process so I could execute
the SQL scripts before the Unit Tests are run.&amp;nbsp; Once this was moved, I could
use the built in features to run the data generation plan.&amp;nbsp; Below are the steps
for the full end to end Database Continuous Delivery process.&lt;/font&gt;
&lt;/p&gt;
&lt;h3 align="left"&gt;&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_24.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_11.png" width="200" height="338"&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p align="center"&gt;
&lt;font size="1"&gt;&lt;strong&gt;Figure 11 – End to End Database Continuous Delivery Process&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;To combine this process into the application continuous delivery process,
the same tasks above can executed along with the application steps.&amp;nbsp; This process
is grouped into three groups: Build/Stage, Deploy, and Execute Automated Tests.&amp;nbsp;
The process is outlined below.&lt;/font&gt;
&lt;/p&gt;
&lt;h3 align="left"&gt;&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_26.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Continuous-Integration-CI-with-SQL-Serve_CEF7/image_thumb_12.png" width="500" height="312"&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 12 – End to End Application and Database Continuous Delivery Process&lt;/strong&gt;
&lt;/p&gt;
&lt;h3 align="left"&gt;&amp;nbsp;
&lt;/h3&gt;
&lt;h3 align="left"&gt;&amp;nbsp;
&lt;/h3&gt;
&lt;h3 align="left"&gt;VSDBCMD
&lt;/h3&gt;
&lt;p&gt;
&lt;font size="2"&gt;One of the great features of Visual Studio Database Projects is that
the deployment and compare functionality can be executed via a command line utility
called VSDBCMD.exe.&amp;nbsp; This allows us to perform the necessary steps in our Continuous
Delivery process.&amp;nbsp; I utilize a InvokeProcess Activity in the build definition
to call a PowerShell script to execute the VSDBCMD commands.&amp;nbsp; Below are examples
of how to create the Production CREATE script and the DELTA script.&amp;nbsp; The Production
Script creates the full CREATE script from the compiled Production version of the
Database Project.&amp;nbsp; The DELTA command shows how to compare two Database Projects
to generate the DELTA SQL Script.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;font size="2"&gt;Create Production Script&lt;/font&gt;&lt;/strong&gt; 
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&amp;amp; &lt;span class="str"&gt;"C:\program files (x86)\Microsoft
Visual Studio 10.0\VSTSDB\Deploy\vsdbcmd.exe"&lt;/span&gt; &lt;/pre&gt;&lt;pre class="csharpcode"&gt;/a:deploy /dsp:sql /model:Ecommerce.dbschema /DeploymentScriptFile:c:\temp\OutputFilename2.sql &lt;/pre&gt;&lt;pre class="csharpcode"&gt;/p:TargetDatabase=&lt;span class="str"&gt;"NewEcommerce"&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;font size="2"&gt;Create Production and Development Delta Script&lt;/font&gt;&lt;/strong&gt; 
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&amp;amp; &lt;span class="str"&gt;"C:\program files (x86)\Microsoft
Visual Studio 10.0\VSTSDB\Deploy\vsdbcmd.exe"&lt;/span&gt; &lt;/pre&gt;&lt;pre class="csharpcode"&gt;/a:deploy /dsp:sql /model:Ecommerce.dbschema /DeploymentScriptFile:c:\temp\OutputFilename2.sql &lt;/pre&gt;&lt;pre class="csharpcode"&gt;/targetmodelfile:&lt;span class="str"&gt;"C:\tfs\deliveron\Production\EcommerceSolution\Ecommerce\obj\Debug\ecommerce.dbschema"&lt;/span&gt; &lt;/pre&gt;&lt;pre class="csharpcode"&gt;/p:TargetDatabase=&lt;span class="str"&gt;"NewEcommerce"&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt; &lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;h3 align="left"&gt;&amp;nbsp;
&lt;/h3&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;h3 align="left"&gt;In Summary
&lt;/h3&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;This concludes the overview of the solution for Continuous Integration
and Delivery for SQL Server Databases.&amp;nbsp; I hope it gives you a complete overview
for creating your own Continuous Delivery process.&amp;nbsp; Feel free to contact me if
you have any questions or comments.&lt;/font&gt;
&lt;/p&gt;
&lt;p align="left"&gt;
&lt;font size="2"&gt;&lt;strong&gt;Review of Key Concepts&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;There are three types of Continuous processes: Integration,
Delivery, and Deployment.&lt;/font&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;Continuous Delivery should be set up to be a practice
run for Production.&lt;/font&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;Create compare scripts between development and production
database projects and don’t compare against live databases.&lt;/font&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;VSDBCMD is a command line utility that perform the
deployment and compare functionality in Visual Studio Database Projects.&lt;/font&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
This was also cross posted at &lt;a title="http://www.deliveron.com/blog/post/Implementing-Continuous-Integration-(CI)-and-Delivery-for-SQL-Server-Databases.aspx" href="http://www.deliveron.com/blog/post/Implementing-Continuous-Integration-(CI)-and-Delivery-for-SQL-Server-Databases.aspx"&gt;http://www.deliveron.com/blog/post/Implementing-Continuous-Integration-(CI)-and-Delivery-for-SQL-Server-Databases.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=3448c757-600c-476a-9b69-2bf87b8d74aa" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,3448c757-600c-476a-9b69-2bf87b8d74aa.aspx</comments>
      <category>Agile</category>
      <category>ALM</category>
      <category>Continuous Integration</category>
      <category>SQL Server 2008</category>
      <category>Team Build 2010</category>
      <category>Team Foundation Server</category>
      <category>Visual Studio 2010</category>
    </item>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=2a458474-dca9-4320-9fdd-496354c898f1</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,2a458474-dca9-4320-9fdd-496354c898f1.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,2a458474-dca9-4320-9fdd-496354c898f1.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=2a458474-dca9-4320-9fdd-496354c898f1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last week I had the opportunity to speak at Omaha’s first SQL Saturday.  My talk
was on Continuous Integration with SQL Server Databases.  I had a good turnout
and some great questions at my session.  Here are the <a href="http://www.sqlsaturday.com/viewsession.aspx?sat=91&amp;sessionid=5537" target="_blank">slides</a> from
my talk.  I mistakenly mentioned in the talk that column changes would be treated
as a Drop and an Add, thus resulting in data loss.  Visual Studio 2010 Database
Projects track the changes like this and incorporates the column change into the delta
script.  
</p>
        <p>
In my example, I have a Product table with existing data.  
</p>
        <p align="center">
          <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb_2.png" width="239" height="131" />
          <strong>Figure
1 – Product table with data</strong>
        </p>
        <p>
I renamed the column from NameOfProduct to ProductName
</p>
        <p align="center">
          <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb.png" width="404" height="324" />
          <strong>Figure
2 – Rename feature in Database Projects</strong>
        </p>
        <p>
          <strong>
          </strong> 
</p>
        <p align="center">
          <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb_3.png" width="404" height="231" />
          <strong>Figure
3 – Preview Changes Dialog</strong>
        </p>
        <p>
You can see that the delta script that was generated by the Deploy option in the Visual
Studio Database Project is aware of the column name change.  The script calls
the sp_rename stored procedure to rename the column name and keep the data intact.
</p>
        <p align="center">
          <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb_4.png" width="654" height="188" />
          <strong>Figure
4 – Rename Column Script</strong>
        </p>
        <p>
 
</p>
        <p>
Here are the results of table after the rename. No data loss!
</p>
        <p align="center">
          <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb_5.png" width="221" height="110" />
          <strong>Figure
5 – Product table data after the rename</strong>
        </p>
        <p>
In my next post I’ll discuss specifics around the CI for SQL Server databases solution.
</p>
        <p>
Enjoy!
</p>
        <p>
This was also cross posted to <a title="http://www.deliveron.com/blog/post/Column-Changes-with-Visual-Studio-2010-Database-Projects.aspx" href="http://www.deliveron.com/blog/post/Column-Changes-with-Visual-Studio-2010-Database-Projects.aspx">http://www.deliveron.com/blog/post/Column-Changes-with-Visual-Studio-2010-Database-Projects.aspx</a></p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=2a458474-dca9-4320-9fdd-496354c898f1" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Column Changes without Data Loss in Visual Studio 2010 Database Projects</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,2a458474-dca9-4320-9fdd-496354c898f1.aspx</guid>
      <link>http://www.codesmartnothard.com/2011/09/06/ColumnChangesWithoutDataLossInVisualStudio2010DatabaseProjects.aspx</link>
      <pubDate>Tue, 06 Sep 2011 08:08:00 GMT</pubDate>
      <description>&lt;p&gt;
Last week I had the opportunity to speak at Omaha’s first SQL Saturday.&amp;nbsp; My talk
was on Continuous Integration with SQL Server Databases.&amp;nbsp; I had a good turnout
and some great questions at my session.&amp;nbsp; Here are the &lt;a href="http://www.sqlsaturday.com/viewsession.aspx?sat=91&amp;amp;sessionid=5537" target="_blank"&gt;slides&lt;/a&gt; from
my talk.&amp;nbsp; I mistakenly mentioned in the talk that column changes would be treated
as a Drop and an Add, thus resulting in data loss.&amp;nbsp; Visual Studio 2010 Database
Projects track the changes like this and incorporates the column change into the delta
script.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
In my example, I have a Product table with existing data.&amp;nbsp; 
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb_2.png" width="239" height="131"&gt;&lt;strong&gt;Figure
1 – Product table with data&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
I renamed the column from NameOfProduct to ProductName
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb.png" width="404" height="324"&gt;&lt;strong&gt;Figure
2 – Rename feature in Database Projects&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb_3.png" width="404" height="231"&gt;&lt;strong&gt;Figure
3 – Preview Changes Dialog&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
You can see that the delta script that was generated by the Deploy option in the Visual
Studio Database Project is aware of the column name change.&amp;nbsp; The script calls
the sp_rename stored procedure to rename the column name and keep the data intact.
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb_4.png" width="654" height="188"&gt;&lt;strong&gt;Figure
4 – Rename Column Script&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Here are the results of table after the rename. No data loss!
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/53f0b7d82a03_4F0/image_thumb_5.png" width="221" height="110"&gt;&lt;strong&gt;Figure
5 – Product table data after the rename&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
In my next post I’ll discuss specifics around the CI for SQL Server databases solution.
&lt;/p&gt;
&lt;p&gt;
Enjoy!
&lt;/p&gt;
&lt;p&gt;
This was also cross posted to &lt;a title="http://www.deliveron.com/blog/post/Column-Changes-with-Visual-Studio-2010-Database-Projects.aspx" href="http://www.deliveron.com/blog/post/Column-Changes-with-Visual-Studio-2010-Database-Projects.aspx"&gt;http://www.deliveron.com/blog/post/Column-Changes-with-Visual-Studio-2010-Database-Projects.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=2a458474-dca9-4320-9fdd-496354c898f1" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,2a458474-dca9-4320-9fdd-496354c898f1.aspx</comments>
      <category>SQL Server 2008</category>
      <category>TFS 2010</category>
      <category>Visual Studio 2010</category>
    </item>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=45f2d145-fcee-46ef-820d-b637bf1d223a</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,45f2d145-fcee-46ef-820d-b637bf1d223a.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,45f2d145-fcee-46ef-820d-b637bf1d223a.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=45f2d145-fcee-46ef-820d-b637bf1d223a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you have ever tried scripting database schema and data from SQL Server, you have
probably been frustrated like me that there is not a simple process for doing this. 
SQL Server Management Studio includes two options highlighted below.  The <strong>Generate
Scripts…</strong> option works as expected and allows you to easily create a script
to recreate the database.  However, if you want to export the data to import
it at a later point, using the<strong> Export Data…</strong> option doesn’t quite
do what is needed to script the data.  It allows you to script to a CSV or Excel
file, however I have found importing an exported file, isn’t always easy.   
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb.png" width="354" height="387" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 1 - SQL Server Management Studio</strong>
        </p>
        <p>
Surprisingly there is a better option not in SQL Server Management Studio but in Visual
Studio 2010 (I believe this option is available in Visual Studio 2008, but I wasn’t
able to confirm this for the post.).  Visual Studio 2010 includes an view window
called Server Explorer.  This is typically used for data binding and tools like
LINQ and Entity Framework.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_1.png" width="384" height="157" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 2 – Visual Studio 2010 Server Explorer</strong>
        </p>
        <p>
The context menu for the particular data connection includes an option called <strong>Publish
to provider…</strong>  
</p>
        <p align="center">
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_6.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_2.png" width="354" height="339" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 3 – Publish to provider</strong>
        </p>
        <p>
This option launches the Database Publishing Wizard.  When this wizard displays
it gives you the option to export both schema and/or data to a SQL file.  Especially
for data, this is perfect for migrating data from one environment to the next including
preserving identity keys.
</p>
        <p>
The wizard opens with the option to choose a database and automatically script all
objects in the selected database.  I chose the AdventureWorks database and clicked
Next.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_8.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_3.png" width="354" height="318" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 4 – Select Database in the Database Publishing Wizard</strong>
        </p>
        <p>
The next step in the wizard is to choose what objects types to publish.  Here
I select Tables.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_10.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_4.png" width="354" height="318" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 5 – Choose Object Types in the Database Publishing Wizard</strong>
        </p>
        <p>
With the the Tables option selected in the previous step, the Choose Tables step appears. 
Here I selected a single table for this demo.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_12.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_5.png" width="354" height="318" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 6 – Choose Tables in the Database Publishing Wizard</strong>
        </p>
        <p>
Finally choose the output location.  This can either output to a file or to a
hosting provider.  Here I chose the <strong>Script to file</strong> option to
save the output to a file.  To use the <strong>Publish to shared hosting provider </strong>your
hosting provider or target system must support a SQL Publishing Web Service and the
database already exist on the target.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_14.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_6.png" width="354" height="318" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 7 – Select an Output Location in the Database Publishing Wizard</strong>
        </p>
        <p>
This screen includes the publishing options.  The options are straight forward. 
The<strong> Drop existing objects in script</strong> option will toggle a dropping
existing objects in the target database before the new objects are scripted. 
The<strong> Schema qualify</strong> option qualifies object names with the schema. 
The <strong>Script for target database</strong> drives the compatibility of the script. 
Finally the <strong>Types of data to publish</strong> allows for schema or data only
or both.  Here I want to script both so I chose <strong>Schema and data</strong>.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_17.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_7.png" width="354" height="318" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 8 – Select Publishing Options in the Database Publishing Wizard</strong>
        </p>
        <p>
The final screen is a confirmation of the options selected.  Click Finish to
run the wizard and create the script.  When the wizard completes, it will display
success.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_19.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_8.png" width="354" height="318" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 9 – Successful Database Publishing Wizard</strong>
        </p>
        <p>
Below is the output of the Database Publishing Wizard for the schema and data.
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/SNAGHTML11af3a6.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="SNAGHTML11af3a6" border="0" alt="SNAGHTML11af3a6" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/SNAGHTML11af3a6_thumb.png" width="500" height="236" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 10 – Schema output of the Database Publishing Wizard</strong>
        </p>
        <p>
 
</p>
        <p>
          <a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/SNAGHTML120ba20.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="SNAGHTML120ba20" border="0" alt="SNAGHTML120ba20" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/SNAGHTML120ba20_thumb.png" width="500" height="235" />
          </a>
        </p>
        <p align="center">
          <strong>Figure 11 – Data output of the Database Publishing Wizard</strong>
        </p>
        <p>
For more information on the Database Publishing Wizard, read <a href="http://msdn.microsoft.com/en-us/library/bb907585.aspx" target="_blank">Deploying
a Database by using the Database Publishing Wizard</a> on MSDN.
</p>
        <p>
This was also cross posted at <a title="http://www.deliveron.com/blog/post/Script-Database-Schema-and-data-using-Visual-Studio-2010-and-Database-Publishing-Wizard.aspx" href="http://www.deliveron.com/blog/post/Script-Database-Schema-and-data-using-Visual-Studio-2010-and-Database-Publishing-Wizard.aspx">http://www.deliveron.com/blog/post/Script-Database-Schema-and-data-using-Visual-Studio-2010-and-Database-Publishing-Wizard.aspx</a></p>
        <p>
Enjoy!
</p>
        <p>
Mike Douglas
</p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=45f2d145-fcee-46ef-820d-b637bf1d223a" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Script Database Schema and Data using Visual Studio 2010 and the Database Publishing Wizard</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,45f2d145-fcee-46ef-820d-b637bf1d223a.aspx</guid>
      <link>http://www.codesmartnothard.com/2011/08/23/ScriptDatabaseSchemaAndDataUsingVisualStudio2010AndTheDatabasePublishingWizard.aspx</link>
      <pubDate>Tue, 23 Aug 2011 07:10:00 GMT</pubDate>
      <description>&lt;p&gt;
If you have ever tried scripting database schema and data from SQL Server, you have
probably been frustrated like me that there is not a simple process for doing this.&amp;nbsp;
SQL Server Management Studio includes two options highlighted below.&amp;nbsp; The &lt;strong&gt;Generate
Scripts…&lt;/strong&gt; option works as expected and allows you to easily create a script
to recreate the database.&amp;nbsp; However, if you want to export the data to import
it at a later point, using the&lt;strong&gt; Export Data…&lt;/strong&gt; option doesn’t quite
do what is needed to script the data.&amp;nbsp; It allows you to script to a CSV or Excel
file, however I have found importing an exported file, isn’t always easy.&amp;nbsp;&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb.png" width="354" height="387"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 1 - SQL Server Management Studio&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Surprisingly there is a better option not in SQL Server Management Studio but in Visual
Studio 2010 (I believe this option is available in Visual Studio 2008, but I wasn’t
able to confirm this for the post.).&amp;nbsp; Visual Studio 2010 includes an view window
called Server Explorer.&amp;nbsp; This is typically used for data binding and tools like
LINQ and Entity Framework.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_1.png" width="384" height="157"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 2 – Visual Studio 2010 Server Explorer&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The context menu for the particular data connection includes an option called &lt;strong&gt;Publish
to provider…&lt;/strong&gt;&amp;nbsp; 
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_2.png" width="354" height="339"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 3 – Publish to provider&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This option launches the Database Publishing Wizard.&amp;nbsp; When this wizard displays
it gives you the option to export both schema and/or data to a SQL file.&amp;nbsp; Especially
for data, this is perfect for migrating data from one environment to the next including
preserving identity keys.
&lt;/p&gt;
&lt;p&gt;
The wizard opens with the option to choose a database and automatically script all
objects in the selected database.&amp;nbsp; I chose the AdventureWorks database and clicked
Next.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_3.png" width="354" height="318"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 4 – Select Database in the Database Publishing Wizard&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The next step in the wizard is to choose what objects types to publish.&amp;nbsp; Here
I select Tables.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_4.png" width="354" height="318"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 5 – Choose Object Types in the Database Publishing Wizard&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
With the the Tables option selected in the previous step, the Choose Tables step appears.&amp;nbsp;
Here I selected a single table for this demo.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_5.png" width="354" height="318"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 6 – Choose Tables in the Database Publishing Wizard&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Finally choose the output location.&amp;nbsp; This can either output to a file or to a
hosting provider.&amp;nbsp; Here I chose the &lt;strong&gt;Script to file&lt;/strong&gt; option to
save the output to a file.&amp;nbsp; To use the &lt;strong&gt;Publish to shared hosting provider &lt;/strong&gt;your
hosting provider or target system must support a SQL Publishing Web Service and the
database already exist on the target.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_6.png" width="354" height="318"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 7 – Select an Output Location in the Database Publishing Wizard&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This screen includes the publishing options.&amp;nbsp; The options are straight forward.&amp;nbsp;
The&lt;strong&gt; Drop existing objects in script&lt;/strong&gt; option will toggle a dropping
existing objects in the target database before the new objects are scripted.&amp;nbsp;
The&lt;strong&gt; Schema qualify&lt;/strong&gt; option qualifies object names with the schema.&amp;nbsp;
The &lt;strong&gt;Script for target database&lt;/strong&gt; drives the compatibility of the script.&amp;nbsp;
Finally the &lt;strong&gt;Types of data to publish&lt;/strong&gt; allows for schema or data only
or both.&amp;nbsp; Here I want to script both so I chose &lt;strong&gt;Schema and data&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_17.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_7.png" width="354" height="318"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 8 – Select Publishing Options in the Database Publishing Wizard&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The final screen is a confirmation of the options selected.&amp;nbsp; Click Finish to
run the wizard and create the script.&amp;nbsp; When the wizard completes, it will display
success.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_19.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/image_thumb_8.png" width="354" height="318"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 9 – Successful Database Publishing Wizard&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Below is the output of the Database Publishing Wizard for the schema and data.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/SNAGHTML11af3a6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="SNAGHTML11af3a6" border="0" alt="SNAGHTML11af3a6" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/SNAGHTML11af3a6_thumb.png" width="500" height="236"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 10 – Schema output of the Database Publishing Wizard&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/SNAGHTML120ba20.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="SNAGHTML120ba20" border="0" alt="SNAGHTML120ba20" src="http://www.codesmartnothard.com/content/binary/Windows-Live-Writer/Script_1378C/SNAGHTML120ba20_thumb.png" width="500" height="235"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;Figure 11 – Data output of the Database Publishing Wizard&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
For more information on the Database Publishing Wizard, read &lt;a href="http://msdn.microsoft.com/en-us/library/bb907585.aspx" target="_blank"&gt;Deploying
a Database by using the Database Publishing Wizard&lt;/a&gt; on MSDN.
&lt;/p&gt;
&lt;p&gt;
This was also cross posted at &lt;a title="http://www.deliveron.com/blog/post/Script-Database-Schema-and-data-using-Visual-Studio-2010-and-Database-Publishing-Wizard.aspx" href="http://www.deliveron.com/blog/post/Script-Database-Schema-and-data-using-Visual-Studio-2010-and-Database-Publishing-Wizard.aspx"&gt;http://www.deliveron.com/blog/post/Script-Database-Schema-and-data-using-Visual-Studio-2010-and-Database-Publishing-Wizard.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Enjoy!
&lt;/p&gt;
&lt;p&gt;
Mike Douglas
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=45f2d145-fcee-46ef-820d-b637bf1d223a" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,45f2d145-fcee-46ef-820d-b637bf1d223a.aspx</comments>
      <category>ALM</category>
      <category>SQL Server 2008</category>
      <category>Visual Studio 2010</category>
    </item>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=dcceb3cf-e4f2-444a-ab5d-6a82844feb7d</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,dcceb3cf-e4f2-444a-ab5d-6a82844feb7d.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,dcceb3cf-e4f2-444a-ab5d-6a82844feb7d.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=dcceb3cf-e4f2-444a-ab5d-6a82844feb7d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The Team Project portal site in TFS 2010 is the collaboration hub for many activities
that typically includes document libraries, team calendar,  wiki, reporting,
and more.  TFS 2010 includes a number of reports that can be displayed on the
portal using SSRS (using either SharePoint 2010 Foundation or SharePoint 2010 Enterprise)
and Excel Services (using SharePoint 2010 Enterprise).    In this post,
I will walk through customizing the report to display the burndown for the particular
Iteration..
</p>
        <p>
The first question I often receive is:
</p>
        <p>
          <em>How do I customize the burndown dashboard report to fit my Sprint/Iteration?</em>
        </p>
        <p>
When you display the project portal page and view the burndown dashboard report, you
will notice that the default parameters don’t match the current iteration.  To
update this, we can override the parameters being passed into the report through the
URL.  I want to set Start Date, End Date, and Iteration parameters to display
the correct data.
</p>
        <p>
First, navigate to the page with the report
</p>
        <p>
          <a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_thumb.png" width="644" height="248" />
          </a>
        </p>
        <p>
Click on the arrow and choose “Edit Web Part” to edit the parameters for the report.
</p>
        <p>
          <a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_thumb_1.png" width="204" height="171" />
          </a>
        </p>
        <p>
On the right of the screen is the settings for the web part and report. The link is
what needs to be modified.
</p>
        <p>
          <a href="http://tfsserver/ReportServer/Pages/ReportViewer.aspx?%2fTfsReports%2fBP%2fTeamProject%2fDashboards%2fBurndown&amp;rs:Command=Render&amp;rc:Toolbar=false&amp;StartDateParam=07/05/2011&amp;EndDateParam=07/26/2011">http://tfsserver/ReportServer/Pages/ReportViewer.aspx?%2fTfsReports%2fBP%2fTeamProject%2fDashboards%2f 
<br />
Burndown&amp;rs:Command=Render&amp;rc:Toolbar=false&amp;StartDateParam=07/05/2011&amp;EndDateParam=07/26/2011</a>
        </p>
        <p>
To Determine the properties to add or change, you can go to the report itself and
look at the properties available. In this example, we want to update the Start Date
and End Date and add the Iteration. To find out what the name of the Iteration parameter
is, go to the following URL to see the properties.
</p>
        <p>
          <a href="http://tfsserver/Reports/Pages/Folder.aspx?ItemPath=%2fTfsReports%2fBP%2fTeamProject%2fDashboards&amp;ViewMode=List">http://tfsserver/Reports/Pages/Folder.aspx?ItemPath=%2fTfsReports%2fBP%2fTeamProject%2fDashboards&amp;ViewMode=List</a>
        </p>
        <p>
Choose the Manage option in the context menu of the report
</p>
        <p>
          <a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_6.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_thumb_2.png" width="354" height="326" />
          </a>
        </p>
        <p>
In the settings screen, choose the Parameters tab and find the parameter you are looking
for. This is the name we will add to the URL above. In this instance, it is IterationParam
</p>
        <p>
          <a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_8.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_thumb_3.png" width="604" height="459" />
          </a>
        </p>
        <p>
The format of the IterationParam parameter wasn’t intuitive.  The item is a multi-select
checkbox list.  So it wouldn’t take a simple text value such as “Iteration 01”.
</p>
        <p>
          <a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/SNAGHTML561b382.png">
            <img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML561b382" border="0" alt="SNAGHTML561b382" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/SNAGHTML561b382_thumb.png" width="244" height="163" />
          </a>
        </p>
        <p>
To figure out the format of value, I used the report viewer to set the value of the
Iteration and exported the report as an Atom feed.  Then I opened the Atom XML
and to pull out the value of the Iteration Param that it created.  Below is what
the link looks like with the IterationParam value added.
</p>
        <p>
          <a href="http://tfsserver/ReportServer/Pages/ReportViewer.aspx?%2fTfsReports%2fBP%2fTeamProject%2fDashboards%2fBurndown&amp;rs:Command=Render&amp;rc:Toolbar=false&amp;IterationParam=%5BWork%20Item%5D.%5BIteration%20Hierarchy%5D.%5BIteration1%5D.%26%5B7130920747760410946%5D%26%5B-4689172157298829814%5D&amp;StartDateParam=07/06/2011&amp;EndDateParam=07/26/2011">http://tfsserver/ReportServer/Pages/ReportViewer.aspx?%2fTfsReports%2fBP%2fTeamProject%2fDashboards 
<br />
%2fBurndown&amp;rs:Command=Render&amp;rc:Toolbar=false&amp;IterationParam=%5BWork%20Item%5D.%5B 
<br />
Iteration%20Hierarchy%5D.%5BIteration1%5D.%26%5B7130920747760410946%5D%26%5B-4689172157298829814%5D&amp; 
<br />
StartDateParam=07/06/2011&amp;EndDateParam=07/26/2011</a>
        </p>
        <p>
Finally paste this URL into the link in the web part and save. This is ready to display.
</p>
        <p>
Mike Douglas
</p>
        <p>
This post was cross posted to <a title="http://www.deliveron.com/blog/post/Customizing-the-Burndown-Dashboard-Report-in-TFS-2010-Team-Portal.aspx" href="http://www.deliveron.com/blog/post/Customizing-the-Burndown-Dashboard-Report-in-TFS-2010-Team-Portal.aspx">http://www.deliveron.com/blog/post/Customizing-the-Burndown-Dashboard-Report-in-TFS-2010-Team-Portal.aspx</a></p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=dcceb3cf-e4f2-444a-ab5d-6a82844feb7d" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Customizing the Burndown Dashboard Report in The TFS 2010 Team Portal</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,dcceb3cf-e4f2-444a-ab5d-6a82844feb7d.aspx</guid>
      <link>http://www.codesmartnothard.com/2011/08/03/CustomizingTheBurndownDashboardReportInTheTFS2010TeamPortal.aspx</link>
      <pubDate>Wed, 03 Aug 2011 04:00:00 GMT</pubDate>
      <description>&lt;p&gt;
The Team Project portal site in TFS 2010 is the collaboration hub for many activities
that typically includes document libraries, team calendar,&amp;#160; wiki, reporting,
and more.&amp;#160; TFS 2010 includes a number of reports that can be displayed on the
portal using SSRS (using either SharePoint 2010 Foundation or SharePoint 2010 Enterprise)
and Excel Services (using SharePoint 2010 Enterprise).&amp;#160;&amp;#160;&amp;#160; In this post,
I will walk through customizing the report to display the burndown for the particular
Iteration..
&lt;/p&gt;
&lt;p&gt;
The first question I often receive is:
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;How do I customize the burndown dashboard report to fit my Sprint/Iteration?&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
When you display the project portal page and view the burndown dashboard report, you
will notice that the default parameters don’t match the current iteration.&amp;#160; To
update this, we can override the parameters being passed into the report through the
URL.&amp;#160; I want to set Start Date, End Date, and Iteration parameters to display
the correct data.
&lt;/p&gt;
&lt;p&gt;
First, navigate to the page with the report
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_thumb.png" width="644" height="248" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Click on the arrow and choose “Edit Web Part” to edit the parameters for the report.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_thumb_1.png" width="204" height="171" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
On the right of the screen is the settings for the web part and report. The link is
what needs to be modified.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://tfsserver/ReportServer/Pages/ReportViewer.aspx?%2fTfsReports%2fBP%2fTeamProject%2fDashboards%2fBurndown&amp;amp;rs:Command=Render&amp;amp;rc:Toolbar=false&amp;amp;StartDateParam=07/05/2011&amp;amp;EndDateParam=07/26/2011"&gt;http://tfsserver/ReportServer/Pages/ReportViewer.aspx?%2fTfsReports%2fBP%2fTeamProject%2fDashboards%2f 
&lt;br /&gt;
Burndown&amp;amp;rs:Command=Render&amp;amp;rc:Toolbar=false&amp;amp;StartDateParam=07/05/2011&amp;amp;EndDateParam=07/26/2011&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
To Determine the properties to add or change, you can go to the report itself and
look at the properties available. In this example, we want to update the Start Date
and End Date and add the Iteration. To find out what the name of the Iteration parameter
is, go to the following URL to see the properties.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://tfsserver/Reports/Pages/Folder.aspx?ItemPath=%2fTfsReports%2fBP%2fTeamProject%2fDashboards&amp;amp;ViewMode=List"&gt;http://tfsserver/Reports/Pages/Folder.aspx?ItemPath=%2fTfsReports%2fBP%2fTeamProject%2fDashboards&amp;amp;ViewMode=List&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Choose the Manage option in the context menu of the report
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_thumb_2.png" width="354" height="326" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In the settings screen, choose the Parameters tab and find the parameter you are looking
for. This is the name we will add to the URL above. In this instance, it is IterationParam
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/image_thumb_3.png" width="604" height="459" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The format of the IterationParam parameter wasn’t intuitive.&amp;#160; The item is a multi-select
checkbox list.&amp;#160; So it wouldn’t take a simple text value such as “Iteration 01”.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/SNAGHTML561b382.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML561b382" border="0" alt="SNAGHTML561b382" src="http://codesmartnothard.com/content/binary/Windows-Live-Writer/Customizing-the-Burndown-Dashboard-Repor_12DEF/SNAGHTML561b382_thumb.png" width="244" height="163" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
To figure out the format of value, I used the report viewer to set the value of the
Iteration and exported the report as an Atom feed.&amp;#160; Then I opened the Atom XML
and to pull out the value of the Iteration Param that it created.&amp;#160; Below is what
the link looks like with the IterationParam value added.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://tfsserver/ReportServer/Pages/ReportViewer.aspx?%2fTfsReports%2fBP%2fTeamProject%2fDashboards%2fBurndown&amp;amp;rs:Command=Render&amp;amp;rc:Toolbar=false&amp;amp;IterationParam=%5BWork%20Item%5D.%5BIteration%20Hierarchy%5D.%5BIteration1%5D.%26%5B7130920747760410946%5D%26%5B-4689172157298829814%5D&amp;amp;StartDateParam=07/06/2011&amp;amp;EndDateParam=07/26/2011"&gt;http://tfsserver/ReportServer/Pages/ReportViewer.aspx?%2fTfsReports%2fBP%2fTeamProject%2fDashboards 
&lt;br /&gt;
%2fBurndown&amp;amp;rs:Command=Render&amp;amp;rc:Toolbar=false&amp;amp;IterationParam=%5BWork%20Item%5D.%5B 
&lt;br /&gt;
Iteration%20Hierarchy%5D.%5BIteration1%5D.%26%5B7130920747760410946%5D%26%5B-4689172157298829814%5D&amp;amp; 
&lt;br /&gt;
StartDateParam=07/06/2011&amp;amp;EndDateParam=07/26/2011&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Finally paste this URL into the link in the web part and save. This is ready to display.
&lt;/p&gt;
&lt;p&gt;
Mike Douglas
&lt;/p&gt;
&lt;p&gt;
This post was cross posted to &lt;a title="http://www.deliveron.com/blog/post/Customizing-the-Burndown-Dashboard-Report-in-TFS-2010-Team-Portal.aspx" href="http://www.deliveron.com/blog/post/Customizing-the-Burndown-Dashboard-Report-in-TFS-2010-Team-Portal.aspx"&gt;http://www.deliveron.com/blog/post/Customizing-the-Burndown-Dashboard-Report-in-TFS-2010-Team-Portal.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=dcceb3cf-e4f2-444a-ab5d-6a82844feb7d" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,dcceb3cf-e4f2-444a-ab5d-6a82844feb7d.aspx</comments>
      <category>SharePoint</category>
      <category>SQL Server 2008</category>
      <category>TFS 2010</category>
    </item>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=54e71262-61cd-41b0-b570-ff820e5a6e85</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,54e71262-61cd-41b0-b570-ff820e5a6e85.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,54e71262-61cd-41b0-b570-ff820e5a6e85.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=54e71262-61cd-41b0-b570-ff820e5a6e85</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="2">PowerShell is an awesome technology.  It has become an essential
tool for doing automated deployments with Team Foundation Server 2010.  Creating
deployment scripts in PowerShell are very easy to manage and maintain by the entire
development without having to know about the details of the build definitions. 
In future posts, I will explain how I use the build definitions and PowerShell to
perform the deployments.  With this post I wanted to share a small tip on being
able to catch all errors with a Try, Catch.</font>
        </p>
        <p>
          <font size="2">In PowerShell, there are two types of errors. Terminating errors and
non-terminating errors.  Terminating errors will automatically be caught in a
Try, Catch block but non-terminating errors will not.  Look at this example below.</font>
        </p>
        <blockquote>
          <p>
            <font size="1">try 
<br />
{ 
<br />
    copy-item "c:\notexists\file.txt" "c:\temp" 
<br />
} 
<br />
catch {</font>
          </p>
          <p>
            <font size="1">write-host "bad copy"</font>
          </p>
          <p>
            <font size="1">}</font>
          </p>
        </blockquote>
        <p>
          <font size="2">This command looks like it should write to the out the error message
because the folder and file do not exists. However when you run this, it will only
display the PowerShell error message.  </font>
        </p>
        <blockquote>
          <p>
            <font color="#ff0000" size="1">Copy-Item : Cannot find path 'C:\notexists\file.txt'
because it does not exist. 
<br />
At C:\temp\copyitem.ps1:3 char:14 
<br />
+     copy-item &lt;&lt;&lt;&lt;  "c:\notexists\file.txt"
"c:\temp" 
<br />
    + CategoryInfo         
: ObjectNotFound: (C:\notexists\file.txt:String) [Copy-Item], ItemNotFoundException 
<br />
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand</font>
          </p>
        </blockquote>
        <p>
          <font size="2">This is an example of a non-terminating error.  There are two
ways to fix this.  The –ErrorAction ”Stop” flag can be added to many of cmdlets.  </font>
        </p>
        <blockquote>
          <p>
            <font size="1">copy-item "c:\notexists\file.txt" "c:\temp" -ErrorAction
"Stop"</font>
          </p>
        </blockquote>
        <p>
          <font size="2">Now, when the script is run, it will display the error message, “bad
copy”.</font>
        </p>
        <p>
          <font size="2">This is great but if you are like me, you don’t want to have to add
this to every command.   Luckily there is a way to do this for the entire
script.  At the beginning of the script, you can set $ErrorActionPreference =
“Stop”.  If you want to be able to toggle it, it default setting is “Continue”.</font>
        </p>
        <blockquote>
          <p>
            <font size="1">$ErrorActionPreference = "Stop"</font>
          </p>
        </blockquote>
        <p>
          <font size="2">Here is the final script.  Enjoy!</font>
        </p>
        <blockquote>
          <p>
            <font size="1">$ErrorActionPreference = "Stop"</font>
          </p>
          <p>
            <font size="1">try 
<br />
{ 
<br />
    copy-item "c:\notexists\file.txt" "c:\temp" 
<br />
} 
<br />
catch {</font>
          </p>
          <p>
            <font size="1">write-host "bad copy"</font>
          </p>
          <p>
            <font size="1">}</font>
          </p>
        </blockquote>
        <p>
          <font size="2">
          </font>
        </p>
        <p>
          <font size="2">
          </font>
        </p>
        <p>
          <font size="2">
          </font>
        </p>
        <p>
          <font size="2"> </font>
        </p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=54e71262-61cd-41b0-b570-ff820e5a6e85" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Hey PowerShell, Why is my Try, Catch not working?</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,54e71262-61cd-41b0-b570-ff820e5a6e85.aspx</guid>
      <link>http://www.codesmartnothard.com/2011/07/03/HeyPowerShellWhyIsMyTryCatchNotWorking.aspx</link>
      <pubDate>Sun, 03 Jul 2011 03:14:00 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font size="2"&gt;PowerShell is an awesome technology.&amp;#160; It has become an essential
tool for doing automated deployments with Team Foundation Server 2010.&amp;#160; Creating
deployment scripts in PowerShell are very easy to manage and maintain by the entire
development without having to know about the details of the build definitions.&amp;#160;
In future posts, I will explain how I use the build definitions and PowerShell to
perform the deployments.&amp;#160; With this post I wanted to share a small tip on being
able to catch all errors with a Try, Catch.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;In PowerShell, there are two types of errors. Terminating errors and
non-terminating errors.&amp;#160; Terminating errors will automatically be caught in a
Try, Catch block but non-terminating errors will not.&amp;#160; Look at this example below.&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font size="1"&gt;try 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; copy-item &amp;quot;c:\notexists\file.txt&amp;quot; &amp;quot;c:\temp&amp;quot; 
&lt;br /&gt;
} 
&lt;br /&gt;
catch {&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;write-host &amp;quot;bad copy&amp;quot;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;}&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font size="2"&gt;This command looks like it should write to the out the error message
because the folder and file do not exists. However when you run this, it will only
display the PowerShell error message.&amp;#160; &lt;/font&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font color="#ff0000" size="1"&gt;Copy-Item : Cannot find path 'C:\notexists\file.txt'
because it does not exist. 
&lt;br /&gt;
At C:\temp\copyitem.ps1:3 char:14 
&lt;br /&gt;
+&amp;#160;&amp;#160;&amp;#160;&amp;#160; copy-item &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;#160; &amp;quot;c:\notexists\file.txt&amp;quot;
&amp;quot;c:\temp&amp;quot; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; + CategoryInfo&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
: ObjectNotFound: (C:\notexists\file.txt:String) [Copy-Item], ItemNotFoundException 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font size="2"&gt;This is an example of a non-terminating error.&amp;#160; There are two
ways to fix this.&amp;#160; The –ErrorAction ”Stop” flag can be added to many of cmdlets.&amp;#160; &lt;/font&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font size="1"&gt;copy-item &amp;quot;c:\notexists\file.txt&amp;quot; &amp;quot;c:\temp&amp;quot; -ErrorAction
&amp;quot;Stop&amp;quot;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font size="2"&gt;Now, when the script is run, it will display the error message, “bad
copy”.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;This is great but if you are like me, you don’t want to have to add
this to every command.&amp;#160;&amp;#160; Luckily there is a way to do this for the entire
script.&amp;#160; At the beginning of the script, you can set $ErrorActionPreference =
“Stop”.&amp;#160; If you want to be able to toggle it, it default setting is “Continue”.&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font size="1"&gt;$ErrorActionPreference = &amp;quot;Stop&amp;quot;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font size="2"&gt;Here is the final script.&amp;#160; Enjoy!&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font size="1"&gt;$ErrorActionPreference = &amp;quot;Stop&amp;quot;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;try 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; copy-item &amp;quot;c:\notexists\file.txt&amp;quot; &amp;quot;c:\temp&amp;quot; 
&lt;br /&gt;
} 
&lt;br /&gt;
catch {&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;write-host &amp;quot;bad copy&amp;quot;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1"&gt;}&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font size="2"&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=54e71262-61cd-41b0-b570-ff820e5a6e85" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,54e71262-61cd-41b0-b570-ff820e5a6e85.aspx</comments>
      <category>PowerShell</category>
      <category>Team Build 2010</category>
    </item>
    <item>
      <trackback:ping>http://www.codesmartnothard.com/Trackback.aspx?guid=835b4a5d-31ea-49c6-80b6-938c9bbe5e55</trackback:ping>
      <pingback:server>http://www.codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.codesmartnothard.com/PermaLink,guid,835b4a5d-31ea-49c6-80b6-938c9bbe5e55.aspx</pingback:target>
      <dc:creator>Mike Douglas</dc:creator>
      <wfw:comment>http://www.codesmartnothard.com/CommentView,guid,835b4a5d-31ea-49c6-80b6-938c9bbe5e55.aspx</wfw:comment>
      <wfw:commentRss>http://www.codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=835b4a5d-31ea-49c6-80b6-938c9bbe5e55</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="2">The Visual Studio ALM Rangers just released two projects, the </font>
          <a href="http://rabcg.codeplex.com" target="_blank">
            <font size="2">Build
Customization Guide</font>
          </a>
          <font size="2"> and the </font>
          <a href="http://ralabman.codeplex.com/" target="_blank">
            <font size="2">Lab
Management Guide</font>
          </a>
          <font size="2">.  Both projects provide real world,
in-depth guidance and hands-on-labs (HOL) for planning and creating solutions for
utilizing the Team Build 2010 and Visual Studio 2010 Lab Management.  Every development
team should utilize the features covered in these guides for creating a build strategy
that includes Continuous Integration (CI), packaging and versioning of applications,
and automated deployments to at least the development and test environments. By utilizing
Visual Studio Lab Management, these environments can be quickly provisioned and managed
by those development teams.  They will be able to do things restore to a baseline
before building, deploying, and running tests in those environments, clone the environment
to provide multiple test environments for QA, and attaching a snapshot of the virtual
environment along with other rich information to bugs for the developers. </font>
        </p>
        <p>
          <font size="2">Visit the websites for all of the details and downloads for the guidance.</font>
        </p>
        <h3>Build Customization Guide
</h3>
        <p>
          <font size="2">I am especially excited about the Build Customization Guide being released
because this was first Visual Studio Ranger project I have had worked on.  I
had the opportunity to work with many talented and dedicated individuals.</font>
        </p>
        <p>
          <font size="2">The Epics included in this guidance are:</font>
        </p>
        <ul>
          <li>
            <font size="2">Practical guidance and tooling to simplify the customization of Team
Foundation Build</font>
          </li>
          <li>
            <font size="2">Practical guidance to use Team Foundation Build process templates to
automate build and non-build scenarios in Microsoft environments</font>
          </li>
          <li>
            <font size="2">Practical guidance to enable simple and flexible deployment of applications
and their data stores </font>
          </li>
          <li>
            <font size="2">Practical guidance for Activities to empower developers and build engineers </font>
          </li>
          <li>
            <font size="2">Quality hands-on labs that complement the guidance and effectively
guide the user through the features </font>
          </li>
          <li>
            <font size="2">Visualization of the guidance using quick reference posters </font>
          </li>
        </ul>
        <p>
          <a title="http://rabcg.codeplex.com/" href="http://rabcg.codeplex.com/">
            <font size="2">http://rabcg.codeplex.com/</font>
          </a>
        </p>
        <h3>Lab Management Guide
</h3>
        <p>
          <font size="2">I didn’t contribute to the Lab Management Guide, but I have read through
the guidance.  It includes a lot of great information that include planning Lab
Management, setting up the Virtual Lab environment, and creating Virtual Machines
using the VM Factory. </font>
        </p>
        <p>
          <font size="2">The Epics included in this guidance are:</font>
        </p>
        <ul>
          <li>
            <font size="2">Visualization of the guidance using quick reference posters </font>
          </li>
          <li>
            <font size="2">Advanced golden image management using the VM Factory for Lab Management </font>
          </li>
          <li>
            <font size="2">Provide guidance on setting up Test environments with respect to pre-defined
personas </font>
          </li>
          <li>
            <font size="2">Provide Guidance to enable large and small teams to setup and configure
both automated and manual tests </font>
          </li>
          <li>
            <font size="2">Provide practical guidance for managing and maintaining a Lab Management
environment </font>
          </li>
          <li>
            <font size="2">Provide practical guidance to enable teams to quickly setup and configure
their lab management environment </font>
          </li>
        </ul>
        <p>
          <a title="http://ralabman.codeplex.com/" href="http://ralabman.codeplex.com/">
            <font size="2">http://ralabman.codeplex.com/</font>
          </a>
        </p>
        <h3>Visual Studio ALM Rangers
</h3>
        <p>
          <font size="2">So who are the the Visual Studio ALM Rangers?  They are a group
of internal Microsoft employees and external communities leaders/MVPs who’s mission
is to accelerate the adoption of Visual Studio with out-of-band solutions for missing
features and guidance.  Willy-P. Schaub has posted some great information about
who we are, the past accomplishments, and future plan in the </font>
          <a href="http://blogs.msdn.com/b/willy-peter_schaub/archive/2011/06/09/visual-studio-alm-rangers-5-year-report-sharing-the-essentials.aspx" target="_blank">
            <font size="2">Visual
Studio ALM Rangers 5 year Report</font>
          </a>
          <font size="2">.</font>
        </p>
        <p>
          <font size="2">Please contact us at </font>
          <a href="mailto:tfs@deliveron.com">
            <font size="2">tfs@deliveron.com</font>
          </a>
          <font size="2"> for
information on these guides or implementing these solutions in your environment.</font>
        </p>
        <p>
          <font size="2">Mike</font>
        </p>
        <img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=835b4a5d-31ea-49c6-80b6-938c9bbe5e55" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.deliveron.com">Deliveron Consulting
Services</a>. 
</body>
      <title>Visual Studio ALM Rangers release the Build Customization and Lab Management Guides</title>
      <guid isPermaLink="false">http://www.codesmartnothard.com/PermaLink,guid,835b4a5d-31ea-49c6-80b6-938c9bbe5e55.aspx</guid>
      <link>http://www.codesmartnothard.com/2011/06/18/VisualStudioALMRangersReleaseTheBuildCustomizationAndLabManagementGuides.aspx</link>
      <pubDate>Sat, 18 Jun 2011 17:52:00 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font size="2"&gt;The Visual Studio ALM Rangers just released two projects, the &lt;/font&gt;&lt;a href="http://rabcg.codeplex.com" target="_blank"&gt;&lt;font size="2"&gt;Build
Customization Guide&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; and the &lt;/font&gt;&lt;a href="http://ralabman.codeplex.com/" target="_blank"&gt;&lt;font size="2"&gt;Lab
Management Guide&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;.&amp;#160; Both projects provide real world,
in-depth guidance and hands-on-labs (HOL) for planning and creating solutions for
utilizing the Team Build 2010 and Visual Studio 2010 Lab Management.&amp;#160; Every development
team should utilize the features covered in these guides for creating a build strategy
that includes Continuous Integration (CI), packaging and versioning of applications,
and automated deployments to at least the development and test environments. By utilizing
Visual Studio Lab Management, these environments can be quickly provisioned and managed
by those development teams.&amp;#160; They will be able to do things restore to a baseline
before building, deploying, and running tests in those environments, clone the environment
to provide multiple test environments for QA, and attaching a snapshot of the virtual
environment along with other rich information to bugs for the developers. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;Visit the websites for all of the details and downloads for the guidance.&lt;/font&gt;
&lt;/p&gt;
&lt;h3&gt;Build Customization Guide
&lt;/h3&gt;
&lt;p&gt;
&lt;font size="2"&gt;I am especially excited about the Build Customization Guide being released
because this was first Visual Studio Ranger project I have had worked on.&amp;#160; I
had the opportunity to work with many talented and dedicated individuals.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;The Epics included in this guidance are:&lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;font size="2"&gt;Practical guidance and tooling to simplify the customization of Team
Foundation Build&lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Practical guidance to use Team Foundation Build process templates to
automate build and non-build scenarios in Microsoft environments&lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Practical guidance to enable simple and flexible deployment of applications
and their data stores &lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Practical guidance for Activities to empower developers and build engineers &lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Quality hands-on labs that complement the guidance and effectively
guide the user through the features &lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Visualization of the guidance using quick reference posters &lt;/font&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;a title="http://rabcg.codeplex.com/" href="http://rabcg.codeplex.com/"&gt;&lt;font size="2"&gt;http://rabcg.codeplex.com/&lt;/font&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;Lab Management Guide
&lt;/h3&gt;
&lt;p&gt;
&lt;font size="2"&gt;I didn’t contribute to the Lab Management Guide, but I have read through
the guidance.&amp;#160; It includes a lot of great information that include planning Lab
Management, setting up the Virtual Lab environment, and creating Virtual Machines
using the VM Factory. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;The Epics included in this guidance are:&lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;font size="2"&gt;Visualization of the guidance using quick reference posters &lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Advanced golden image management using the VM Factory for Lab Management &lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Provide guidance on setting up Test environments with respect to pre-defined
personas &lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Provide Guidance to enable large and small teams to setup and configure
both automated and manual tests &lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Provide practical guidance for managing and maintaining a Lab Management
environment &lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font size="2"&gt;Provide practical guidance to enable teams to quickly setup and configure
their lab management environment &lt;/font&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;a title="http://ralabman.codeplex.com/" href="http://ralabman.codeplex.com/"&gt;&lt;font size="2"&gt;http://ralabman.codeplex.com/&lt;/font&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;Visual Studio ALM Rangers
&lt;/h3&gt;
&lt;p&gt;
&lt;font size="2"&gt;So who are the the Visual Studio ALM Rangers?&amp;#160; They are a group
of internal Microsoft employees and external communities leaders/MVPs who’s mission
is to accelerate the adoption of Visual Studio with out-of-band solutions for missing
features and guidance.&amp;#160; Willy-P. Schaub has posted some great information about
who we are, the past accomplishments, and future plan in the &lt;/font&gt;&lt;a href="http://blogs.msdn.com/b/willy-peter_schaub/archive/2011/06/09/visual-studio-alm-rangers-5-year-report-sharing-the-essentials.aspx" target="_blank"&gt;&lt;font size="2"&gt;Visual
Studio ALM Rangers 5 year Report&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;Please contact us at &lt;/font&gt;&lt;a href="mailto:tfs@deliveron.com"&gt;&lt;font size="2"&gt;tfs@deliveron.com&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; for
information on these guides or implementing these solutions in your environment.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;Mike&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.codesmartnothard.com/aggbug.ashx?id=835b4a5d-31ea-49c6-80b6-938c9bbe5e55" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.deliveron.com"&gt;Deliveron Consulting
Services&lt;/a&gt;. </description>
      <comments>http://www.codesmartnothard.com/CommentView,guid,835b4a5d-31ea-49c6-80b6-938c9bbe5e55.aspx</comments>
      <category>ALM</category>
      <category>Lab Management</category>
      <category>Team Build 2010</category>
      <category>Team Foundation Server</category>
      <category>TFS 2010</category>
      <category>Visual Studio 2010</category>
    </item>
  </channel>
</rss>
