0

I need to build job which will compare two databases and if there are some changes it should report about it.

I have found 1) Red Gate API tool - too expensive 2) https://github.com/schambers/fluentmigrator - not exactly what I need 3) http://blog.apexsql.com/apexsql-diff-api-discontinued/ - discontinued

So only 1 way is manually building some code for comparing sql objects? Please advice

Sergey
  • 7,933
  • 16
  • 49
  • 77
  • No product recommendations. Otherwise: VISUAL STUDIO.´SSDT (SQL Server Data Tools) can do that for years. – TomTom Mar 04 '16 at 15:02
  • TomTom, the tool which you described I use for years, but it is not what I need. I need some nuget package or API which will help figuring out the differences in the code – Sergey Mar 04 '16 at 15:05
  • 2
    I tried to do this very thing, and spent some 3 days reading about different approaches. In the end, I wrote my own tool which proved to be the most useful. Reading from the SYS tables (in MsSQL) and writing to an XML file of a known db, do the same on another, and then do a comparison of the XML nodes. Learning an API would mean less repeated effort, but I'm a big advocate of just writing it yourself. – Alex Mar 04 '16 at 15:07

1 Answers1

1

Liquibase can compare databases and create XML file with differences.

It is the diff feature: http://www.liquibase.org/documentation/diff.html

Martin Staufcik
  • 8,295
  • 4
  • 44
  • 63