Skip to content

Repository files navigation

DB Compare

DB Compare 10.1.2

DB Compare 10.1.2 is a major upgrade.

DB Compare compares two SQL Server databases and generates a report of any schema differences. Generate Scripts is no longer a work in progress and now works really well.

Purpose: Ensure all copies of a database have the same schema.

Download

Installers are available on the Releases tab located on the right side of this page.

What Gets Compared

  1. Tables
    • Fields: data type, size, nullable, and other information about each field
    • Indexes
    • Foreign Key Constraints
    • Default Value Constraints
  2. Views
  3. Stored Procedures
  4. Functions

What's New in Version 10

Composite Indexes and Foreign Keys

Indexes and Foreign Key Constraints have been completely overhauled. The previous version only handled single-field indexes and foreign keys. Now composite Indexes and Foreign Key Constraints made up of one or more fields are loaded and compared.

Smarter Default Value Constraints

Default Value Constraints now check non-numeric defaults, such as GETDATE(), NEWID(), or string defaults like 'Pending'.

Generate Scripts

Generate Scripts has also gone through a major upgrade:

  • Generated tables now keep the same field ordinal order as the source table.
  • Indexes and Foreign Key Constraints are now scripted in one pass. Before, this either took two passes or wasn't supported.

Requirements Source Code Version

  • Visual Studio 2026
  • SQL Server or SQL Server Express

Powered By

DB Compare is powered by the NuGet package DataJuggler.NET.Data, which reads the database schema used for each comparison. Version 10.1.2 of the package matches this release.

History

This project has been around since about 2010, when it was built on the .NET Framework. It has since been updated to .NET 10.

Credits

I have to give Claude credit for helping me overhaul how Indexes and Foreign Key Constraints work. This project now does a much better job of comparing two databases.

About

DB Compare is used to compare two instances of a SQL Server database and view a report of any schema differences. DB Compare was originally a sample of DataTier.Net and uses the same class SQLDatabaseConnector.cs to read the database schema.

Topics

Resources

Stars

27 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages