views:

61

answers:

3

We are starting a new BI project in our company. We have at least three developers working with database design and development. Our tools include Sparks EA, SQL Server 2008 EE and undetermined reporting tools. What kind of tools one can use for database version control in SQL Server? What kind of version control systems there are available for database development (managing versions of database schema, tables, stored procedures etc.)?

A: 

Often it's easier to export a set of scripts that would create your database from scratch, and put those in version control instead.

Then, if you want to upgrade a database to a "version" from source control, you could use a tool like SQL Compare or "Data Dude" to compare two databases (or creation scripts and a database) and apply the changes from one to the other.

Neil Barnwell
Thanks, but how to implement this "version control". I was thinking that is there some tools e.g. inside SQL Server or Visual Studio to do this?
juur
You and/or your team presumably has some sort of version control system, such as Subversion, CVS, Mercurial, Git or even VSS. Put the scripts in there and tag them with the "version" of the database.
Neil Barnwell
Thanks, we do not currently have any version control system. We are thinking to start using one of those.
atricapilla
+1  A: 

Visual Studio Team System includes the Database Edition features for database source control, deployment, schema comparison and more. You don't necessarily need a tool to do database versioning but if you do want a tool then VSTS is one option.

dportas
Thanks. What do you mean by saying that I don't necessarily need a toll for database versioning. Is there another option?
juur
Yes. Just save the source code for each version. Any source control system will do that for you.
dportas
Thanks, I was thinking of using subversion for this purpose, we'll see.
juur
A: 

We create all database changes in scripts, never use the GUI. Then save the scripts in folders that are part of our Subversion store just like any other piece of code. Since our configuration management people will not push to prod without a script, we have no rtrouble at all enforcing this. The beauty is that you have all the scripts you need for a particular change located together and those in another change not yet ready to go to prod are not pushed by accident.

We store all our SSIS packages as files as well and we store our configurations in sripts as well and push them the same way.

Should you want to do a comparison between databases to make sure nothing was missed, I highly recommend SQLCompare by Red-gate.

HLGEM
Thank you very much! This helped a lot.
atricapilla
IF you're looking to source control schema objects, SQL Source Control is the correct Red Gate tool to use (http://www.red-gate.com/products/SQL_Source_Control/). This integrates with SSMS, supports TFS and SVN as repositories, and is compatible with SQL Compare Pro. However, you'll have to save your SSIS packages independently.
David Atkinson