TRANSMISSION // 2612.04670v1

Why compiling SQL is not enough for database migration

Source published

VeriMig tests AI-translated Sybase ASE code against reviewed SQL Server references. Its results show why compilation alone can miss behavior differences, with important limits because no ASE server was available.

AI-generated conceptual illustration for Why compiling SQL is not enough for database migration
AI-generated conceptual illustration; not documentary evidence.

Moving stored procedures between databases involves more than making code compile. Differences in NULL handling, joins or data types can change results without obvious errors. VeriMig is a framework for checking language-model translations from Sybase ASE to Microsoft SQL Server, evaluated against reviewed references rather than a live ASE system.

A database migration can fail quietly: code translated from Sybase Adaptive Server Enterprise (ASE) may compile on Microsoft SQL Server and still behave differently. A condition placed in the wrong part of an outer join, for example, can cause rows to disappear. VeriMig, a framework evaluated in a 2026 paper by Prasad Manda, Sharath Chandra Kampili and Pramod Begur Nagaraj, addresses the gap between executable code and matching behavior.

Four checks, with the reference kept out of repairs

VeriMig uses four gates. The first deploys candidate code on SQL Server. The second runs a lint that looks for ASE constructs that should not remain. The third compares the candidate’s behavior on chosen inputs with a reviewed SQL Server reference translation. The fourth checks source and target data during migration.

Only deployment and lint findings feed back to the model’s repair loop. The comparison with the reference does not: this keeps the model from being tuned against the same outcomes used to score it.

The authors created 46 development cases and six held-out procedures, and organized dialect differences into 15 categories. Most development cases isolate one difference; two instead encode migration-policy choices, where there is not a single correct behavior. The held-out procedures combine multiple categories. The team tested five locally hosted code-model configurations using a plain prompt, a prompt with a checklist of known dialect differences, and a repair loop. They also ran an additional comparison with a hosted model; that model was not the evaluation standard. The reviewed translations served as references.

A checklist raised agreement

For the strongest local model, agreement with the references was 53.0% with a plain prompt, 81.1% with the checklist and 87.9% with the repair loop. The checklist improved all five local models. The further gain from the repair loop was not statistically significant in the reported comparison, but this result is exploratory: the strongest model was selected after examining results.

On the six held-out procedures, that model agreed with the references on 33.3% of cases with a plain prompt and 66.7% with the repair loop. With only six procedures, the authors describe these results as preliminary.

Compilation and linting did not ensure matching behavior. For the strongest local model, 40.2% of plain-prompt translations passed both checks but disagreed with the reference. Even after repair, some mismatches passed those first two gates. These percentages describe agreement on the study’s selected inputs, not a guarantee about all possible behavior.

The hosted model agreed with the references on 97.0% of development cases with a plain prompt and 100.0% with the checklist. The authors interpret this as suggesting that the observed failures were mainly associated with the smaller local models tested. But the corpus may not distinguish stronger models well, and the hosted-model results do not establish how it would perform on more challenging, independently written code.

For data reconciliation, the researchers injected faults into test tables and compared detection methods. Row counts missed changes that left the number of records unchanged. A simple hash based on joining values with separators missed deliberately ambiguous cases. A per-row SHA-256 hash using an unambiguous encoding detected every fault in this test. This result is limited to the selected fault types; the experiment did not test cross-engine data extraction.

What the evidence can—and cannot—show

The central limitation is the absence of an ASE server. The study compared candidate translations with reviewed SQL Server references, not with direct execution of the original procedures on ASE. For 14 cases, expected ASE behavior was based on documentation rather than execution. The authors report correcting a reference and test-harness issues during the work, highlighting the importance of the comparison standard.

The corpus is synthetic, short and written by the authors. The six held-out procedures are few and were also written by them. Tests covered a limited set of inputs. An expanded mutation study detected 70 of 74 non-equivalent mutations, but that does not prove correctness for every input. Microsoft’s migration assistant was not evaluated.

The paper identifies itself as an accepted manuscript for a 2026 IEEE conference. This article is based on the paper text, not an independent replication. The results support a restrained takeaway: compilation and linting can miss behavioral mismatches, and explicit dialect guidance plus comparison against a reference can reveal some of them. They do not show that VeriMig guarantees safe production migrations. The authors identify testing against a live ASE server and expanding the corpus with independently written, production-scale procedures as important next steps.

Reviewed cross-references

These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.

  • Can a local AI team help utilities question their smart-meter data?

    Shared method: Both evaluate database code by executing it and checking results: VeriMig compares translated procedures with reviewed references, while OpenMeter verifies NL-to-SQL pairs through execution and result hashing. The checks serve different purposes and use different tasks; OpenMeter’s dataset verification does not validate migration equivalence.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2612.04670v1 — Original paper

      Excerpt reference: static/papers/2612.04670v1.md:166-277
      Basis: Paper text
      Source file SHA-256: 9587dd55f01d174098e40e8fcdcf323de742b482b4403dce596693fca099198b

    • 2611.09372v1 — Original paper

      Excerpt reference: static/papers/2611.09372v1.md:82-153
      Basis: Paper text
      Source file SHA-256: f581d399a5954473f884f832e46482b9ede354b11386e3a842b1b7729bae8e24

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.