2

I need to compare if two developers did the job correctly and created identical tables.

The problem is more complex, but I will try to solve it somehow if I solve the problem of comparing two tables (let them be in different SQL Server 2008 databases) and their properties. No data needs to be compared.

1 Answers1

1

According to https://stackoverflow.com/a/1930040/477035

In SQL Server Management Studio, right click on your database and choose 'Tasks' -> 'Generate Scripts'. You will be asked to choose which DDL objects to include in your script.

I would guess you can then diff the DDL.

  • There is a number of comparison tools as well, some of which come with a trial period, so can be used for free. I'm disinclined to suggest specific software titles though :-) –  Aug 15 '12 at 19:17
  • but I have plenty of columns (that's why I wrote 'huge' tables) ... I don't want to manualy compare. – Robert Jung Aug 16 '12 at 13:08
  • @Robert: when I wrote "diff", I meant something like diff joe.ddl jim.ddl - an automated comparison. See http://en.wikipedia.org/wiki/Diff and http://gnuwin32.sourceforge.net/packages.html – RedGrittyBrick Aug 16 '12 at 13:12