Validating database schema
But, if you are using it already: do you know any other cool trick or tweak?
Before we dive into the details of creating XSD schemas, lets understand how to use them for validating XML documents.
It's just a small, free utility that shows you schema differences :) Which RDBMS is this, and how complex are the potential changes?
Maybe this is just a matter of comparing row counts and index counts for each table -- if you have trigger and stored procedure versions to worry about also then you need something more industrial Try db Forge Data Compare for SQL Server.
As far as I know there's nothing free that does this unless you feel like writing your own.
Redgate is cheap enough that it might as well be free.
Many of the queries were using LEFT JOINs with IS NULL to check for the absence of expected items, others were comparing things like column types or constraint names. I found this small and free tool that fits most of my needs.
On my current gig this was no problem at all, as the DBA's here were already using it.
The basic methodology for using these tools is to maintain a reference script that builds the database and keep this in version control.
Is there a tool or a framework (to use programatically) with built-in features to do that?
Or is there some simple algorithm to run this comparison?