Monday, February 15, 2010

Visual Studio 2010 Has Database Comparison Tools!

Once of the common pain points for me as a developer is deploying database changes from my development environment (generally my laptop) out to a test/staging server.  It's not always a great idea to just blow away the test/staging database and replace it with my local copy, as there may be other things in place that I don't want to get rid of.  Besides, there are usually differences between the security/user configurations on my local machine as compared to my test/staging servers.

This is where database comparison tools come into play, giving developers the ability compare two databases and generate scripts to update one or the other.  I have been a long-time user of one such tool, but I have always disliked the fact that Microsoft has never provided this sort of functionality from directly within their database tools.  As far back as Query Analyzer in SQL 2000, it seemed like there should be a diff tool built in.  Especially once we went to SQL 2005, and Management Studio got an interface that more closely tied into Visual Studio, it felt like a database diff tool was a pretty glaring omission.

Microsoft has rectified this problem in Visual Studio 2010, providing what appears to me to be an extremely capable comparison tool that allows for schema and data comparisons, at least in the Ultimate Edition.  This morning, I used the new schema comparison tool to script and deploy changes to a test server for a project I am working on.  I'm not going to go into any detail here about how tool works or how to use it, as the point of this post is simply to say that I am really stoked about the new tool and especially how nicely integrated the whole thing is into Visual Studio.

As I get a chance to use these tools more, I'll put together a few posts on how to use this new functionality.

UPDATE:  As I dug into this more, I learned that Visual Studio 2005 and 2008 also had the schema and data comparison tools, but were only present in the Database Edition and Team Suite, neither of which I was running.  I'm not 100% sure how the various editions are going to break down for 2010.

No comments: