I have found myself using more and more of the tools Red Gate software makes.  They have proven (to me) to be effective and to the point.

This time I am talking about SQL Source Control.  Simple to use, simple to add a database to be under Change Control, which really is the goal. Don’t take me wrong, Visual Studio is a great tool, yet it is a developer’s tool.  As a DBA or Database Developer (referring to an individual who codes T-SQL) we want to launch SQL Server Management Studio and be able to control our environment from there.  This is where SQL Source Control shines, it integrates into SSMS.  It allows me to enroll a database into source control, and then check-in and check-out and control my resources.

I am including a step by step of the process I followed.

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

4-23-2011 6-41-02 PM

The process starts by linking a database to Source Control.  I am connecting mine to TFS, but the fact is it can connect to other environments too.  Also important to note, it works really well with new or existing databases.

For example in my scenario I used AdventureWorksLT.

First, I add it.  Mind you, the first thing I did was created a location within my branching structure in TFS to store the DB Source.

4-23-2011 6-49-28 PM

There are two operating modes, dedicated or shared.  Again will depend on the approach your devs take, one is everyone has a copy or there is a central database everyone works towards.

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

4-23-2011 6-49-53 PM

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

4-23-2011 6-50-50 PM

Click on Commit.

4-23-2011 6-51-01 PM

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 is a very straight forward process, and a great tool for Change Management to be in effect for you DB environment.