Object Compare
How to: Customize a SQL Server 2005 comparison using Rules |
By default, Object Compare determines if SQL Servers are different by comparing
all objects and properties in the schema (Tables, Views, Columns, Primary Keys etc)
and most properties of those objects.
Rules determine how Object Compare distinguishes important objects and properties
from unimportant objects and properties. For example, if you were only interested
in Column changes from one schema to another, you could create a rule restricting
Object Compare to only compare Column objects in the database schemas. This reduces
the number of objects compared, keeps the display output free from noise and greatly
improves the performance of the comparison.
To create a Rule targeting SQL Server Non-System Tables:
- Open Object Compare, and select Rules -> Organize Rules from
the main menu.
- In the Rules dialog, select the New Rule toolbar
button.
- In the Name textbox, enter a descriptive name for the rule.
- The rule tree below the Name textbox profiles all available objects
for a rules-based comparison, grouped by Add-in. Expand the SQL Server 2005
Add-in node to list all objects available for comparing instances. Use the checkboxes
to nominate the following objects and properties to include in the rule: SchemaTable,
SchemaColumn, SchemaKey, SchemaIndex, SchemaTrigger, SchemaStatistic, SchemaConstraint
- To change the way the property values are compared for each object, check or uncheck
the text options listed below the Add-in tree.
- Select the Save Rule toolbar button to save the rule.
To apply the Rule to the current Workspace, select the newly created Rule from the
Rule drop down list in the main window.