April 30th, 2025

MSSQL Extension for VS Code: Introducing Schema Compare (Preview)

Overview

We are excited to introduce Schema Compare in the MSSQL Extension for VS Code!

It can be tedious to manually manage and synchronize different database versions. Enter Schema Compare, the powerful new feature for MSSQL in VS Code that transforms this tedious task into a seamless experience. With intuitive visualization that instantly highlights additions, removals, and modifications between schemas, you gain complete control over which changes to implement. Whether comparing live databases, dacpac files, or SQL projects, Schema Compare empowers you to synchronize database versions with precision and confidence.

A screenshot of a computer AI-generated content may be incorrect.

  • Effortless Comparison: Select your source and target (database, .dacpac, or database project) and instantly see all structural differences.
  • Crystal-Clear Visualization: Immediately identify what’s been added, removed, or modified between schemas.
  • Take Control: Decide exactly which changes to include before applying them.
  • One-Click Updates: Apply your selected changes seamlessly with a single click.

Features:

The Schema Compare feature provides the following features:

  • Compare schemas between two DACPAC files, databases, or SQL projects.
  • View results as a set of actions to take against the target for it to match the source.
  • Selectively exclude actions listed in results.
  • Set options that control the scope of the comparison.
  • Apply changes directly to the target or generate a script to apply changes at a later time.
  • Save the comparison.

Install the extension

To install the MSSQL extension, follow these simple steps:

1. In VS Code, select the Extensions Icon to browse available extensions.

2. Search for the SQL Server (mssql) extension and select it to view details. Then click Install to add the extension.

3. After installation, reload VS Code to enable the extension (only necessary when installing an extension for the first time).

Compare schemas

To compare schemas, launch the Schema Compare dashboard by following these steps:

1. Right-click a database in Object Explorer and select Schema Compare. This database automatically becomes the Source database in your comparison.

A screenshot of a computer AI-generated content may be incorrect.

2. Click one of the ellipses (…) buttons to modify the Source and Target of your comparison, then select OK.

A screenshot of a computer AI-generated content may be incorrect.

3. For customized comparison settings, click the Options button in the toolbar. You can use ‘save .scmp file’ to save these options for a later comparison.

A screenshot of a computer AI-generated content may be incorrect.

4. Finally, select Compare to generate and view your comparison results.

A screenshot of a computer AI-generated content may be incorrect.

Apply changes

1. Navigate through the object list and carefully check the objects you wish to modify.

A screenshot of a computer AI-generated content may be incorrect.

2. Apply the selected changes to your target by simply clicking the apply button.

A screenshot of a computer AI-generated content may be incorrect.

What’s next for Schema Compare?

  • Improved UI and comparison diff views.
  • Advanced ‘generate script’ options.

1 comment

  • Warren Kinley 1 week ago

    Fantastic tool! One thing I noticed was the Role compare marks all roles as “Change” but there is no differences