How to compare database schemas in SSMS
Last modified: October 29, 2024
dbForge Schema Compare comes with a free add-in for SQL Server Management Studio that lets you compare and synchronize databases (including versions from source control) right from the SSMS Object Explorer.
Note
The Schema Compare SSMS add-in comes bundled with the standalone Schema Compare application. Both are installed simultaneously with the dbForge Compare Bundle or dbForge SQL Tools products. Upon installation, the Schema Compare add-in automatically integrates with SQL Server Management Studio (SSMS).
Compare databases
To compare two databases in SSMS:
1. In Object Explorer, right-click the database you want to compare and select Schema Compare > Set as Source:
Note
Select Recent Files to restore a previously saved comparison project file with the .scomp extension. The .scomp file contains all the schema comparison and deployment settings configured earlier.
The dbForge Schema Compare tab appears displaying the database you selected as the source in the left pane.
2. To select the target database, use either of the following options:
- In Object Explorer, right-click the database and select Schema Compare > Set as Target.
- Drag the database from Object Explorer and drop it to the Target section of the tab.
To swap the source and target databases, click Swap Source and Target settings.
3. To start the comparison, click Start comparison.
4. In the New Schema Comparison window that opens, do the following and then click Compare:
-
Set up schema comparison for your project. For more information about how to configure schema comparison options, see Configure comparison options.
-
Optional: Set schema and table mapping. For more information about how to map schemas and tables, see Map schemas and Map tables and columns.
Compare scripts folders
Schema Compare allows you to compare and synchronize scripts folders.
To set a scripts folder as the Source or the Target:
1. On the dbForge Schema Compare tab, select Scripts Folder as a type of a source or target for database comparison.
2. Under Database scripts folder, click < Browse > to specify a path to the scripts folder you want to add to the comparison.
3. To start the comparison, click Start comparison.
Schema Compare opens the New Schema Comparison window where you can set up schema comparison for your project.
For more information about how to adjust settings for schema comparison, see Configure comparison options.
Compare source control revisions
The Schema Compare SQL Server Management Studio add-in enables you to compare and synchronize source control revisions of databases.
To set a revision from source control as the Source or the Target:
1. On the dbForge Schema Compare tab, select Source Control as a type of a source or target for database comparison.
2. In the Repository box, select a database linked to Source Control or click < Manage > to specify a repository URL.
3. In the Revision box, select a specific revision from the source control history or select the latest revision.
4. To start the comparison, click Start comparison.
5. In the New Schema Comparison window that opens, configure the comparison options and then click Compare.
For more information about how to adjust settings for schema comparison, see Configure comparison options.
Download Compare Bundle for SQL Server and enjoy your free 30-day trial!
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by Schema Compare for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.