Exclude objects from comparison and synchronization

You can include or exclude specific objects from comparison and synchronization using the Change Data Comparison Properties wizard. You can use these settings to filter database objects and data:

  • Comparison Options – Filter database objects and data based on specific comparison options.
  • Mapping – Specify how objects in the source database correspond to objects in the target database.
  • WHERE filter – Define conditions that restrict the data rows to be included in the comparison and synchronization.

Note

You can also include or exclude objects when configuring the data comparison settings on the Options page in the New Data Comparison wizard.

Open the Change Data Comparison Properties wizard

You can open the Change Data Comparison Properties wizard after you run a data comparison and review the results to modify the comparison settings.

Open the Change Data Comparison Properties wizard in one of these ways:

  • On the Comparison toolbar, click Edit Comparison.
  • Right-click the Data Comparison results grid and select Edit Comparison.
  • In the top menu, select Comparison > Edit Comparison.

Exclude records by difference type

By default, all records are selected for comparison and synchronization. To exclude the records of a specific difference type, under Display options, clear the checkboxes for the options.

Exclude records by difference type

Exclude tables and views

To exclude tables and/or views, under Comparison Options, clear the checkboxes for Compare tables and/or Compare views.

Exclude tables and views

To include or exclude tables or views by mask:

1. Under Auto Mapping, select Exclude tables or views by mask.

Tip

To locate the option quickly, start typing its name in the search box. The option appears highlighted in the grid.

2. Click the ellipsis (…) to open the Edit Mask dialog.

3. Specify the mask.

4. Click OK.

Exclude tables and views by mask

Exclude columns

dbForge Studio enables you to include or exclude the following types of columns:

  • LOB
  • Computed
  • TIMESTAMP
  • ROWGUID
  • IDENTITY

To include or exclude the column types, under Auto Mapping, select or clear the corresponding checkboxes.

Exclude columns

To exclude columns by mask:

1. Under Auto Mapping, select Ignore columns by mask.

2. Click the ellipsis (…) to open the Edit Mask dialog.

3. Specify the mask.

4. Click OK.

Use Regular Expressions (regex) for advanced data and objects filtering

You can use regular expressions (regex) to include or exclude database objects.

To filter objects by using regular expressions:

1. Under Auto Mapping, select Ignore columns by mask.

2. Click the ellipsis (…) to open the Edit Mask dialog.

3. Select Use Regular Expression.

4. Click the arrow to display the list of supported expressions and select the required one.

5. Define a regex pattern to specify the objects you want to include or exclude from the comparison.

6. Click OK.

Filter database objects by regular expressions

Exclude newly added objects

You can exclude objects that were added after running the comparison.

To ignore the objects that are not explicitly included in the data comparison project, under Auto Mapping, select Exclude newly added objects.

Exclude data matching certain criteria

You can exclude data rows that match certain criteria by using an advanced filter rule.

To create a filter rule to exclude data:

1. Go to the Mapping page.

2. Select the table to which you want to apply the filter.

3. On the Mapping toolbar, click Filter.

4. In the WHERE filter dialog, specify the WHERE clause expression to exclude the rows that don’t match it.

5. Optional: Click Validate to verify the expression.

6. Click OK to apply the filter.

For more information, see Configure data filter options.