SQL Server Schema Comparison Tools
What a schema comparison tool does, how DbSchema, Redgate SQL Compare, dbForge and xSQL differ, and what each costs today.
On this page
Words in this article
Words in this article
- Schema
- The structure of a database, and in SQL Server also a named container that groups objects.
- Design model
- DbSchema's own project file, with the extension .dbs, that holds your schema design.
- Catalog view
- A system table that describes the database and that you can query like any other.
- ALTER
- The SQL command that changes an existing table.
- Foreign key
- A link between two tables.
- T-SQL
- The SQL dialect of SQL Server.
- Snapshot
- A saved copy of a schema at one moment.
- SSMS
- SQL Server Management Studio, Microsoft's free tool for managing SQL Server.
- Reverse-engineer
- Read an existing database and build the model from it.
- Groovy
- A scripting language that runs on Java.
The short answer
A schema comparison tool finds the differences between two SQL Server databases and writes the script that makes them match. Four tools do this job well:
DbSchema
If you want the design in a file that you keep in Git and compare every database against.
Redgate, dbForge or xSQL
If you mainly compare one live server with another.
No tool
If you only need a quick list of columns. The catalog query below does that by hand.
What DbSchema adds to a schema comparison
Why DbSchema
Most comparisons start with one question: which database is right? DbSchema answers it with a design model. The design model is DbSchema's own project file, with the extension .dbs, and it holds your schema design. The model is the reference, and every database is compared against it. All of this is on the Schema Synchronization page.
A reference you keep in Git
The .dbs file sits next to your application code. Git, the version control system, keeps every version of the file and shows who changed what. See Git Collaboration.
You pick the winner for each difference
The Synchronize Model and Database dialog lists one difference per row. In the row's Action column, the left button writes the difference into the model, Ignore leaves it as it is, and the right button writes it into the database.
Renames stay renames
When you rename a column in DbSchema, the model remembers the previous name. Synchronization then renames the column in the database with
RENAME. A drop and a create would lose the data in the column.Two versions compared without a server
Model → Compare Model with Other Model From File opens a second .dbs file, for example last month's version from Git.
A report for reviewers
Export Report writes the differences as HTML or Markdown, for people who don't use DbSchema.
Then, in DbSchema:Reverse-engineerSave the model in GitCompareGenerate SQL script
What a SQL Server schema is, and what a comparison reads
In SQL Server, the word schema has two meanings. It is the structure of a database: its tables, columns, keys, views and procedures. It is also a named container inside a database that groups objects, such as Sales[1]. A comparison tool reads both.
The full name of a table has four parts: server, database, schema container and object, such as prod01.shop.Sales.Orders[1]. Two databases can hold the same table in different containers, so a comparison matches objects by all of these parts.
A schema container also holds permissions. A permission set on the container applies to every object in it, including objects added later[1].
How to compare schemas in SQL Server
SQL Server describes its own structure in catalog views. A catalog view is a system table that you can query like any other. This query lists every column with its table and type:
SELECT s.name AS schema_name, t.name AS table_name,
c.name AS column_name, ty.name AS data_type, c.is_nullable
FROM sys.columns c
JOIN sys.tables t ON t.object_id = c.object_id
JOIN sys.schemas s ON s.schema_id = t.schema_id
JOIN sys.types ty ON ty.user_type_id = c.user_type_id
ORDER BY s.name, t.name, c.column_id;
Run it on both databases and compare the two lists. That shows the column differences, but it does not write the fix. An ALTER statement is the SQL command that changes an existing table. You still write each one yourself, in an order that the foreign keys accept. Foreign keys are the links between tables. Then you repeat the work for indexes, views, procedures and triggers. A comparison tool does all of it and writes the script in T-SQL, the SQL dialect of SQL Server.
The tools differ in what they compare against:
The four tools compared
DbSchema compares a model with databases. The other three compare databases, backups and snapshots with each other. A snapshot is a saved copy of a schema at one moment. A script folder holds the schema as SQL files, and source control is a system such as Git that keeps every version of those files. Every value below was read on the vendor's own page on 15 November 2026.
| Tool | Compares | Kept outside the server | Command line |
|---|---|---|---|
| DbSchema | a model with a database, or two models | .dbs model file in Git | Groovy automation scripts |
| Redgate SQL Compare | databases, backups, snapshots, source control | snapshots, script folders | yes |
| dbForge Schema Compare | databases, backups, snapshots, script folders | snapshots, script folders | Professional edition |
| xSQL Schema Compare | databases and its own snapshots | its own snapshot format | yes |
Groovy is a scripting language that runs on Java.
Redgate SQL Compare
Redgate's page lists SQL Server 2008 to 2025, Azure SQL, Microsoft's cloud version of SQL Server, and SQL Server on Amazon RDS, Amazon's hosted database service. SQL Compare writes deployment scripts and runs deployments from the command line. Using the command line in an automated Redgate pipeline needs an extra license, which Redgate's page names.
dbForge Schema Compare
Devart sells dbForge Schema Compare in two editions. Both work inside SSMS, SQL Server Management Studio, Microsoft's free tool for managing SQL Server. Both cover SQL Server 2000 to 2025 and Azure SQL. The command line and comparison against Git are in the Professional edition only.
xSQL Schema Compare
xSQL covers SQL Server 2005 to 2022, including Azure databases. A command-line utility runs comparisons from batch files, and xSQL's own snapshots keep a schema at one point in time.
What each one costs today
| Tool | Price, as listed on 15 November 2026 | Free option |
|---|---|---|
| DbSchema Pro | one-time license or monthly, see pricing | Community Edition |
| Redgate SQL Compare | 327 USD per user per year (1 to 4 users) | 14-day trial |
| dbForge Schema Compare | Standard 239.95 USD, Professional 299.95 USD per year | none listed |
| xSQL Schema Compare | Silver 299 USD, Gold 749 USD per user per year | 2-week trial, then Lite Edition |
Redgate prices by your location, so the figure in euros differs. The three other tools sell yearly subscriptions. A DbSchema Pro license is perpetual: you keep the version you bought for good, with every release of the first year.
Is SQL Compare free?
Redgate SQL Compare is not free. It offers a 14-day trial with all features, then needs a subscription. xSQL switches to a free Lite Edition after its trial. The Lite Edition compares SQL Server Express without limits and other editions up to 25 tables.
DbSchema comes in two editions here. Community is free with no time limit: it connects to SQL Server, reverse-engineers the schema and draws diagrams. To reverse-engineer means to read an existing database and build the model from it. Pro adds saving the model to a file and the comparison. Every download starts with a 15-day trial of all features.
Compare a SQL Server schema in DbSchema
-
Connect to your reference database Community
Connect to the SQL Server database whose structure is right. Use Windows or SQL Server authentication. DbSchema downloads the JDBC driver, the Java library that talks to SQL Server.
-
Reverse-engineer it Community
DbSchema reads the database and draws the tables as a diagram.
-
Save the model Pro
Choose File → Save Model to File, and commit the
.dbsfile to Git. -
Change the design offline Pro
Choose Database → Offline (connect later) and edit the diagram. The database does not change yet.
-
Connect to the database you want to check Pro
Connect to TEST or PROD, for example. DbSchema asks how to bring the model and the database together. Choose Compare, then decide difference by difference.
-
Pick a side for each difference Pro
In the Synchronize Model and Database dialog, pick a side in the Action column of each row.
-
Generate or commit Pro
Press Generate SQL script to see the T-SQL without running it. Press Commit in the database to run it, which changes the database. Apply to the model changes the model instead.
Download DbSchema, reverse-engineer your reference database, and compare the others against that model.
Frequently asked questions
Can I compare a database with an earlier version of its schema?
Yes, with a model file. Check out last month's .dbs file from Git and open it with Model → Compare Model with Other Model From File. No second server is needed.
What is the difference between schema and data comparison?
Schema comparison reads the structure: tables, columns, indexes and procedures. Data comparison reads the rows inside the tables. DbSchema compares the structure.
Sources
Diff your SQL Server schema against a model you control
DbSchema reverse-engineers SQL Server into an interactive ER diagram, saves the model as a .dbs file you keep in Git, and compares it with any database to write the migration script. Community is free; Pro compares, with a 15-day trial of all features.