THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Andy Leonard

Andy Leonard is CSO of Linchpin People and SQLPeople, an SSIS Trainer, Consultant, and developer; a Business Intelligence Markup Language (Biml) developer; SQL Server database and data warehouse developer, community mentor, engineer, and farmer. He is a co-author of SQL Server 2012 Integration Services Design Patterns. His background includes web application architecture and development, VB, and ASP. Andy loves the SQL Server Community!
Note: Comments are moderated. Spam shall not pass! </GandalfVoice>

[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.

:{>

Published Wednesday, October 31, 2012 10:30 AM by andyleonard

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Rake0 said:

Hi, any idea when you will re-release 3.1?

October 15, 2012 5:17 PM
 

andyleonard said:

Hi Rake0,

  SQL Source Control 3.1 has been re-released!

:{>

October 31, 2012 10:51 AM
 

Jason Clements said:

November 7, 2012 10:43 PM
 

Kevin O'Donovan said:

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

December 10, 2012 2:29 PM
 

Steve Powell said:

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

February 1, 2013 11:02 AM
 

Steve Powell said:

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!

February 1, 2013 3:09 PM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

My Company


Other Blog

Check out my personal blog...
http://andyleonard.me

Contact Me

Twitter: @AndyLeonard
Email: andy.leonard@gmail.com

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement