Click here to Skip to main content
Click here to Skip to main content

What do you use for Database Source Control?

, 22 Feb 2012 CPOL
Article about Red Gate's SQL Source Control

Editorial Note

This article is in the Product Showcase section for our sponsors at CodeProject. These reviews 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 http://geekswithblogs.net/enriquelima/archive/2011/05/02/what-do-you-use-for-database-source-control.aspx)

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.

330179/ELimage1new.png

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.

330179/elimage2new.png

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.

330179/elimage3new.png

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.

330179/elimage4b.png

Click Commit.

330179/ELimage5.png

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.

License

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

Share

About the Author

Red Gate Software
Red Gate Software Ltd.
United Kingdom United Kingdom
Red Gate Software makes ingeniously simple tools used by over 650,000 Microsoft technology professionals working with .NET (incl. ASP.NET), SQL Server, Azure, and Oracle. More than 100,000 companies use our products, including 93% of the Fortune 100.

Our philosophy is to design highly usable, reliable tools which elegantly solve the problems that developers and database administrators face every day.
Group type: Organisation

4 members

Follow on   Twitter   Google+

Comments and Discussions

 
GeneralUse it and love it PinmemberDuncan Edwards Jones22-Feb-12 7:32 
Got my employer to purechase this and it has already paid for itself.
'--8<------------------------
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    Rant Rant    Admin Admin   

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

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141216.1 | Last Updated 22 Feb 2012
Article Copyright 2012 by Red Gate Software
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid