Setting Up a Comparison
Choose the two schemas and which differences you care about.
The setup sheet appears when a comparison starts. It has three parts: the two schemas, the object types to compare, and a long list of differences to ignore.
Choosing the Schemas #
Each side has a connection popup, listing your saved connections, and a database popup. Choosing a connection connects in the background and fills in the databases on that server. The sides are independent, so you can compare two schemas on one server or on two different servers.
Reference is the correct one and is never modified. Target is the one a synchronization would change.
Schema Object Types #
Compare Tables, Views, Functions, Procedures, Triggers, and Events each turn a whole object type on or off. Turn off types you don't care about, such as views when a reporting copy is supposed to have different ones, to keep the results readable.
Ignoring Differences #
Each option marks a kind of difference as not a difference. Use them to turn a report full of noise into one that shows only what you're looking for.
General #
| Option | Effect |
|---|---|
| Ignore case in object names | Treats Orders and orders as the same object. Needed when comparing across platforms with different default case sensitivity. |
| Ignore spaces in object names | Ignores whitespace differences in names. |
| Ignore white space | Ignores formatting differences inside definitions, the usual reason two identical views report as different. |
| Ignore case | Ignores case differences inside definitions. |
| Ignore comments | Ignores object and column comments. |
| Ignore permissions | Leaves privileges out. |
| Ignore DEFINER and SQL SECURITY clauses | Almost always worth turning on. Definers are usually per-environment users, so otherwise every routine, view, and trigger differs. |
| Remove occurrences of Reference Database name | Strips the reference schema's name from definitions, so a view that qualifies its tables with the schema name doesn't differ just because the schemas are named differently. |
| Disable dependency analysis | Turns off the ordering that decides what must be created or dropped before what. Leave it on unless it causes a problem. |
Tables #
| Option | Effect |
|---|---|
| Ignore table column order | Compares columns by name, not position. Usually what you want, since reordering columns is expensive and functionally irrelevant. |
| Associate similar column names | Matches columns with slightly different names, so a rename is reported as a change rather than a drop plus an add. |
| Ignore column data types, Ignore column default values, Ignore NOT NULL constraints | Narrow the comparison to structure over definition detail. |
| Ignore table engine, Ignore collations, Ignore auto increment table option, Ignore average row length | Per-environment table options that are rarely meaningful. Auto-increment values differ constantly and never matter. |
| Ignore partitions | Useful when production is partitioned and development isn't. |
| Ignore triggers, Ignore triggers present only in Reference, Ignore firing order for triggers | Trigger-specific exclusions. |
| Ignore check constraints, Ignore constraint names | Ignoring names helps when the server auto-named constraints, so they differ everywhere. |
| Ignore ENDS clause, Ignore STARTS clause | For events, whose schedule boundaries are usually environment-specific. |
Indexes #
| Option | Effect |
|---|---|
| Ignore all indexes | Skips index comparison entirely. |
| Ignore index names, Ignore column order in indexes | Compares what an index covers, not its name or declared column order. |
| Ignore primary keys, Ignore foreign keys | Excludes key constraints. |
| Ignore fulltext indexes, Ignore spatial indexes | Excludes those index types. |
| Ignore indexes present only in Reference | Doesn't report, or generate SQL to create, indexes the target lacks. Use when the target is deliberately indexed more lightly. |
Saving a Setup #
The action popup in the setup sheet has Save Settings as… and Load Settings…, and lists recent settings files. A settings file records both connections, both databases, and every option, so re-running a regular comparison takes two clicks.