Any2HeliosDB (a2h) is a clean-room, Apache-2.0 successor to Ora2Pg — a general migration engine that moves Oracle, MySQL, PostgreSQL, and SQL Server into HeliosDB or stock PostgreSQL over the PostgreSQL wire protocol. Assess, export schema, load in parallel, validate, and stream changes — from a CLI, a library, or an MCP server.
Connect both ends, see what you have, move it, prove it landed correctly, then keep it in sync. Every step is a subcommand; every step is scriptable.
a2h wizard connects both ends, detects the target edition, probes capabilities, round-trips a COPY to prove NULL-vs-empty-string fidelity, and writes a config.toml. a2h doctor validates the environment.
a2h assess is read-only: object inventory, per-column type mapping with provenance, cost estimate, and a target-gap report. Output as text, JSON, or HTML.
a2h export emits target DDL in load-safe order — tables, sequences, indexes, views, then FKs last — with a .review.sql companion for procedural objects that need a human eye.
a2h migrate moves schema and data: integer-PK-range chunked, parallel, manifest-tracked. COPY fast path or array INSERT. Crash-safe — a2h resume never duplicates a chunk.
a2h monitor is a full-screen dashboard — per-table progress, chunks, rows, ETA. --once prints a single snapshot for CI logs.
Ora2Pg-style global [data_type] and per-column [modify_type] overrides, each carrying provenance so a reviewer can see why a column was mapped the way it was.
Adapts to what the live target actually supports — COPY, ON CONFLICT, RETURNING, MERGE, PL/pgSQL, CHECK/FK — with graceful degradation. It never assumes from a version string.
Drive it from the Typer + Rich CLI, import it as a Python library, or run a2h mcp serve to expose the engine to AI agents.
Each source below is validated end to end against a real fixture. Source drivers ship as optional extras — install only what you need.
| Source | Version tested | Driver | Install extra |
|---|---|---|---|
| Oracle | 21c | oracledb (thin) | [oracle] |
| MySQL | 8 | PyMySQL | [mysql] |
| PostgreSQL | 14–16 | psycopg | core |
| SQL Server | 2022 | pyodbc + ODBC | [mssql] |
Targets: HeliosDB Nano, Lite, and Full; stock PostgreSQL 16; and MySQL 8 for migrate-back. PostgreSQL doubles as a source, so any-to-any moves — including HeliosDB → MySQL — run through the same engine. An Oracle-TNS-wire native target is experimental and not yet shipped.
Beyond synthetic fixtures, the engine is exercised against the canonical community sample databases for PostgreSQL and MySQL. Row counts are measured on representative fixtures — reproduce on your own and report variance.
The headline real-data run. Pagila exercises timestamptz, arrays, composite primary keys, and declarative partitions across roughly 65k rows. All 13 sequences migrate with correct resume points and a working DEFAULT nextval. The live monitor demo ran on a 49,636-row Pagila load.
The view-translation corpus. Migrating Sakila from MySQL to stock PostgreSQL 16 translates all 8 views — GROUP_CONCAT → string_agg, IF() → CASE, loose → strict GROUP BY, backtick aliases. FK-index sanity is checked on film_category.
A synthetic schema covering the awkward cases: boolean-ish flags, DECIMAL, large text and binary columns, NULL vs empty string, unicode, and embedded tabs and newlines. This is the round-trip fidelity test that gates a release.
The validation suite returns a non-zero exit code on any mismatch, so it drops straight into CI. Run it after every load and after every cutover.
a2h test — object inventory and per-column diff between source and target.a2h test-count — row-count parity, table by table.a2h test-data — PK-ordered, per-row SHA-256 with cross-driver canonicalization, so a value compares equal regardless of which engine emitted it.a2h test-index — FK-index sanity so foreign keys land on indexed columns.An Extract → trail → Replicat pipeline, GoldenGate in shape: a durable, append-only JSONL trail with an independent capture watermark and apply cursor.
a2h extract — Oracle SCN-watermark capture, or MySQL ROW-binlog capture including deletes.a2h replicat — idempotent apply via INSERT … ON CONFLICT DO UPDATE, with optional delete reconciliation.a2h extracts — list and inspect running captures.CDC ships today for Oracle SCN-watermark and MySQL binlog sources.
a2h mcp serve exposes 16 engine tools over MCP — assessment, export, load, validation, CDC — with Bearer-token auth and viewer / operator / admin RBAC, over both HTTP and stdio. Point Claude Code, Cursor, or any MCP client at it and let the agent plan and run the migration.
# Install with the source extras you need ([mysql] / [mssql] / [mcp] / [all])
pip install any2heliosdb[oracle]
# Connect both ends, smoke-test fidelity, write config.toml
a2h wizard
# Schema + parallel, resumable data load
a2h migrate -c config.toml
# Watch it live (in another terminal)
a2h monitor -c config.toml
# Validate — gates CI, non-zero exit on mismatch
a2h test-count -c config.toml && a2h test-data -c config.toml
A small set of well-separated parts, each replaceable.
Per-dialect source adapters introspect schema and data into a single canonical intermediate representation. Pluggable target drivers emit from that IR to the destination, so adding an engine is additive.
Type mapping is data, not code paths — with global and per-column overrides and provenance. The runtime capability probe decides which write strategy the live target can actually use.
Integer-PK-range chunking feeds a parallel worker pool. COPY fast path or array INSERT. Each chunk is idempotent — range-delete then load in one transaction — tracked in a durable SQLite-WAL manifest.
Change capture writes a durable, append-only JSONL trail with an independent capture watermark and apply cursor, so extract and apply can run and recover independently.
Procedural code — stored procedures, packages, triggers — is the hardest part of any database migration. The next major version adds an optional AI-native path for it.
Planned for the next major release. Today, procedural objects are exported to a .review.sql companion for a human to port.
# Apache License 2.0
# Permissive, OSI-approved, no copyleft.
# Clean-room implementation — not derived
# from any GPL migration tooling.
# Use it commercially, embed it, fork it,
# wire it into your own pipelines.
git clone \
https://github.com/HeliosDatabase/Any2HeliosDB
Any2HeliosDB is Apache 2.0 — a clean-room migration engine you can read, fork, and trust in production.