[Updated Again!] RedGate SQL Source Control and Team Foundation Service

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 ServiceMicrosoft’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.

Prerequisites

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:

SNAG-0000
Figure 1

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:

 SNAG-0001
Figure 2

Click the Help dropdown and click “Check for Updates…”:

CheckForUpdates
Figure 3

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:

SNAG-0003
Figure 4

Download the new version. You will need to shut down SSMS to install the update as shown in Figure 5:

SNAG-0008
Figure 5

Once the update is installed, re-open SSMS 2012. Connect to an instance and select a database:

SNAG-0012
Figure 6

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:

SNAG-0013
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:

 TFSFigure8
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

 ConfigurationLink
Figure 9

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:

SNAG-0021
Figure 10

Edit the file according to the instructions on the support page:

ConfgifFileEdit
Figure 11

When complete (at the time of this writing), the file will appear similar to that shown in Figure 12:

SNAG-0023
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:

SNAG-0026
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:

SNAG-0029
Figure 14

After reaching my Team Foundation Service site, I clicked the Browse button to select a database folder as shown in Figure 15:

 TFSFigure15
Figure 15

I selected a Team Project (Demos) from my default collection of TFS Team Projects and created a folder named CloudDemo:

 TFSFigure16
Figure 16

Once the folder was created I could select it as shown in Figure 17:

 TFSFigure17
Figure 17

Returning to the Link to Source Control window, I see my selected Database folder:

 TFSFigure18
Figure 18

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:

image
Figure 19

The First Commit

I see a visual indication the database is under SQL Source Control in the SSMS 2012 Object Explorer:

image
Figure 20

Objects added to the database – like the RainDrops table shown in Figure 21 – are marked visually for Commit:

image
Figure 21

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:

image
Figure 22

When the Commit operation completes, SQL Source Control provides excellent feedback:

SNAG-0048
Figure 23

Awesome!

Conclusion

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:

 TFSFigure24
Figure 24

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.

:{>

Andy Leonard

andyleonard.blog

Christian, husband, dad, grandpa, Data Philosopher, Data Engineer, Azure Data Factory, SSIS guy, and farmer. I was cloud before cloud was cool. :{>

6 thoughts on “[Updated Again!] RedGate SQL Source Control and Team Foundation Service

  1. Just to say that the whitespace thing seems to be really critical. I initially had mine split over lines as in the example, but I got the screen saying I needed to install the team explorer client. Moved everything to a single line and it worked

  2. Have you ay idea what the URL’s were that you had to add. I can’t seem to get my connection working. Its telling me that Team Foundation Services are not available at the URL I have specified. I’m wondering if its a security issue as I’m running WIndows 2008 on my laptop

  3. OK. It turned out my issue was some old TFSPreview instructions that told me to add port 8080 to the URL. Once I took this out it just worked
    Doh!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.