<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'TFS'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=TFS&amp;orTags=0</link><description>Search results matching tag 'TFS'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Continuous deployment of SSDT database projects to Windows Azure using Team Foundation Service</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/01/27/continuous-deployment-of-ssdt-database-projects-to-windows-azure-using-team-foundation-service.aspx</link><pubDate>Sun, 27 Jan 2013 20:07:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47339</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;Continuous deployment is described by Wikipedia as:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Most CI systems allow the running of scripts after a build finishes. In most situations, it is possible to write a script to deploy the application to a live test server that everyone can look at. A further advance in this way of thinking is &lt;/em&gt;&lt;em&gt;Continuous Deployment&lt;/em&gt;&lt;em&gt;, which calls for the software to be deployed directly into production       &lt;br&gt;&lt;a title="http://en.wikipedia.org/wiki/Continuous_Integration" href="http://en.wikipedia.org/wiki/Continuous_Integration"&gt;http://en.wikipedia.org/wiki/Continuous_Integration&lt;/a&gt;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I think of Continuous Deployment as a natural extension of Continuous Integration where not only do we build the source code, we deploy it as well. As I continue to put together my &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2013/01/15/my-sqlbits-pre-conference-seminar-ssdt-database-projects-from-the-ground-up.aspx"&gt;SSDT Database Projects from the ground-up&lt;/a&gt; seminar it occurred to me that demonstrating Continuous Deployment for SSDT database projects would be very useful. It then occurred to me that the recently released &lt;a href="http://tfs.visualstudio.com/"&gt;Team Foundation Service&lt;/a&gt; (TFS) includes a facility to build source code so I wondered, could one perhaps use TFS to build an SSDT database project and deploy it to a Windows Azure SQL Database (aka SQL Azure)? It turns out that the answer is “yes” and this blog provides a step-by-step guide to doing just that.&lt;/p&gt;  &lt;p&gt;Its worth noting that Team Foundation Service is free for up to five users. SSDT is also free. Windows Azure SQL Databases, however, are not free so you may have to pay a small amount to get one or alternatively adapt the steps herein to use Team Foundation Server to deploy to an on-premises SQL Server instance. Note that a MSDN subscription does include some small usage of Windows Azure SQL Database and that allowance will be more than enough to go through the steps herein.&lt;/p&gt;  &lt;p&gt;We can break our process down into the following high-level steps:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create a Windows Azure SQL Database&lt;/li&gt;    &lt;li&gt;Sign up for Team Foundation Service (TFS)&lt;/li&gt;    &lt;li&gt;Create an SSDT database project&lt;/li&gt;    &lt;li&gt;Add the SSDT project to TFS Source Control&lt;/li&gt;    &lt;li&gt;Setup your Publish Profile file&lt;/li&gt;    &lt;li&gt;Create a Build Definition&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Let’s dive into all of those steps.&lt;/p&gt;  &lt;h3&gt;Create a new Windows Azure SQL Database&lt;/h3&gt;  &lt;p&gt;Visit &lt;a title="https://manage.windowsazure.com/" href="https://manage.windowsazure.com/"&gt;https://manage.windowsazure.com/&lt;/a&gt; and sign up for a new Windows Azure SQL Database:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_713EE18A.png"&gt;&lt;img width="675" height="183" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_6FFA48AB.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Your new database will be viewable in the portal immediately:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_43DD4BBA.png"&gt;&lt;img width="611" height="447" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_14AB6023.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Windows Azure SQL Databases are, by default, closed to the outside world so you must edit the list of IP addresses that are allowed to access the server. Setting this up is outside the scope of this blog post however simply go to &lt;a href="http://msdn.microsoft.com/en-us/library/ee621783.aspx" target="_blank"&gt;How to: Configure the Server-Level Firewall Settings (Windows Azure SQL Database)&lt;/a&gt; to learn how to do this (its very easy).&lt;/p&gt;  &lt;h3&gt;Sign up for Team Foundation Service&lt;/h3&gt;  &lt;p&gt;Visit &lt;a title="https://tfs.visualstudio.com/" href="https://tfs.visualstudio.com/"&gt;https://tfs.visualstudio.com/&lt;/a&gt; to sign up to use Team Foundation Service using your Microsoft Account (aka Windows Live ID). Once you have signed-up you will have a dedicated service URL (mine, for example,&amp;nbsp; is &lt;a href="https://jamiet.visualstudio.com/)."&gt;https://jamiet.visualstudio.com/).&lt;/a&gt; Visit that URL and click “New Team Project”:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_0CB3BDC1.png"&gt;&lt;img width="673" height="202" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_59778457.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Fill in the pertinent details and hit “Create Project”:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_7F6D34AD.png"&gt;&lt;img width="441" height="374" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_308C6F4E.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Creating the Team Project will take a minute or so but will be ready for you when you need it shortly.&lt;/p&gt;  &lt;h3&gt;Create an SSDT database project&lt;/h3&gt;  &lt;p&gt;For this you’re going to need SSDT for Visual Studio 2010 or Visual Studio 2012. They are both free and can be downloaded from &lt;a href="http://msdn.microsoft.com/en-us/data/gg427686" target="_blank"&gt;here&lt;/a&gt;; I am using SSDT for Visual Studio 2012.&lt;/p&gt;  &lt;p&gt;You will need to create a new SQL Server Database Project:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_0F98FCA7.png"&gt;&lt;img width="765" height="432" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_07A15A45.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Once the project is created it will appear in Solution Explorer and be empty at this point. We are going to be deploying to Windows Azure SQL Database therefore we must tell the project that that will be the case. To do that right-click on the project and select Properties:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_623766D6.png"&gt;&lt;img width="459" height="146" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_21951A67.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In Project Settings select Windows Azure SQL Database as the Target platform:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_60869B02.png"&gt;&lt;img width="539" height="178" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_63B882EA.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You’ll need to add a database object to your project otherwise this is all rather pointless. Given that this is simply for demo purposes we shall simply create a table called [Table1].&lt;/p&gt;                  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_5097563E.png"&gt;&lt;img width="419" height="272" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5D91364F.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML4741cca_559993ED.png"&gt;&lt;img width="728" height="146" title="SNAGHTML4741cca" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="SNAGHTML4741cca" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML4741cca_thumb_4DA1F18B.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_1EDC38E9.png"&gt;&lt;img width="404" height="152" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0C273F32.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;OK, we now have a Windows Azure SQL Database, a TFS service (is that Team Foundation Service service???) and a SSDT database project with a simple table in it. Let’s now hook them all together.&lt;/p&gt;  &lt;h3&gt;Add the SSDT project to TFS Source Control&lt;/h3&gt;  &lt;p&gt;Interaction with TFS from within Visual Studio is done using the Team Explorer pane.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_0B4ED948.png"&gt;&lt;img width="367" height="169" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0A76735E.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;From Team Explorer you will need to connect to your new TFS. Click on the address bar in Team Explorer and point to “Connect to Team Projects…”&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_1B7AA141.png"&gt;&lt;img width="501" height="352" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_488F8E0F.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Choose your project and click Connect. Your server is simply the name of the server that was setup earlier; remember that mine was jamiet.visualstudio.com (note that it uses an https connection, not http):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML48ae7f5_0061D233.png"&gt;&lt;img width="530" height="482" title="SNAGHTML48ae7f5" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="SNAGHTML48ae7f5" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML48ae7f5_thumb_6D40A586.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You should now be connected to your Team Foundation Service. Add your source code to TFS Source Control from inside Solution Explorer:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2BC5F32D.png"&gt;&lt;img width="467" height="338" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0AD28086.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_3B858831.png"&gt;&lt;img width="347" height="469" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_487F6842.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And check in your SSDT database project (or “commit” if you prefer that terminology):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_6E08E5A3.png"&gt;&lt;img width="348" height="285" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_3F432D01.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_5E19A0DF.png"&gt;&lt;img width="287" height="518" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_63F44478.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You will now be able to browse to your TFS home page (mine is &lt;a href="https://jamiet.visualstudio.com"&gt;https://jamiet.visualstudio.com&lt;/a&gt;), click on your project and browse through your checked in code:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2279921F.png"&gt;&lt;img width="681" height="387" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_415005FD.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Setup your Publish Profile file&lt;/h3&gt;  &lt;p&gt;You need to tell SSDT where to deploy the project to, that information is stored in a &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/05/09/publish-profile-files-in-sql-server-data-tools-ssdt.aspx" target="_blank"&gt;Publish Profile file&lt;/a&gt;. In Solution Explorer right-click and select “Publish…”&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_78B6172B.png"&gt;&lt;img width="449" height="234" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_49F05E89.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Enter the details of the Windows Azure SQL Database that you prepared earlier:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_1DD36198.png"&gt;&lt;img width="597" height="338" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_75C0B278.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Once the Publish Profile file has been saved it will be saved in your project:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_7B2F231C.png"&gt;&lt;img width="346" height="216" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0175F9AB.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;At the time of writing Windows Azure SQL Database only supports SQL authentication so we have to edit the Publish Profile file to include the password for the account that will be used for deployment. Right-click on the Publish Profile file, select “Open with…” and from the resultant dialog select “XML (Text) Editor:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_40677A46.png"&gt;&lt;img width="485" height="367" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_11A1C1A4.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Edit the Connection String to include your password:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_7761587F.png"&gt;&lt;img width="720" height="168" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_417C6365.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;NOW you can check in:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_55294CF9.png"&gt;&lt;img width="334" height="279" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5450E70F.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2114ADA6.png"&gt;&lt;img width="264" height="490" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_191D0B44.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Create a Build Definition&lt;/h3&gt;  &lt;p&gt;A Build Definition defines how and when the source code in the project should get built. Create a new Build Definition by selecting “Builds” in the Team Explorer address bar and choosing New Build Definition:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_3EA688A5.png"&gt;&lt;img width="358" height="333" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_61F37D4A.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_4ED2509E.png"&gt;&lt;img width="244" height="182" title="image" style="margin:0px;border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0710C7B7.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Follow the steps shown in the screenshots below to setup your Build Definition:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_7F192554.png"&gt;&lt;img width="623" height="426" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_3E0AA5F0.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_319C82C7.png"&gt;&lt;img width="625" height="428" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5B9C80EF.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_55E16749.png"&gt;&lt;img width="623" height="427" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_46CA886F.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_172C69E3.png"&gt;&lt;img width="811" height="478" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_7BA767DF.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;(Credit for informing me about the MSBuild arguments goes entirely to Jakob Ehn and his blog post &lt;a title="http://geekswithblogs.net/jakob/archive/2012/04/25/deploying-ssdt-projects-with-tfs-build.aspx" href="http://geekswithblogs.net/jakob/archive/2012/04/25/deploying-ssdt-projects-with-tfs-build.aspx"&gt;Deploying SSDT Projects with TFS Build&lt;/a&gt;)&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;And you’re done!&lt;/h3&gt;  &lt;p&gt;If you have set everything up correctly then any future check in should trigger a build and thus a Publish of the SSDT project to your Windows Azure SQL Database. Here is my first build report:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_52BC52D6.png"&gt;&lt;img width="490" height="407" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_78B2032C.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;and back in SSDT I can use SQL Server Object Explorer to browse my newly deployed table:&lt;/p&gt;  &lt;blockquote&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_053FB049.png"&gt;&lt;img width="374" height="425" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_4F5ABB2E.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;That’s Continuous Deployment for SSDT projects to Windows Azure SQL Database using Team Foundation Service. Awesome!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Undoing a change will now undo a check-out in Visual Studio 2012</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/01/26/undoing-a-change-will-now-undo-a-check-out-in-visual-studio-2012.aspx</link><pubDate>Sat, 26 Jan 2013 22:41:12 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47327</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;In my blog post &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/10/18/sql-server-devs-what-source-control-system-do-you-use-if-any-answer-and-maybe-win-free-stuff.aspx" target="_blank"&gt;SQL Server devs–what source control system do you use, if any? (answer and maybe win free stuff)&lt;/a&gt; of 18th October 2012 I complained about one aspect of Source Control in Team Foundation Server (TFS) that infuriates me:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;…there are aspects to TFS source control that annoy me day-in, day-out. Chief among them has to be the fact that it uses a file’s read-only property to determine if a file should be checked-out or not and, if it determines that it should, it will happily do that check-out on your behalf without you even asking it to. I didn’t realise how ridiculous this was until I first used SVN about three years ago – with SVN you make any changes you wish and then use your source control client to determine which files have changed and thus be checked-in; the notion of “check-out” doesn’t even exist. That sounds like a small thing but you don’t realise how liberating it is until you actually start working that way.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This evening I have been noodling around in Visual Studio 2012 and noticed that this behaviour has changed, as I shall now demonstrate. I opened an XML file (an &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/05/09/publish-profile-files-in-sql-server-data-tools-ssdt.aspx" target="_blank"&gt;SSDT Publish Profile file&lt;/a&gt; as it happens) that was checked into TFS Source Control:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_49480522.png"&gt;&lt;img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_7922A6E3.png" width="785" height="187" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I made a change to the file and instantly it got checked-out:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2C7E6A40.png"&gt;&lt;img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_156FE904.png" width="799" height="196" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I then simply hit CTRL+Z to reverse the change I had made earlier and CTRL+S to save. At that instant the earlier check-out was reversed:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_6F99C2A0.png"&gt;&lt;img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_2693A0DA.png" width="803" height="220" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Finally…TFS Source Control now determines whether any changes have actually occurred before considering the file “checked-out”. I know this seems like a really minor change but I promise you, it delights me – especially given I use TFS so much (not through choice I might add).&lt;/p&gt;  &lt;p&gt;Perhaps this new behaviour is common knowledge in the TFS fraternity but it was news to me so I figure it might be news to some of you too. Hopefully I’m not the only one that is suitably enamoured upon learning about it.&lt;/p&gt;  &lt;p&gt;Note that I am using Visual Studio 2012 and &lt;a href="http://tfs.visualstudio.com/" target="_blank"&gt;Team Foundation Service&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Using TFSPreview: Step 1, Connecting</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2011/09/28/using-tfspreview-step-1-connecting.aspx</link><pubDate>Wed, 28 Sep 2011 11:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38741</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;In my last cloud-related post - &lt;a href="http://sqlblog.com/blogs/andy_leonard/archive/2011/09/20/introducing-tfspreview-application-lifecycle-management-in-the-cloud.aspx" target="_blank"&gt;Introducing TFSPreview: Application Lifecycle Management in the Cloud!&lt;/a&gt; – I covered how you can create an account to use Microsoft Team Foundation Server in the cloud via a cool new service called &lt;a href="http://tfspreview.com/" target="_blank"&gt;TFSPreview&lt;/a&gt;. In this post, we’ll cover connecting Visual Studio 2010 to TFSPreview and adding a project to TFS Version Control.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Connect!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Open Visual Studio 2010. If you have installed &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=329" target="_blank"&gt;Team Explorer for VS2010&lt;/a&gt;, you will see a “Connect To team Foundation Server” link on the Start Page:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_17.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Clicking this link brings up the Connect to Team Project window. If your TFS server is listed in the “Select a Team Foundation Server” dropdown, select it. If not, click the Servers… button:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_18.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Clicking the Servers… button brings up the Add/Remove Team Foundation Server window:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_19.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This part is the same if you’re connecting to a TFS server on your network. If the TFS server you wish to reach is not listed (TFSPreview is not listed here), click the “Add…” button to open the Add Team Foundation Server window. Enter the server name or URL (in this case it’s the URL to my TFSPreview instance):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_20.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Click the OK button to proceed to sign-in. Click the Windows Live ID link to sign in:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_21.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Depending on your cookie settings (Stay signed in or not), you may or may not be prompted to sign into Windows Live:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_22.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Once sign-in is successful, you are returned to the Add/Remove Team Foundation Server window, and the TFSPreview server with which you connected is listed. If it is not selected, select it and click the Close button:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_23.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Your Team Projects in the Team Projects checked-list is yet another indication of success! Select the Team Projects you wish to access from TFSPreview and click the Connect button:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_24.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If connection succeeds, you are now ready to begin using TFS from within Visual Studio 2010!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Add To Source Control…&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Open the VS2010 solution you desire to manage with TFSPreview (if it is not already open). From Solution Explorer, right-click the solution (or project) and then click “Add Solution to Source Control…”:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_25.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Select the Team Project you wish to use for Application Lifecycle Management (ALM) and click the OK button:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_26.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Check It In!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Once the solution (or project) is added to source control, Solution Explorer indicates this by placing yellow “+” icons beside the objects that will be stored in source control. This indicates TFS is aware of the existence of project artifacts that have not yet been checked in. Right-click the solution (or project) and click Check In…:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_27.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When the Check In window displays, you can add a comment to indicate information about the version. When done, click the “Check In” button:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_28.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Once checked-in, Solution Explorer displays a blue lock icon to indicate the project artifact is now stored in TFS:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;                        &lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_29.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;That’s it – all checked in! You should sleep better tonight.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There are two kinds of developers: those who use source control and those who will.&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>Introducing TFSPreview: Application Lifecycle Management in the Cloud!</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2011/09/20/introducing-tfspreview-application-lifecycle-management-in-the-cloud.aspx</link><pubDate>Tue, 20 Sep 2011 11:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38582</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;At last week’s Build conference in Anaheim California, Microsoft unveiled &lt;a href="http://tfspreview.com/" target="_blank"&gt;TFSPreview.com&lt;/a&gt;. I was able to score access so I set up access to the server, updated Visual Studio 2010, and began playing around with the functionality. This post describes what I needed to do to get my workstation ready for ALM (Application Lifecycle Management) in the Cloud!&lt;/p&gt;
  
