Interface & Features — Compare
Walk through the main screens, tabs, and controls you will use day to day.
Schema Comparison
With both databases connected, stay on the Schema Compare tab and click Compare Schema. DBLense loads catalog metadata from both sides and classifies each object.
Object Types Compared
- Tables — presence and high-level table definition
- Columns — type, nullability, identity, and related column metadata (shown with parent table)
- Indexes — clustered / non-clustered / unique / filtered definitions
- Constraints — primary key, unique, foreign key, and check constraints
- Views — module definition
- Stored Procedures — full procedure body
- Functions — scalar and table-valued definitions
- Triggers — DML trigger definitions
Result Statuses
- ● Equal — identical after whitespace-normalized compare
- ● Modified — exists on both sides with different definitions
- ● Source Only — missing on target
- ● Target Only — missing on source
Use the filter box and Equal / Modified / Source Only / Target Only checkboxes to focus the grid. Select the objects you want included in a sync script.
Data Comparison
- Open the Data Compare tab
- Click Discover Tables to pair tables by
schema.tablename on both sides - Choose a scope: All matched, Selected (checked rows), or Single (highlighted row)
- Optionally open Options for hash compare, date-column filter, batch size, and parallelism settings
- Click Compare Data
Rows are matched using primary keys when available, otherwise unique indexes or smart-detected key columns. Results summarize Equal / Updates / Inserts / Deletes and list differing keys (capped per table for UI performance).
Definition Viewer
On Schema Compare, select any row to open the side-by-side definition panes:
- Left — Source definition
- Right — Target definition
Status badges in the grid show Equal, Modified, Source Only, or Target Only at a glance. Parent table names appear for columns, indexes, constraints, and triggers.
Synchronization Scripts
After a compare, open the Sync Script tab (or click Generate — it switches you there):
- For schema: check the objects to include, then Generate Script
- For data: run Data Compare first, then Generate Script to script inserts / updates / deletes across compared tables
- Copy to Clipboard or Save to File… (
.sql) - Review in SSMS / Azure Data Studio before executing on target
Schema scripts emit CREATE / ALTER for modules (procedures, views, functions, triggers) and documented comments for structural objects that need manual review (tables, columns, indexes, constraints). Data scripts wrap statements in a TRY/CATCH transaction.
Filtering & Search
- Schema filter text — match object name or type label
- Status filters — Equal, Modified, Source Only, Target Only
- Data table filter — schema or table name
- Match filters — Matched, Source only, Target only table pairs
- Select All / Select None — control which rows are included in scripting or data compare scope