Click here to Skip to main content
15,569,525 members
Articles / Programming Languages / SQL
Posted 22 Feb 2012



What do you use for Database Source Control?

22 Feb 2012CPOL2 min read
Article about Red Gate's SQL Source Control

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

By Enrique Lima (reproduced with permission from

I have found myself using tools from Red Gate Software more and more. In my experience they have proven to be both effective and to the point.

Today I’m talking about the SSMS plug-in SQL Source Control. It’s simple to use and makes adding a database to Change Control easy, which really is the goal. Don’t get me wrong, Visual Studio is a great tool, but it’s a developer’s tool. As a DBA or Database Developer (referring to an individual who codes T-SQL) I want to launch SQL Server Management Studio and be able to control my environment from there. This is where SQL Source Control shines as it integrates into SSMS. It allows me to enrol a database into source control and control my resources.

Here is the step-by-step process I followed:

First you will come to the Welcome Screen and the status of the Database being enrolled.


Begin by linking a database to source control. I am connecting mine to TFS, but it can connect to other environments as well. Also important to note, SQL Source Control works really well with new and existing databases.

In my scenario I used AdventureWorksLT.

The first thing I did was create a location within my branching structure in TFS to store the DB Source.


There are two operating modes, dedicated or shared. Again this will depend on the approach your developers take - the dedicated method is where everyone has a copy of the database, the shared model is where there’s a central database everyone works from.

Once the Link process has started, you will see an object enrolment process. When it completes you will see the DB icon turn green as a visual indicator stating the DB is now under source control.


If you right-click on the database and select Commit Changes, you will get a list of the items that will be added. As you click on the items in the list there will be a window displaying the changes in T-SQL.


Click Commit.


Once the check-in completes you will notice the blue dots are no longer on the folders, which means all items are synchronized and current.

As I mentioned above, it’s a very straight forward process and a great tool for Change Management to put in effect in your DB environment.

Why not put your database under source control now? It will only take 5 minutes and it could be the best 5 minutes you spend this year. Find more information and a free trial of SQL Source Control here.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Red Gate Software Ltd.
United Kingdom United Kingdom
Redgate makes ingeniously simple software used by 804,745 IT professionals and counting, and is the leading Microsoft SQL Server tools vendor. Our philosophy is to design highly usable, reliable tools which elegantly solve the problems developers and DBAs face every day, and help them adopt database DevOps. As a result, more than 100,000 companies use products in the Redgate SQL Toolbelt, including 91% of those in the Fortune 100.
This is a Organisation

1 members

Comments and Discussions

GeneralUse it and love it Pin
Duncan Edwards Jones22-Feb-12 7:32
professionalDuncan Edwards Jones22-Feb-12 7:32 
Got my employer to purechase this and it has already paid for itself.
Ex Datis:
Duncan Jones

Free eBook: Printing - a .NET Developer's Guide (Part 1)

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.