After you have run your data comparison and received the results, you can select the required data to deploy right in the comparison results grid. However, Data Compare delivers greater flexibility and lets you exclude objects from synchronization in a number of ways.
When you run data comparison, you can configure to include/exclude certain objects from comparison and synchronization. This can be done in the New Data Comparison wizard.
When configuring the comparison options in the New Data Comparison wizard, you can specify the records to included into comparison and then synchronization:
Different - when selected, the different records that are present in Source and Target will be displayed in the comparison results table and will be available for synchronization.
Only in Source - when selected, the records that exist only in Source will be shown in the comparison results grid, and the user will be able to include then into the deployment script.
Only in Target - when selected, the records that exist only in Target will be displayed in the comparison results table, and the user will be able to deploy them.
Identical - when selected, the identical records will be displayed in the comparison results grid.
If you don’t want Data Compare to compare and synchronize tables and/or views when running database comparison and synchronization, on the Options tab of in the New Data Comparison wizard, clear the checkbox next to the Compare tables and\or Compare views comparison option. The same can be done for memory-optimized tables.
To include\exclude tables or views from the comparison and deployment by mask:
1. Select Exclude tables or views by mask.
2. Click to open the Edit Mask dialog.
3. Specify the mask and click OK.
The New Data Comparison wizard allows including/excluding the following types of columns:
You can also exclude columns by mask. To include\exclude columns from the comparison and deployment by mask:
1. Select Ignore columns by mask”.
2. Click to open the Edit Mask dialog.
3. Specify the mask and click OK.
You can configure dbForge Data Compare to exclude the objects that have been created after the comparison has been run. To make the tool ignore the objects that are not explicitly included in the data comparison project, in the New Data Comparison wizard, select Exclude newly added objects.
Data Compare for SQL Server lets you exclude from comparison and synchronization certain rows of data based on an advanced filter rule.
To create a filter rule to exclude data:
1. In the New Data Comparison wizard, go to the Mapping tab.
2. Select the table, you want to apply the filter to, and then click .
3. In the WHERE filter dialog that opens, specify the WHERE clause expression to exclude the rows that don’t match it.
4. Optional: Click Validate to check the expression you’ve provided.
5. Click OK to apply the filter.
Note
To learn more about how to configure the WHERE filter in dbForge Data Compare for SQL server, refer to Configure data filter options.