Selecting objects to synchronize

After you have reviewed the comparison results, you can select the objects you want to synchronize and run the synchronization wizard.

Selecting rows to synchronize

By default, all rows are selected for synchronization.

Selecting rows to synchronize

Use the checkboxes to undo the selection of rows for synchronization.

You can also use the Operation drop-down menu to select objects:

Operation drop-down menu

  • None is set by default for identical objects. You can change it to Drop. None cancels the selection of an object for synchronization.

  • Update changes the Target object according to the Source object. By default, it is set for objects with Different status, You can change it to Drop or None.

  • Drop is set by default for objects with Only in Target status and means that the object will be dropped in the target schema. You can change it to None.

  • Create is set by default for objects with Only in Source status and means that the object will be created in the target schema. You can change it to None.

Object status

dbForge Schema Compare for SQL Server automatically sets different statuses for compared objects to help you quickly analyze the differences. The statuses are as follows:

  • Only in Source - schema object exists in the source schema and does not exist in the target schema.
  • Only in Target - schema object exists in the target schema and does not exist in the source schema.
  • Different - schema objects with the same names exist in both schemas, but they have different DDL.
  • Equal - identical objects exist in both schemas.
  • Inconsistent - objects are different, but target object can not be created or updated due to incompatibility between the source and target SQL Server servers. For example, if a source table contains a BIT column and a target SQL server does not support BIT columns, the table status will be inconsistent.
  • Unknown - object metadata cannot be retrieved, so its status is unknown.

Synchronizing databases

Note:

Schema synchronization can not be rolled back! It may alter or drop schema objects in your Target schema. It is highly recommended to backup the Target database before synchronization.

After you have selected objects, you can run the process of synchronization:

1. Click the Synchronize button to open the Schema Synchronization Wizard.

Synchronization wizard

2. Select output options to manage the synchronization script.

You can:

  • Open the synchronization script in the internal editor
  • Save the script to a file
  • Execute the script directly against the target database.

3. Click the Synchronize button to close the wizard and complete the synchronization process.

4. Review the sync script, and then execute it by clicking the Execute button on the SQL toolbar.

Execute button