&lt;p&gt;&lt;strong&gt;Step 0 – Obtain an Invitation Code&lt;/strong&gt;&lt;/p&gt;
  
&lt;p&gt;I am not sure about Microsoft’s plans or channels to provide more codes. Brian Harry's blog is a good place to monitor for additional activation codes - &lt;a href="http://blogs.msdn.com/b/bharry/archive/2011/09/15/more-team-foundation-service-activation-codes.aspx" target="_blank"&gt;this post&lt;/a&gt; in particular.&lt;/p&gt;
  
&lt;p&gt;&lt;strong&gt;Step 1 – Create the Account&lt;/strong&gt;&lt;/p&gt;
  
&lt;p&gt;Start by browsing to &lt;a href="http://tfspreview.com" target="_blank"&gt;tfspreview.com&lt;/a&gt;:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_0.jpg" width="535" height="308"&gt;&lt;/p&gt;
  
&lt;p&gt;Click the Create Account button at the bottom of the page. This brings up the Account Signup page. Enter an identifier for your Server URL: This will create https://&amp;lt;YourIdentifier&amp;gt;.tfspreview.com. Enter your Invitation Code, read the Terms of Service, and check the “I Accept” checkbox agreeing to the terms. Then click the Sign Up button:&lt;/p&gt;
    
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_1.jpg" width="530" height="305"&gt;&lt;/p&gt;
  
