Getting your SQL Server databases under source control

Here’s a tip – There is a free download available called SQL Server Data Tools that lets you put your databases into source control (I’m using TFS).

Check it out here – http://msdn.microsoft.com/en-gb/data/tools.aspx

It comes with the facility to do a schema compare which is useful just in itself if you havent shelled out for Redgates SQL Compare.  It only compares schemas though, not data.  However it will apply changes to a database for you, so for example you can compare your files in source control with the dev/live database and then apply any differences with the click of a button.

I’m hoping to use this to facilitate continuous integration and have an automated test build of our data warehouse databases – I will post back with details when it’s all set up and running.