Compare and reconcile data between two databases or environments

After a migration, a sync, or a release, you need to prove PROD still matches the source (row counts, checksums, key differences), often across different vendors.

The problem: proving integrity, differently every time

Reconciliation after a migration or a sync usually gets done by hand: a count here, a spot-check there, whatever the person doing it happens to think of that day. It works, until someone asks how you know it worked, or until the same check needs doing again after the next release and nobody remembers exactly what was checked last time.

The BroadSQL approach: pull both sides somewhere you can compare them

PULL can copy a query's results from any connected database into a local H2 table, regardless of what database it came from, so two systems that don't speak the same SQL dialect can still land in the same place for comparison:

CONNECT source_db;
PULL customer TO checks.source_customer AS H2;

CONNECT target_db;
PULL customer TO checks.target_customer AS H2;

CONNECT checks;
SELECT count(*) FROM source_customer;
SELECT count(*) FROM target_customer;

From there, row counts, a checksum-style aggregate, or a key-by-key comparison are ordinary SQL against the local copies. Save the comparison query itself in your library (LIB RUN) and the same reconciliation check runs identically next time, against whichever pair of environments you point it at.

Honest scope

This is scriptable, repeatable checking built out of ordinary SQL and a local H2 database, not a dedicated schema/data-diff product with a UI of its own. For very large tables or a fully automated diff engine, a specialized tool may still be the better fit. Where this approach wins is when the checks are yours to define and you want them to run the same way, against any two environments, every time.

Who this is for

Data stewards responsible for proving data integrity after a migration, a sync, or a release, especially when sign-off depends on it.

Build a repeatable checkpack

I help teams build a "data-quality checkpack": row counts, null checks, referential checks, and key-level reconciliation, saved once and re-run on demand or on a schedule, then exported to Excel for sign-off. Get in touch to talk about your next migration or release.