&lt;p&gt;You may need to sign in to sign up – I did. I used my Windows Live ID. After that I had to wait while my account was provisioned. That’s it! When Step 1 is complete you will see a screen similar to the following:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_2.jpg" width="493" height="228"&gt;&lt;/p&gt;
  
&lt;p&gt;&lt;strong&gt;Step 2 – Create a Team Project&lt;/strong&gt;&lt;/p&gt;
  
&lt;p&gt;Click the “create team project” link to begin. When the Create New Team Project window displays, enter the Team Project Name, an optional description, and select a Process Template from the dropdown. Here, I named my Team Project “AndyWeather”, added the description “Manages the &lt;a href="http://andyweather.com"&gt;http://andyweather.com&lt;/a&gt; applications, driven by the @AndyWeather weather station”, and selected the Microsoft Visual Studio Scrum 2.0 – Preview 1 Process Template:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_3.jpg" width="488" height="332"&gt;&lt;/p&gt;
  
&lt;p&gt;I had to wait some while the Team Project was being created – about the same amount of time it takes to create a new Team Project on my local server, so no big surprise there. I think the feedback message is cool:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_6.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;That’s it for Step 2! Click Close.&lt;/p&gt;
  
&lt;p&gt;&lt;a title="Step3" name="Step3"&gt;&lt;/a&gt;&lt;strong&gt;Step 3 – Download Software&lt;/strong&gt;&lt;/p&gt;
  
