DBComparer is a utility for:
Usually this tool is used to check development databases against other versions, or test databases against each other or a reference database.DBComparer relies on the capabilities of the database to extract the needed information (data and definitions) using special meta-data queries.
After configuring the several queries to get metadata from the database (see Installation/Configuration below), press on one of the compare DB buttons to start fetching either data, definitions or both.
The data are fetched using "select * from <tableName> order by <keys>", where <keys> are either the table's primary keys or just 1 (the first column), if no primary keys are defined. The generated select statement is written in the first line of the dump file for checking.
Fetching can be cancelled anytime by clicking on Cancel Compare. Progress can be monitored in the status area left to the cancel button.
When dumping data and definitions, the whole source and target folder can be removed before. If it's not removed, you can decide whether to skip already fetched tables/objects. This is useful when resuming a cancelled dump operation. Of course the removal of the folders is always the safest comparision option, as data/definitions might have changed in the meantime.
There is also a command line interface which can be accessed by
DBCompare.exe DATA|DEFS|CLEAN|SKIP dbcompareDefinitionFile1 [[dbcompDefFile2] dbcompDefFile3]]
DATA...dump DATA using the following dbcompare Definition Files
DEFS...dump DEFINITIONS (Views, Triggers, Stored Procs using the following dbcompare Definition Files
CLEAN...remove the DATA and DEFINITIONS before comparing (the top source/target folder is removed)
SKIP...skip any existing DATA or DEFINITION files (continue with a cancelled dump)
DBCompare.exe DATADEFS dbcFile1 ... compares data and definitions according to dbcFile1...
DBCompare.exe DATACLEAN dbcFile1 ... compares data according to dbcFile1 and removes source and target folders before...
DBCompare.exe DEFS dbcFile1 dbcFile2 . compares definitions according to dbcFile1 and then according to dbcFile2 ...
First you need to have a diff utility capable of handling differences on a folder level, such as WinMerge.The installation is simply done by putting the executable DBComparer.exe into a folder of your choice.
Configuration is done in so called dbcompare definition files. You can there define
Currently only tested with MS SQL Server 2000 and 2005.