SQL Server to Snowflake migration and validation
A SQL Server migration may combine a data transfer with the replacement of T-SQL reporting logic. Keep those workstreams separate: first establish whether the selected records arrived correctly, then test the business results of converted views, procedures, or downstream transformations.
Work through a finance-close incident
Imagine a distributor moving its month-end reporting from SQL Server to Snowflake. The invoice header count agrees, yet the receivables report differs and the first warehouse refresh misses its deadline. Finance needs to know whether the discrepancy is a missing credit, a changed calculation or a timing problem before approving the next reporting cycle.
Choose one closed accounting period, including credits raised later against invoices in that period. Map invoice lines at (InvoiceId, LineId), not just the invoice header key. Capture the source snapshot and target load completion for headers, lines, credits and customer reference data. A collection of individually successful loads can still describe different moments in time.
| Incident signal | Focused experiment | Evidence required for acceptance |
|---|---|---|
| Credits disappear from outstanding balance | Compare credit keys and invoice relationships, including later-posted corrections | Credit completeness and exact signed totals match the agreed accounting scope |
| Customer joins return a different population | Test case, accent and trailing-space examples under approved join semantics | Expected customer membership and join cardinality, not only matching text displays |
| A converted calculated amount differs | Compare stored inputs and the final expression at invoice-line grain | Approved rounding order, scale and null behavior with exact monetary checks |
| Incremental validation treats a token as a date | Inspect the migration representation of rowversion and the loader checkpoint separately | Stable business keys plus a documented, correctly applied change boundary |
| Same invoice appears under another day | Compare datetime2/datetimeoffset interpretations and posting-date rules | Agreement on business date and retained precision at period boundaries |
Microsoft documents rowversion as a changing binary counter, not a clock timestamp. Keep InvoiceId as the business identity; do not use a changing version token as the row-matching key. The token can inform a pipeline's change handling only under that pipeline's explicit contract.
Write a source-to-target contract
For an illustrative invoice dataset, map dbo.Invoice to ANALYTICS.FINANCE.INVOICE and explicitly pair InvoiceId with its target key. Keep the original identity values in the landing table. A target-generated sequence does not prove that an invoice retained its identity.
Include the invoice lines, credits and customer reference data needed to interpret a balance. A header-only comparison can pass while the business total is wrong. Align the source snapshot or reconciled change boundary across the related tables and record the corresponding completed load.
Review SQL Server semantics
| Field or behavior | What to validate |
|---|---|
rowversion / SQL Server timestamp | Treat it as a change token, not an event date. Record its migration representation and how the pipeline uses it. |
datetime, datetime2, datetimeoffset | Document timezone meaning and retained precision; test midnight and offset-sensitive cases. |
money, decimal, numeric | Define scale/rounding and check exact invoice and credit totals independently. |
| Collation and text | Test case, accents and trailing spaces where equality affects customer matching or joins. |
| Identity and computed columns | Preserve source identity; approve how computed values are reproduced or materialized. |
The target representation of a change token depends on the migration tool. For example, Snowflake's Openflow SQL Server mapping documents its own choices. Use the mapping of the pipeline you actually operate; do not infer it from this example.
Prove the comparison before expanding
Connect SQL Server, then follow the Snowflake validation workflow. Both connector types are enabled for SmartDiff. This is a configuration playbook, not a claim that this pair was benchmarked live.
Use a stable, bounded table pair for the first Data Source Diff and explicitly review key and column mapping. Use Query Diff for agreed projections or row-level predicates. Preserve raw values until differences are explained. DataDios represents decimal comparison values as double precision; use exact database-native checks for financial acceptance. Review coverage and batching limits before scaling.
Reconcile invoice totals by currency and business status. Include canceled invoices, credit notes, null optional fields, and updates to prior periods. Then compare the results of critical reports, including joins and access filters. A row-level match does not establish that converted T-SQL logic behaves identically.
Use SmartDiff to turn a discrepancy into a repair list
Use Data Source Diff for the agreed landing-table pairs. When T-SQL and Snowflake SQL express a report differently, use Query Diff with separately reviewed queries producing the same columns and business grain. Analyze the pair, inspect the sample-derived mapping, and mark stable keys before running. A query that compiles or produces a convincing sample has not established full report parity.
For an invented training cohort, suppose there are 5,000 distinct invoice-line keys across both sides: 4,850 matches, 110 shared keys with changed values, 25 source-only lines and 15 target-only lines. Source count is 4,985; target count is 4,975. Total differences are 150, not 190: missing and new lines are already differences. These figures are neither production observations nor a product benchmark.
Select the affected result and inspect the clusters. Inline highlighting shows removed and replacement values; side-by-side mode helps review amounts and posting attributes together. Diff by column can focus attention on the calculated amount, while Only diffs removes matching examples from the review. Track the source key alongside every proposed correction so finance can identify the invoice rather than interpret an anonymous chart.
The Summary tab provides source/target value-frequency comparisons; use it to investigate a changed currency or invoice-status distribution. Metadata helps review mapped representations. Clustering and these summaries are deterministic evidence, not a generative-AI finding. A single row may carry multiple labels or differ in several columns, so badge and column totals are not additive. Even the UI's “Root cause clusters” heading is a starting point for investigation, not proof that the cause has been established.
Export available CSV/PDF evidence for the selected table and record active filters. Standard cluster details are sampled, with up to 1,000 retained example rows per cluster; full counts do not imply full exported exception detail. Keep complete native reconciliation results for finance sign-off. The shared investigation guide explains scope, evidence and performance interpretation.
Investigate the slow close separately from correctness
Enable workload collection on SQL Server and Snowflake before the rehearsal, then verify that usable metrics have arrived. On SQL Server, identify reporting statements and investigate accumulated elapsed/CPU time, reads and executions where exposed. Relate activity to the close window and application demand. Use native evidence when a plan or counter needed for diagnosis is not available in the current product view.
SQL Server's sys.dm_exec_query_stats describes completed executions associated with cached plans. Counters accumulate over the plan's lifetime; eviction and recompilation can change the population. DataDios collects daily DMV snapshots without automatically differencing these counters into interval measurements. A snapshot is not a per-run latency trace. Keep plan identity, observation times and resets with any before/after comparison rather than attributing the entire cached total to the latest rehearsal.
For Snowflake, separate warehouse queue delay from execution and inspect scan/spill evidence where available. In the distributor example, a converted report could join invoice lines to every customer-history version, enlarging intermediate results. First prove that hypothesis with result grain and native Query Profile; then change the approved join and rerun both correctness and performance checks. Snowflake documents profile investigation for examining operators and data movement.
Keep warehouse size, competing workloads, result-cache conditions and report parameters in the record. Compare repeated executions of the same business report, not unlike engine counters. A larger warehouse can shorten a run while increasing cost; a faster report with missing credit lines is not a successful migration. Track the close deadline and total validation/parallel-running expense alongside execution time.
Example acceptance report
| Gate | Example decision and evidence |
|---|---|
| Invoice-line completeness | Hold the initial synthetic run: all 25 source-only and 15 target-only keys need explanation |
| Monetary equivalence | Attach exact native totals by currency, invoice status and period; investigate all 110 changed lines |
| Converted report behavior | Verify credits, access filters, customer-history joins and computed fields with the report owner |
| Operational readiness | Attach repeated run timings, SQL Server counter context, Snowflake query evidence and recovery rehearsal |
After correction, rerun the original cohort and a fresh incremental cycle. Finance owns the accounting interpretation, the data team owns transformation and load evidence, and the platform owner owns scheduling and capacity. A small company can assign these responsibilities to fewer people without dropping any gate.
Rehearse the final switch
Exercise full load, incremental updates, deletes and retry recovery. Record how the final change boundary is established, the last applied load and any accepted exceptions. Keep the original report available during the agreed validation window and document when recovery would require reconciling subsequent writes.
Review your SQL Server to Snowflake plan