&lt;p&gt;This took a while when I did it. I’m sure part of the reason was because I was battling a bunch of other early-adopter geeks on release day. My bad. Downloading the software is important because you simply cannot make a connection between Visual Studio 2010 and TFSPreview without it:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_7.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;Clicking the Download Software link took me to a &lt;a href="http://blogs.msdn.com/b/visualstudioalm/archive/2011/09/14/tfs-preview-downloads.aspx" target="_blank"&gt;post&lt;/a&gt; from Martin Woodward:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_8.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;&lt;strong&gt;Step 3.1 – Install Visual Studio 2010 Service Pack 1&lt;/strong&gt;&lt;/p&gt;
  
&lt;p&gt;The first thing I needed to do was install &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=23691" target="_blank"&gt;Visual Studio 2010 Service Pack 1&lt;/a&gt;. &lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_9.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;Click the Download button. You can either click Save to download Visual Studio 2010 SP1 and then manually run it, or click Run to download it and start execution immediately. I clicked Run. Once the file downloaded and executed, I was presented with the following window:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_10.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;Click Next. Read first, check if you agree, and check if you want to send stats back to Microsoft (anonymously):&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_11.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;Click Install:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_12.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;Once complete, click Finish.&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_13.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;I saw nothing in the instructions that informed me I should reboot, but I needed to reboot at this point. I encourage you to do the same.&lt;/p&gt;
  
