31 Oct 2012 Update 2: Microsoft made Team Foundation Service (formerly TFSPreview) public today! – Andy
31 Oct 2012 Update 1: SQL Source Control 3.1 is available! - Andy
12 Oct 2012 Update: The SQL Source Control 3.1 update is currently unavailable. I will provide additional updates when this version is re-released. - Andy
I am excited that RedGate’s SQL Source Control now supports connectivity to
TFSPreview Team Foundation Service, Microsoft’s cloud-based Application Life Cycle Management portal. Buck Woody (Blog | @buckwoody) and I have written about TFSPreview (the test version of Team Foundation Service) at SQLBlog already:
Microsoft’s commitment to cloudtech is strong and producing very cool features, in my humble opinion. It’s neat to see third-party vendors like RedGate providing connectivity to these features.
SQL Source Control’s support for Team Foundation Service is new and there are software prerequisites at the time of this writing (Oct 2012):
You must have these tools installed to use SQL Source Control 3.1 with Team Foundation Service.
Setup Your Free Trial
Navigate to the SQL Source Control download page:
Download and install SQL Source Control 3.0.
Once SQL Source Control 3.0 is installed, open SSMS 2012. Your environment should display the SQL Source Control page shown in Figure 2:
Click the Help dropdown and click “Check for Updates…”:
At the time of this writing, you will find an available update from SQL Source Control 3.0 to version 3.1 as shown in Figure 4:
Download the new version. You will need to shut down SSMS to install the update as shown in Figure 5:
Once the update is installed, re-open SSMS 2012. Connect to an instance and select a database:
Click the link labeled “Link database to source control”. When the Link to Source Control window displays, select the Team Foundation Server (TFS) Source Control System option. If you do not have the Team Explorer for Visual Studio 2012 client installed, you will receive the error displayed in Figure 7:
If the Team Explorer for Visual Studio 2012 client is installed you will be presented with a screen similar to that shown in Figure 8:
But you cannot yet use SQL Source Control with Team Foundation Service. First, click the link beneath the Server URL textbox that states “To link to TFS2012 or tfs.visualstudio.com, you must edit a config file. Learn more”
Follow the link to the support page and then follow the instructions on the page. Open the RedGate_SQLSourceControl_Engine_EngineOptions.xml file as shown in Figure 10:
Edit the file according to the instructions on the support page:
When complete (at the time of this writing), the file will appear similar to that shown in Figure 12:
I set up SQL Source Control on a new Windows Server 2012 virtual machine, so there were a lot of default permissions in place. When attempting to connect with Team Foundation Service, I had to add several (~8) URLs to Trusted Sites. Even after that, I saw the Windows Live login screen appear briefly before being replaced by the message window in Figure 13:
I closed this window and attempted to connect to Team Foundation Service once more and was successful, reaching the screen shown in Figure 14:
After reaching my Team Foundation Service site, I clicked the Browse button to select a database folder as shown in Figure 15:
I selected a Team Project (Demos) from my default collection of TFS Team Projects and created a folder named CloudDemo:
Once the folder was created I could select it as shown in Figure 17:
Returning to the Link to Source Control window, I see my selected Database folder:
Click the Link button to start the Source Control Link process. A message balloon informs me the link is complete, as shown in Figure 19:
The First Commit
I see a visual indication the database is under SQL Source Control in the SSMS 2012 Object Explorer:
Objects added to the database – like the RainDrops table shown in Figure 21 – are marked visually for Commit:
The Commit Changes tab of the SQL Source Control window provides a space to enter version comments before performing the Commit operation as shown in Figure 22:
When the Commit operation completes, SQL Source Control provides excellent feedback:
Source-controlling code of any kind is important. Having the ability to store source code remotely is handy for many Application Life Cycle Management scenarios. tfs.visualstudio.com is constantly adding features to support developers practicing continuous (or continual) integration methodologies.
I like the manner in which SQL Source Control approaches database source control. I especially like that when I log into the Source page of my project at Team Foundation Service, I see something that looks similar to Object Explorer:
I admire the thought RedGate put into the design of SQL Source Control and believe the product is well-positioned to support database development now and – with the addition of tfs.visualstudio.com support – for the foreseeable future.