SQL Server Schema Synchronization

This page provides additional information about the SQL Server synchronization tool provided by dbForge Studio for SQL Server.

Schema synchronization is a process of generating SQL script, necessary to migrate the schema of a source database to a target database (patch script).

With dbForge Studio for SQL Server, you can:
  • Generate a standards-driven schema synchronization script with all updates.
  • Synchronize schemas, located on different server versions.
  • Control schema objects, that will be included into synchronization script.
  • Customize synchronization process up to your needs.
  • Automate synchronization process through command line.

Preparing for Synchronization

Before initializing synchronization process, you can review the schema comparison results and select the schema objects, that will be synchronized. To start synchronizing SQL schemas, click Synchronize on the Comparison toolbar.

Schema Synchronization Wizard

Schema Synchronization Wizard is designed to guide you through the process of script generation and help to tune the synchronization result.

On the first page, you can select what you want to do with the SQL Server synchronization script: to see it in the editor, save to a file for further execution, or immediately execute.

Customizing Synchronization

The wizard includes advanced options for customization of SQL synchronization script. In particular, you can:

  • Backup a database before sync
  • Set additional rules for synchronization.
  • Check the list of objects automatically included into synchronization as they depend on some compared objects.
  • View the synchronization actions and the list of warnings generated during mapping.

Synchronization Script

When the wizard's work is over, you get an SQL script. To complete schema synchronization, just run it against the selected database by clicking the Execute button on the SQL toolbar.

Scheduling Tasks through Command Line

Command line interface of dbForge Studio for SQL Server and Windows Task Scheduler can help you automate routine schema comparison and synchronization tasks. You can create a *.bat file and schedule executing it in Windows Task Scheduler to keep schemas of your databases always in sync.