&lt;p&gt;For me,&amp;nbsp;installing VS 2010 SP1&amp;nbsp;was the most time-consuming step.&lt;/p&gt;
  
&lt;p&gt;&lt;strong&gt;Step 3.2 – Install &lt;a href="http://go.microsoft.com/fwlink/?LinkID=212065" target="_blank"&gt;KB2581206&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
  
&lt;p&gt;After rebooting, return to Martin’s blog and download and install &lt;a href="http://go.microsoft.com/fwlink/?LinkID=212065" target="_blank"&gt;KB2581206&lt;/a&gt;:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_14.jpg"&gt;    &lt;br&gt;&lt;/p&gt;
  
&lt;p&gt;Installing the KB doesn’t take very long:&lt;/p&gt;
  
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_15.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;Click the Next button to execute the installation:&lt;/p&gt;
    
&lt;p&gt;&lt;img src="http://vsteamsystemcentral.com/images/ext/tfspreview_16.jpg"&gt;&lt;/p&gt;
  
&lt;p&gt;You must accept the license terms and it’s cool to send anonymous data back to Microsoft; they use it to improve their processes.&lt;/p&gt;
  
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
  
&lt;p&gt;I like this idea a lot, and I’m testing it using more than just my AndyWeather project. &lt;/p&gt;
  
