ora2pg Migration Example: Oracle HR Schema to PostgreSQL

colorful stacked fabrics with intricate patterns

Oracle's HR schema is the closest thing the database world has to a universal reference.

Every Oracle DBA has seen it.

Every migration consultant uses it to explain how the process works.

What makes it genuinely useful as a case study is not its size — it is seven tables and 107 employees.

What makes it useful is that it contains, in minimal form, the exact patterns that make Oracle-to-PostgreSQL migrations non-trivial: sequences wired to triggers, stored procedures, type mismatches that compile cleanly and fail at runtime.

I ran the full migration using ora2pg 25.0 with Oracle 19c as the source and PostgreSQL 18 as the target.

This post covers the five things that required manual intervention — and why each one matters far more on a production schema than it does on a demo.

Continue reading “ora2pg Migration Example: Oracle HR Schema to PostgreSQL”

The Complete Oracle-to-PostgreSQL Data Type Mapping Guide

serene snowy mountain landscape with pines

TL;DR: Most Oracle-to-PostgreSQL data type mappings are straightforward.
The dangerous ones are not.
Oracle DATE includes a time component that PostgreSQL DATE silently discards.
Oracle NUMBER maps to NUMERIC by default, which is correct but slow for integer workloads.
Empty strings in Oracle are NULL; in PostgreSQL they are not.
This guide gives you the full mapping table and covers the five traps that cause silent data corruption during migration.

Continue reading “The Complete Oracle-to-PostgreSQL Data Type Mapping Guide”