DBLense Compare — User Guide

Visual schema and data comparison between two SQL Server databases. Generate synchronization scripts automatically with a side-by-side diff viewer.

Getting Started

Double-click DBLenseCompare.exe — no installation required. The interface is divided into source (left) and target (right) connection panels.

Setting Up Source & Target

  1. Click Connect on the Source (left) panel
  2. Enter your source server details and select the database
  3. Click Connect on the Target (right) panel
  4. Enter your target server details and select the database

All four authentication modes are supported: Windows, SQL Server, Azure Entra ID (Password), and Azure Entra ID (MFA).

Source and target can be on different servers, different SQL Server versions, or even a mix of on-premises and Azure.

Schema Comparison

Click Compare Schema to analyze structural differences between the two databases. DBLense compares:

Object Types Compared

Comparison Results

Objects are categorized as:


Data Comparison

Compare actual data between matching tables:

  1. Select tables to compare (or use Select All)
  2. Click Compare Data
  3. Results show row-level differences: inserts, updates, and deletes needed to sync

Data comparison uses primary key or unique constraint columns to match rows between databases. Tables without a key column can use all columns for matching.


Visual Diff Viewer

Click any different object to open the side-by-side diff view:

This makes it easy to visually understand what changed between two environments.


Synchronization Scripts

After comparison, generate T-SQL scripts to synchronize the target database with the source:

  1. Select the objects you want to synchronize (checkboxes)
  2. Click Generate Script
  3. Review the generated T-SQL
  4. Copy to clipboard or Save to file
  5. Execute in SSMS or your preferred tool

Scripts handle dependency ordering automatically (e.g., tables before foreign keys, schemas before objects).

⚠️ Always review sync scripts before executing against production databases. Back up your target database first.

Filtering & Search


Typical Workflows

Deploy Development Changes to Staging

  1. Connect Dev database as Source, Staging as Target
  2. Run Schema Compare
  3. Review differences — select only the objects you want to deploy
  4. Generate sync script
  5. Review and execute on Staging

Audit Production vs. DR

  1. Connect Production as Source, DR as Target
  2. Run both Schema Compare and Data Compare
  3. Verify no drift between environments
  4. Generate a report of any differences

Post-Deployment Validation

  1. Before deployment: Compare source → target and save results
  2. After deployment: Compare again and verify all differences resolved

System Requirements

ComponentRequirement
OSWindows 10/11 or Windows Server 2016+
Runtime.NET 8.0 (or self-contained package)
SQL ServerSQL Server 2016+
AzureAzure SQL Database, Azure SQL Managed Instance
PermissionsRead access to sys.objects, INFORMATION_SCHEMA, sys.sql_modules
InstallationNone — single portable .exe