&lt;p&gt;Next up is Using TFSPreview: Step 1, Connecting.&lt;/p&gt;
  
&lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>TFS Log Substitution Policy</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2011/09/14/tfs-log-substitution-policy.aspx</link><pubDate>Wed, 14 Sep 2011 12:36:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38460</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;
&lt;/p&gt;&lt;p&gt;I recently joined a new client at which &lt;a href="http://msdn.microsoft.com/en-us/vstudio/ff637362" target="_blank"&gt;Team Foundation Server&lt;/a&gt; (TFS) is being used as the source control repository and Continuous Integration (CI) server (I think these things collectively gets referred to as Application Lifecycle Management or ALM for short). I'm fairly ambivalent as to which ALM tools gets used on my projects (in the past year I have used various combinations of &lt;a href="http://www.jetbrains.com/teamcity/" target="_blank"&gt;TeamCity&lt;/a&gt;, &lt;a href="http://jenkins-ci.org/" target="_blank"&gt;Jenkins&lt;/a&gt;, &lt;a href="http://git-scm.com/" target="_blank"&gt;Git&lt;/a&gt;, &lt;a href="https://github.com/" target="_blank"&gt;Github&lt;/a&gt;, &lt;a href="http://subversion.apache.org/" target="_blank"&gt;Subversion&lt;/a&gt; and &lt;a href="http://www.atlassian.com/en_UK/software/jira/?gclid=COvclNnhnKsCFQ0OfAodCGdghQ" target="_blank"&gt;Jira&lt;/a&gt; and haven't had any particular problem with any of them) however returning to TFS did give me an opportunity to try out a utility that I have been intending to look at for a while - &lt;span id="ctl00_ctl00_MasterContent_ProjectTitleControl1_TitleLabel"&gt;&lt;a href="http://logsubstpol.codeplex.com/" target="_blank"&gt;$log$ / Keyword Substitution / Expansion  Check-In Policy&lt;/a&gt; (in the interests of brevity let's call it Log Substitution).&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Log Substitution&amp;nbsp; is a TFS Check-in policy that will look for and replace the string "$log$" with information about that check-in; what that means in practise for us T-SQL developers is that you can include the check-in history of a stored procedure &lt;i&gt;within the stored procedure definition&lt;/i&gt;. Here's an example of what that looks like:&lt;/p&gt;&lt;hr&gt;
&lt;code style="font-size:12px;"&gt;&lt;span style="color:blue;"&gt;CREATE PROCEDURE &lt;/span&gt;&lt;span style="color:black;"&gt;[UKTax].[csp_EntityLoad]&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;@pProcessDetailID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:black;"&gt;SMALLINT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&lt;/span&gt;&lt;span style="color:gray;"&gt;,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;@pDomain&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:black;"&gt;64&lt;/span&gt;&lt;span style="color:gray;"&gt;)&lt;br&gt;,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;@pUserName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:black;"&gt;255&lt;/span&gt;&lt;span style="color:gray;"&gt;)&lt;br&gt;,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;@pRowCount&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:black;"&gt;INTEGER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;= &lt;/span&gt;&lt;span style="color:black;"&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OUTPUT&lt;br&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;AS&lt;br&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;/*&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;lt;history&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $log$&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Previous Revision 3104 2011/09/09 14:42:36&amp;nbsp;&amp;nbsp;Sup_ThomsonJ&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; refactoring. Eliminated duplicate code - now adhering to DRY&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Previous Revision 2974 2011/09/08 17:13:43&amp;nbsp;&amp;nbsp;Sup_ThomsonJ&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Transaction needs to be committed&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Previous Revision 2898 2011/09/01 09:58:31&amp;nbsp;&amp;nbsp;Sup_ThomsonJ&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Adding $log$ directive for substitution policy&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/history&amp;gt;&lt;br&gt;*/&lt;br&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;BEGIN&lt;br&gt;&amp;nbsp;&amp;nbsp; SET NOCOUNT ON&lt;/span&gt;&lt;span style="color:gray;"&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;SET &lt;/span&gt;&lt;span style="color:black;"&gt;ANSI_WARNINGS &lt;/span&gt;&lt;span style="color:blue;"&gt;ON&lt;/span&gt;&lt;span style="color:gray;"&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;SET &lt;/span&gt;&lt;span style="color:black;"&gt;ANSI_NULLS &lt;/span&gt;&lt;span style="color:blue;"&gt;ON&lt;/span&gt;&lt;span style="color:gray;"&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;SET &lt;/span&gt;&lt;span style="color:black;"&gt;DATEFORMAT DMY&lt;/span&gt;&lt;span style="color:gray;"&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;--code goes here etc...&lt;br&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;END&lt;/span&gt;&lt;/code&gt;&lt;hr&gt;

