SQL Server to Redshift — reconcile finance data and prove reporting readiness
A manufacturer moves accounts-receivable reporting from SQL Server to Redshift. Its first full load reconciles, but after the ingestion task restarts, a subset of invoices appears twice. Some audit timestamps lose ordering, and long international customer notes fail loading. Meanwhile, a converted aging report is fast in isolation and slow during the finance team's morning session.
This illustrative scenario combines data correctness, restart behavior and workload acceptance. Each needs evidence; none is established by the successful initial load.
Redshift is not currently enabled in the SmartDiff connection picker. It also lacks the native Performance Analyzer workload collection used for the eligible source engines. This article uses database-native target reconciliation and AWS performance tools; DataDios supports the SQL Server source-side investigation. It does not promise direct Redshift SmartDiff results or Redshift workload charts.
Establish an invoice-level acceptance contract
Keep InvoiceId stable when mapping dbo.Invoice to the target finance schema. Include invoice lines, credits, payment allocations and customer reference data at compatible cutoffs. Use (InvoiceId, LineNumber) for lines rather than assuming one row per invoice. Record whether computed fields are materialized or reimplemented in the new reporting layer.
Define separate checks for the source-faithful landing tables and the aging report. A report's “outstanding balance” may depend on credits, allocation date and business timezone; matching the invoice header alone cannot establish its correctness. Align a consistent source extraction with a completed target load and include a correction to an older invoice, a deletion and a replayed change.
Common defects and their business impact
| Failure pattern | Business symptom | Evidence and corrective decision |
|---|---|---|
| A resumed change feed replays records | Duplicate invoice totals after restart | Check key counts before and after replay; verify idempotent target application and reconcile exact balances |
| A nineteen-digit identifier overflows | Particular invoices are rejected despite “matching” decimal precision | Test maximum values and target numeric bounds; preserve identity with an appropriate representation |
| Seventh-digit timestamp precision is lost | Two audit events tie and a latest-row selection changes | Compare high-precision fixtures and an explicit sequence tie-breaker, then verify the report's ordering rule |
| Offset-bearing time is loaded as ordinary timestamp | Posting dates shift at a timezone boundary | Choose instant versus local-time semantics and inspect original offsets and target types |
| Unicode/large notes exceed target limits | International records or evidence fields are missing | Reconcile rejected rows and byte lengths; approve any externalized-content representation |
| Collation or converted report logic changes a join | Customer groups split or allocations multiply | Compare actual join cardinality and grouped report results, not just copied text values |
Redshift's DECIMAL(19,0) uses signed 64-bit bounds: a source value such as 9999999999999999999 does not fit merely because it has nineteen digits. SQL Server datetime2(7) can also distinguish values beyond Redshift's six fractional timestamp digits. Redshift TIMESTAMP ignores timezone information in input; choose and test the intended timestamp representation. See Redshift numeric limits, SQL Server datetime2, and Redshift datetime types.
If AWS DMS is your pipeline, its documented target limitations include possible CDC replay after resumption and character/LOB handling limits. Test those behaviors with your actual task configuration. They are not a universal description of every SQL Server migration tool. Redshift does not enforce primary-key uniqueness, so a declared constraint will not prevent a replay defect. See DMS Redshift target guidance, Redshift character types and constraints.
Investigate a restart defect end to end
In a synthetic pilot, a closed batch contains 5,000 invoices. After a retry, target row count is 5,030 while distinct invoice count remains 5,000. Thirty duplicated keys explain the excess rows, but that does not yet tell you which copy is authoritative. A separate set of nine note-bearing rows is rejected, and twelve audit-event pairs lose their timestamp distinction. Keep these as separate cohorts; they refer to different tables and denominators.
First, verify identity and the load boundary. Run native uniqueness checks on the target, retain all copies for the affected keys, and compare their source change tokens and ingestion metadata. SQL Server rowversion is a binary change token, not a business timestamp or stable invoice identity; see Microsoft's rowversion reference. Do not delete an arbitrary duplicate to make the counts pass.
Second, isolate the affected replay interval. Inspect the task's checkpoint/restart history and compare the same source-final state with the target. Classify inserted, updated and deleted keys separately. Confirm that a second replay produces the same intended state rather than another copy. Conduct disruptive restart exercises in a disposable migration environment with approved fixtures.
Third, verify value and business results. Compare exact invoice/credit/payment amounts by currency and period with database-native decimal arithmetic. Check that note rejections did not remove their parent business records. For audit ordering, inspect original precision and the intended tie-breaker; collapsing two timestamps is not acceptable merely because amounts still match.
Finally, repair and rerun. Correct the pipeline's key/replay logic, reload rejected records using an approved representation, and retest the bounded wave plus affected aging buckets. Save both pre-repair and post-repair evidence with the mapping version and owner.
For eligible pairs, SmartDiff can group recurring discrepancy patterns, highlight changed cells and summarize value frequencies. Here the equivalent grouping is performed over native reconciliation outputs because Redshift execution is unsupported. The shared investigation method explains the distinction and provides an acceptance-note structure.
Explain the performance change across the two platforms
Select three workloads: one invoice lookup, the month-end aging report and the batch that refreshes its inputs. Use accepted data, equal report output, fixed parameters, documented cache conditions and realistic concurrency. Record target provisioned/Serverless resources and source background activity. Do not claim the analytical warehouse should reproduce every transactional lookup characteristic of SQL Server.
Use DataDios on the source. Performance Analyzer can expose SQL Server execution/CPU/wait evidence, reads, executions and available cached-plan detail. Identify whether the aging report repeatedly reads large volumes or competes with the application. Collection uses daily DMV snapshots whose query totals reflect the lifetime of the cached plan; changing the dashboard date range does not turn them into interval-only totals. The Microsoft DMV reference explains the cached-plan lifetime. Keep independent per-run timings for the controlled comparison.
Use native Redshift evidence on the target. Inspect queue time separately from execution time in SYS_QUERY_HISTORY, with units recorded as microseconds. Check result-cache status and returned rows. Review the target plan and query details when an expensive join or redistribution is suspected. A good isolated run followed by slow concurrent runs points to a different investigation than a consistently slow scan.
For the morning aging report, repeat a representative concurrent run after ingestion is complete. If queue time dominates, investigate workload scheduling/capacity. If execution dominates, examine distribution and converted SQL before increasing resources. A larger target can improve time while raising cost; compare successful report completions and the billing window, not only one elapsed-time value. Any SQL rewrite must also pass the aging-bucket and exact-balance checks again.
Retain DataDios source charts and native target results together in the project review. There is no automatic source-target query matching or normalized performance score. The target's cost, source capacity relieved and duplicate-platform operating period are separate parts of the business case.
Write an acceptance summary the finance owner can use
Illustrative decision record: Batch F12 has 5,000 distinct invoice keys; 30 replay duplicates block acceptance until replay is idempotent. Nine note-load rejects require recovery, and twelve audit ordering cases require a preserved sequence rule. Finance must approve exact balances and aging buckets after repair. Operations must separately demonstrate the morning workload deadline under representative concurrency and a reviewed cost envelope. Attach the scope, run evidence, remaining exceptions and named owners.
For an enterprise, make ingestion recovery, accounting acceptance and workload readiness separate sign-offs. For a small manufacturer, start with one closed period and the receivables report used to collect cash. Measure time to disposition a defect cohort, reconciliation effort per wave and days of parallel operation; do not infer savings from a single successful query.
Review your SQL Server to Redshift requirements