Compare and synchronize database schemas

Last modified: May 28, 2025

This section describes how to compare and synchronize database schemas to ensure consistency across environments. It explains how to quickly detect differences, group and filter results, preview synchronization scripts, and generate detailed reports. Instructions are included for saving comparison settings, automating operations via the command line, and handling synchronization across different Microsoft SQL Server versions. Additional topics cover comparing schema snapshots, setting up email delivery of comparison reports, and configuring automatic retries in case of connection failures. This functionality supports version control, deployment accuracy, and reliable schema maintenance.

In this section

Synchronize two schemas quickly

Save and load schema comparison documents

How to synchronize schemas

Group and filter comparison results

Compare object DDL

Preview the schema synchronization script

Generate a comparison report

Compare and synchronize schemas from the command line

Compare database snapshots from the command line

Additional Schema Compare arguments

Command line options for the /schemacompare operation

Exit codes used in the command line for /schemacompare

Schema comparison and synchronization overview

Compare and synchronize schemas on different Microsoft SQL Server versions

View schema differences

Configure the automatic delivery of a schema comparison report via email

Configure running the comparison and synchronize processes again in case the server connection fails

Automate schema comparison between a scripts folder and a database