#The five at a glance
These five were picked from the tools that the search results for this question keep naming and whose makers document them in public. They are ordered by job, from a full desktop product to a free command, not ranked.
| Tool | Best for | Where it runs | Command line | Price, where published (November 2026) |
|---|---|---|---|---|
| Redgate SQL Data Compare | Teams already on SQL Toolbelt or Redgate Deploy | Windows desktop | Pro, with a licence condition | Standard $327 per user a year (1 to 4 users) |
| dbForge Data Compare for SQL Server | Comparing query results, with a command line, for less | Windows desktop | Professional edition | Standard $239.95, Professional $299.95 |
| Visual Studio Data Compare (SSDT) | Developers who already have Visual Studio | Inside Visual Studio | No unattended run documented | Part of Visual Studio; terms depend on your edition |
| DBeaver Enterprise | One side on SQL Server, the other on another engine | Desktop, Windows, macOS and Linux | Saved as a DBeaver task | Enterprise $255 a year, Ultimate $510 a year |
| tablediff | One table, in a batch file, for nothing | Installed with SQL Server's replication tools | It is the command line | Free with SQL Server |
ApexSQL Data Diff, now part of Quest, also turns up in the results. Its pages refused every request while this post was written, so nothing is said about it here rather than something unchecked.
#Redgate SQL Data Compare
Best for: a team that already owns SQL Toolbelt, Flyway Enterprise or Redgate Deploy, and wants comparisons in the same family as SQL Compare and SQL Prompt.
Redgate's product page lists SQL Server 2008 to 2025, SQL Azure and SQL Server on Amazon RDS. Standard compares live databases. Pro adds backups and scripts folders as a source, restoring a single damaged row from a backup, and command-line deployments. The page's footnote ties the command line to a Flyway Enterprise, Redgate Deploy or SQL Toolbelt licence, so ask Redgate which licence covers a nightly run before you buy. Standard is $327 per user a year for 1 to 4 users, and there is a 14-day trial.
Views are compared when you turn on Include views, and you set the comparison key yourself, since a view has no primary key. Each side can have its own WHERE clause. The full detail is in the Redgate SQL Data Compare review.
#dbForge Data Compare for SQL Server
Best for: comparing the results of two queries without creating views, and the cheapest paid command line on this list.
Devart's editions page lists SQL Server 2000 to 2025, SQL Server on Linux, Azure SQL Database and Managed Instance, Azure Synapse Analytics, Microsoft Fabric, Amazon RDS and Heroku. Both editions compare "results of custom queries without the need to create a view". Professional adds native backups as a source and the command line, and the page says it can "schedule tasks with the command-line interface (CLI)", which in practice means a batch file started by Windows Task Scheduler. Standard is $239.95 and Professional $299.95.
Devart sells a separate Data Compare for MySQL and for PostgreSQL. How it stacks up against Redgate, setting by setting, is in Redgate vs dbForge Data Compare.
#Visual Studio Data Compare (SSDT)
Best for: a developer who already has Visual Studio and needs a comparison now and then, not every night.
Data Compare comes with SQL Server Data Tools. In the Visual Studio Installer, choose Modify, then SQL Server Data Tools under Data storage and processing. Microsoft Learn lists SQL Server 2016 to 2025 and Azure SQL for Visual Studio 2026. To compare:
- On the main menu, go to Tools > SQL Server > New Data Comparison.
- Pick the Source Database and Target Database, using New Connection if the list is empty, then Next.
- Tick the tables and views to compare, and choose the Comparison Key if there is more than one.
- Select Finish. The results show, per object, the records that are different, only in source, only in target and identical.
- To make the target match, select Generate Script to read the script first, or Update Target to write it.
Two limits from the same page. A table or view appears in the list only if its schema matches on both sides and it has "a primary key, a unique key, a unique index, or a unique constraint", so an ordinary view of totals never shows up. And the only automation documented is the Command Window inside Visual Studio (Tools.NewDataComparison), which still needs Visual Studio open. If you use the Community edition, Microsoft points you to that edition's licence terms.
#DBeaver Enterprise
Best for: a comparison where one side is not SQL Server, such as tills on PostgreSQL against an ERP on SQL Server.
DBeaver's documentation says Data Compare is "available in Enterprise, and Ultimate editions only", and that it can compare "between different Relational Database Management Systems (RDBMS), such as PostgreSQL and MySQL". Select the two tables in the navigator and choose Compare/Migrate > Data Compare, or compare the output of a query with Execute > Data Compare from query. The differences can be exported as an SQL script of DELETE, INSERT and UPDATE statements. Save turns the comparison into a DBeaver task, which runs without opening the visual editor.
The editions page lists Lite at $113 a year without table data comparison, Enterprise at $255 and Ultimate at $510 with it. The free Community edition has none; the workaround in Community is in comparing two tables in DBeaver.
#tablediff
Best for: one table checked from a batch file, at no cost, with an exit code a scheduled task can act on.
Microsoft built tablediff to troubleshoot replication, but it compares any two SQL Server tables. It is part of the SQL Server Replication tools: for SQL Server 2022 it sits in C:\Program Files\Microsoft SQL Server\160\COM once the replication feature is installed. -c compares column by column, -q compares only row counts and schema, -f writes a T-SQL script to fix the destination, and -et logs the differences to a table. It returns 0 for success, 1 for a critical error and 2 for "table differences".
Its limits, from Microsoft Learn: SQL Server only ("You can't use the tablediff utility with non-SQL Server servers"), no sql_variant columns, and the source table "must contain at least one primary key, identity, or ROWGUID column". It compares tables, one pair per run.
#One store-by-store comparison through all five
The job, for an invented chain with 120 stores: every morning, compare yesterday's sales per store between the tills database POS_HQ and the ERP database ERP_PROD, both on SQL Server at head office. Each has a view, v_store_day_sales, with one row per store per day.
Visual Studio and tablediff both need a key the view does not have, so the honest way to run the same job in all five is a small keyed table on each side, refreshed before the comparison. Run this in POS_HQ, and the same in ERP_PROD:
IF OBJECT_ID('dbo.store_day_sales') IS NULL
CREATE TABLE dbo.store_day_sales (
store varchar(10) NOT NULL,
business_date date NOT NULL,
receipts int NOT NULL,
net_sales decimal(12,2) NOT NULL,
CONSTRAINT pk_store_day_sales PRIMARY KEY (store, business_date)
);
TRUNCATE TABLE dbo.store_day_sales;
INSERT INTO dbo.store_day_sales (store, business_date, receipts, net_sales)
SELECT store, business_date, receipts, net_sales
FROM dbo.v_store_day_sales
WHERE business_date = CAST(DATEADD(day, -1, GETDATE()) AS date);Then tablediff compares the two tables and the batch file acts on its exit code:
@echo off
"C:\Program Files\Microsoft SQL Server\160\COM\tablediff.exe" ^
-sourceserver HQ-SQL01 -sourcedatabase POS_HQ -sourcetable store_day_sales ^
-destinationserver HQ-SQL01 -destinationdatabase ERP_PROD -destinationtable store_day_sales ^
-c -o "C:\Compare\store-day-sales.txt"
set RC=%ERRORLEVEL%
if %RC%==2 echo Stores differ: read C:\Compare\store-day-sales.txt
if %RC%==1 echo tablediff failed
exit /b %RC%The server name is invented: put in your own. Here is what comes back for five of the 120 stores:
| Store | Tills | ERP | What all five tools report | What the tools cannot tell you |
|---|---|---|---|---|
| ST-004 | 9,850.20 | 9,850.20 | Identical | |
| ST-014 | 12,400.00 | 11,920.00 | Different | That the ERP refused lines with no tax code |
| ST-022 | 6,410.75 | none | Only in source | That the day's file never arrived |
| ST-031 | 8,120.00 | 8,119.96 | Different | That 0.04 of rounding is not worth a call |
| ST-037 | 5,214.60 | 5,214.60 | Identical |
Invented figures. Every tool on the list finds the same three rows, which is a real result before nine in the morning. Redgate and dbForge could have used the view directly, Redgate with Include views and a key you set, dbForge with a custom query. Only Redgate Pro, dbForge Professional, DBeaver's tasks and tablediff can run it unattended. And all five offer the same fix: a script that copies the tills' figure into the ERP. For ST-014 that is the wrong fix, because it hides the refused lines instead of posting them.
#Where all five stop
They were built to keep two copies of a database in step, and they do. A store chain's morning question is a different one:
- A rule, not a list. None of the five has a tolerance on a decimal column, so ST-031's four cents sit beside ST-014's 480 every morning, and somebody reads the list to decide which matters.
- Last night against tonight. The pages read for this post describe no history of runs to read as a trend; the batch file's output files are the history.
- One database per store. If each store has its own server, that is 120 comparisons, or a consolidation job that needs checking too.
- The reason. A differing row is where their answer ends, and where the retail question starts. The queries for doing the reasoning by hand are in compare two tables in SQL.
#Where DataMosaic sits
DataMosaic is not one of the five, because it does not compare two copies of a database row by row or write a script to make them match. It answers a different question: why two systems disagree, store by store, every night.
A check reads two systems with a query each, on the same engine or not: SQL Server, Oracle, PostgreSQL, REST APIs, CSV and Excel files. It lines them up on a key such as store and business date, and compares the measures you choose, each with a tolerance, so ST-031 counts as a match. Rules decide whether a run passed, and every run is kept. On a row that differs, an investigation asks each system what it saw, until ST-014 has a reason. A check only reads. A workflow you build does the fixing, such as sending the day again and running the check again, and no AI decides what changes.
Keep Redgate, dbForge, Visual Studio, DBeaver or tablediff for refreshing test from production, checking a restore and recovering a row.
#Questions people ask
#Is there a free SQL Server data compare tool?
Yes. tablediff is free with SQL Server's replication tools and compares two tables from the command line. Visual Studio's Data Compare comes with SQL Server Data Tools; with the Community edition, check its licence terms for your organisation.
#Can I compare SQL Server data with PostgreSQL or MySQL?
Not with the SQL Server tools on this list: Redgate, dbForge's SQL Server edition, Visual Studio and tablediff all compare SQL Server with SQL Server. DBeaver Enterprise and Ultimate compare data across engines.
#Which SQL data compare tool has a command line?
dbForge Data Compare Professional, Redgate SQL Data Compare Pro with a Flyway Enterprise, Redgate Deploy or SQL Toolbelt licence, and tablediff, which returns 2 when the tables differ. DBeaver runs a saved comparison as a task.
#Why are my tables missing from Visual Studio Data Compare?
Visual Studio lists a table or view only if its schema matches on both sides and it has a primary key, unique key, unique index or unique constraint. Add a key, or copy the rows into a keyed table first.