&lt;p&gt;&amp;nbsp;As you can see we have a comments section that contains, for each check-in, the following information:&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The most recent revision number for this file prior to the check-in &lt;br&gt;&lt;/li&gt;&lt;li&gt;Date and time&lt;/li&gt;&lt;li&gt;The person checking-in&lt;/li&gt;&lt;li&gt;The check-in comment&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;I asked the various communities within the company what they thought of this and was interested to discover that the .Net developers seemed dead against it - they didn't see the point in copying the check-in information to a different place - whereas the SQL developers were all for it; their reasoning was that it is useful to be able to look at a stored procedure in a production environment and see who to blame when it goes wrong. If you think about it there is no analogy to stored procedures for .Net developers because .Net source code does not get deployed, the compiled object code does, so perhaps its not surprising that there is a dichotomy of opinion here.&lt;/p&gt;&lt;p&gt;I should point out that there is a downside to TFS Check-in policies - they are enforced on the client rather than on the server (which is stupid) and moreover this means that a client install is required. This seems like a rather large limitation to me and although the problem can be alleviated somewhat by the use of &lt;a href="http://msdn.microsoft.com/en-us/vstudio/bb980963" target="_blank"&gt;TFS Powertools&lt;/a&gt; that, again, requires those Powertools to be installed everywhere beforehand (why the TFS Powertools don't just get delivered with &lt;a href="http://msdn.microsoft.com/en-us/library/ms181304%28v=VS.100%29.aspx" target="_blank"&gt;Team Explorer&lt;/a&gt; is beyond me). Anyway, if you can get around those little nuances Log Substitution can be a useful little utility and given that it went down so well with my fellow SQL developers here I thought it might be worth sharing with all of you. Let me know if you have any opinion on Log Substitution, especially if you have installed it and used it yourself.&lt;/p&gt;&lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@jamiet&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>