2

I am using SQL Server 2008, can you recommend me some tool that I will be able to compare two database instances?

Also I want to be able to choose what tables and columns should participate in the comparison.

I want to add it to our automation testing.

Thanks.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Night Walker
  • 20,638
  • 52
  • 151
  • 228
  • possible duplicate of [compare 2 different databases table columns](http://stackoverflow.com/questions/4922987/compare-2-different-databases-table-columns) See also [this](http://stackoverflow.com/q/176316/73226), [this](http://stackoverflow.com/q/4368910/73226) – Martin Smith Oct 01 '11 at 07:50
  • What's the nature of the automation you're looking to do? – David Atkinson Oct 01 '11 at 11:36
  • @David Atkinson, I want to run my application with some input , store aside the DB image and them make automation with compare against the stored image . – Night Walker Oct 01 '11 at 20:16
  • This is certainly possible with sqlcompare.exe as you can use this to compare databases, schema snapshots or even source controlled databases. Are you using a unit testing framework for this? – David Atkinson Oct 01 '11 at 22:57
  • @David Atkinson, yes I am using a nunit framework. – Night Walker Oct 02 '11 at 04:14
  • We use the same. Do let support@red-gate.com know if you need any help getting sqldatacompare.exe working for you. – David Atkinson Oct 03 '11 at 17:00

2 Answers2

3

Red Gate's SQL Data Compare can do what you need. It is not particularly expensive, especially if you buy it as part of a bundle (check out some of their other products - they have a lot of useful tools) and you get a free trial so you can see if it works for your situation before you buy it.

I have used it and it works well. It allows both comparison and snychronization of data between two databases, even if the schemas are slightly different.

For the feature "Command line automation for continuous integration" you will need the Pro edition.

Mark Byers
  • 811,555
  • 193
  • 1,581
  • 1,452
0

If you're using Visual Studio 2010 for coding along with SQL Server 2008, you can use the Schema Compare and Data Compare tools that comes along with Visual Studio 2010.

Here are some resources:

Bryan Hong
  • 1,483
  • 13
  • 28