Applies to
ApexSQL Diff
Summary
This article explains how to use filtering options in ApexSQL Diff to narrow down schema comparison and synchronization to affected objects only.
In cases when schema comparison and synchronization need to be narrowed down to desired objects, ApexSQL Diff offers various filtering options. Additionally, these filtering options can reduce the comparison and synchronization time, and size of the schema synchronization script.
ApexSQL Diff offers the following filtering options that can be divided in two groups:
Pre-comparison filtering
Once the source and destination data sources are set in the New project window, expand the Advanced options and click the Object filter tab:
In the Object filter tab, all SQL Server object types will be shown and by default all of them are checked:
|
Quick tip: If none of the Object filter options isn’t used, all object types and individual objects will be included in the comparison and synchronization process |
The following filtering can be applied in the Object filter tab:
|
Quick tip: Object filtering may speed up the comparison process, but ApexSQL Diff cannot detect dependent objects if they are excluded from the comparison, which may result in error(s) during the synchronization process |
Post-comparison filtering
The comparison results displayed in the Results grid can be filtered using:
Grouping options can be used to choose in what order object types will be displayed in the Object filter and for easier viewing.
To set the condition with the Filter editor, select the Tables object type in the Object filter panel and click the Filter button next to it:
The Filter editor window is shown and criteria can be set to And/Or or to Not And/Not Or, in order to display objects that meet the condition:
The filter criteria can be built by using the drop-down menu for each field and by using the to add condition or to remove it. As mentioned above, the filter criteria will be set that object name contains word Product and schema name is Production:
After setting up the filter criteria and the OK button is clicked, the Results grid will show tables that only meet the previously set filter criteria:
Filter management options in the Object filer panel allow to save the current filter settings for later use, open saved ones or clear current object filter selection:
In the following example, DDL trigger in source and destination differ only in extended properties, but that doesn’t need to be taken into consideration as a real difference, so it can be excluded:
To exclude extended properties for DDL trigger, locate it in the Difference filter panel, uncheck them, and it will be instantly applied on the Results grid. In this case, since the only difference was in the extended properties, the DDL trigger won’t be shown in the Results grid:
FAQs
Q: What will happen if I exclude dependent object?
A: It depends on when an object was excluded. If an object was excluded:
Q: Can I save object filtering and reuse it later?
A: Yes. If any object filtering is set, it can be saved by saving the project file. Also, object filtering can be applied when using a project file in the CLI
Q: Can I set the same filter criteria for all object types in the Object filter panel vs. setting it up for each object type?
A: Yes. For example, if you want to set filter criteria to show all object types with schema name Person, select the All objects in the Object filter panel, click the Filter button next to it, and enter the filter criteria to And schema name equals Person:
© ALL RIGHTS RESERVED. 이용 약관 개인정보 보호정책 Cookie Preference Center