DB Comparison tool that I can schedule

137 Views Asked by At

I'm after a DB Comparison tool for SQL Server that allows me to do the following:

  • Schedule a comparison to happen on a recurring schedule
  • Email me the results (in a nice readable format and not the generated script)
  • Allow me to exclude/include certain object names (for example exclude table names containing %test%. That's not a real example but there is a good reason why that would come in useful.)

As well as the obvious:

  • Have the usual options for ignoring things like comments, identity seeds etc
  • Options for selecting different types of objects

If it was free or at least didn't cost a forture that would be an extra bonus of course.

I have tried out RedGate's SQL Compare and also the built-in DB Comparison in Visual Studio but neither seem able to do the first 3 points above. I also looked at other tools recommended in various threads on here but again they don't mention in their features the 3 points above.

One option I found is RedGate's SQL Comparison SDK with which I think I could write something to do what I want.

I just wanted to investigate tools that might do all of the above out of the box.

Thank you!

2

There are 2 best solutions below

1
On BEST ANSWER

SQL Compare Pro comes with a command line, which will be easier to set up than the SDK. If you call this via the Windows Scheduler or in an Agent Job you can achieve what you're looking for.

An example of how to invoke the command line from Powershell it can be found here: http://www.simple-talk.com/sql/database-administration/auditing-ddl-changes-in-sql-server-databases/

This article also covers how to send an email in Powershell. SQL Compare can also be passed a filter using the /filter switch to exclude objects based on various rules.

http://www.red-gate.com/supportcenter/Content/SQL_Compare/help/10.0/sc_cl_Switches_in_the_cl

Do please email [email protected] should you have trouble getting this working.

1
On

I don't think any tool would do all of this out of the box. Have you had a chance to look at sp_CompareDB. I had a similar requirement and ended up writing my own routine based on the same.

http://www.sql-server-performance.com/2001/database-comparison-sp/