tags:

views:

3999

answers:

11

I'm working on an open source project that uses SQL Server 2005 as the data store. We need a DB compare tool to generate diff scripts to be able to upgrade a DB from one version to another.

Is there an open source or free SQL Server DB diff tool out there that generates a convert script?

+3  A: 

It's not open source, but is free (as in beer): Sql Effects Accord (aka Clarity) Community Edition

Mark Brackett
A: 

Hmm, none that I know of. You can always retrieve the definitions as SQL and then run a diff tool on them, but it's a bit of a pain in the rear.

Probably the best solution for this is using some kind of "Migrations" tool, so you can keep your database definitions together with your code, and version them, etc.

dguaraglia
A: 

@Mark - Thanks for the link. I installed and tried SQL Effect Accord (community edition) and it does a good compare of DB's but does not generate the SQL script necessary to convert (update) one DB to the other. It also appears that the commercial edition of the software does not do this. Please correct me if I'm wrong.

Guy
A: 

Update

On Sourceforge I found Whiz SQL Structure Compare with this description: Whiz is a database diff utility which will be useful to find difference between two MS-SQL Server databases. It also able to generate SQL script to update the changes from one database to another database.

However, I've been unsuccessful in getting it to work so far...

Guy
+4  A: 

On CodePlex I noticed yesterday DbDiff (http://www.codeplex.com/OpenDBiff) that you could try. Supports Sql2005 and 2008, I did not try it.

ila
This doesn't seem to work on Win7 64bit.
Marc
It did not work for me on Win7 64bit, but i managed to build it from source (added some missing dlls from Binary distribution, and System.Data.SQLite.DLL from a copy of SubSonic). It took me 5 minutes or so to do. Give it a try - it seems to produce good results (generates a sync script). Have run tested the scripts yet, but the tool looks very promising.
Muxa
+4  A: 

I'd recommend spending some cash and getting Red Gate's SQL Compare tool which does an excellent job, and can even compare databases to Visual Studio database projects to generate upgrade scripts. It's fast and easy to use, and works well. The upgrade scripts are also of decent quality.

It's not that expensive. Probably less expensive than your time. Just think about how much your hourly rate is, and how many hours it might take to investigate an open-source tool and get it working (and how many you have already spent), then multiply them together. That's how much a 'free' tool is really costing you, which is often significantly more than a commercial tool.

Greg Beech
This argument can be used to justify purchasing EVERYTHING, from Aeron chairs to 40" screens to people who're standing behind you and massage your back.For a small business with no sales yet, which has to purchase many more items, $400 for SQL Compare is simply a waste of funds. Contrast this with Typemock Isolator which costs $90 "For solo developers who work at home", Beyond Compare which costs $30, visualSVN whinc costs $50 - you see my point (all numbers are rounded).They should have made a "personal" version.
Avi
+1  A: 

Aloha

You might want to try SqlDbDiff. It can generate change scripts. The free edition does a good enough job.

edosoft
Freeware version only supports SQL2000.
Lee
@lee are you sure, I've used it on SQL 2005 boxes. Not sure about sql2008 though
edosoft
Lee
+7  A: 

I think that Open DBiff does a good job. It's simple and I works with SQL Server 2005/2008.

But only generate the change script. Nothing more and nothing less.

A: 

We have both SQL Delta and SQL Compare. Each has strengths, but each also have weaknesses that make them quite a pain.

SQL Delta will miss some triggers in its comparison, and it will take actions not found in the action list, and it will sometimes take actions you did not want it to take. That was discovered at quite a cost in time.

SQL Compare will catch the triggers, but they are embedded within the table listings. On a large database, that means going through each table and sifting them out. Something the tool should have isolated for us. Again, quite a cost in time.

+1  A: 

AdeptSQL Diff and DataDiff are wonderful products, much cheaper than RedGate's and a much more simplified UI, and I have yet to run into a scenario it cannot handle.

Wes