Skip to content
Home › SQL Tools › Ora2Pg
Tool Review · Database Migration & DevOps

Ora2Pg

Ora2Pg is a free, GPL-licensed Perl tool that exports Oracle (and MySQL or SQL Server) schemas, PL/SQL code and data to PostgreSQL, with a migration assessment report that estimates the effort.

Free Research-based review
Last verified November 2026. Version checked: 25.0. Features and pricing for commercial products change; check the vendor site for the latest details.
Vendor
Gilles Darold (open source project)
Price
Free
Platforms
Linux, Windows
Licence
GPL v3
Works with
OracleMySQLMariaDBSQL ServerPostgreSQL

At a glance

Source databasesOracle, MySQL and MariaDB, SQL Server (since 24.0)
Target databasesPostgreSQL
Schema conversionYes, including PL/SQL to PL/pgSQL; review of converted code still needed
Data migrationOffline (requires downtime): COPY or INSERT files, direct load, or oracle_fdw
Automation and CLICommand line driven by ora2pg.conf; options can be overridden per run (-O in 25.0)
DeploymentLocal install of Perl and DBD drivers (Strawberry Perl on Windows)
LicensingFree and open source, GPL v3
Short answer

Ora2Pg is the long-standing open source starting point for Oracle to PostgreSQL migrations: it reports what is in the source, estimates the work, converts schema and much of the PL/SQL, and exports or loads data. It is a command-line tool configured through a large configuration file, and data movement is offline, so plan downtime or add a replication tool.

How we know: This profile is research-based: features, sources, requirements, licence and version were checked against the official Ora2Pg site (ora2pg.darold.net), the project README and the GitHub releases page on 7 November 2026. We have not run Ora2Pg against an Oracle database.

Overview

Ora2Pg connects to an Oracle database, scans it, and generates SQL scripts that recreate its structure and data in PostgreSQL. It handles tables, views, sequences, indexes, grants, partitions, synonyms, materialized views and procedural code (functions, procedures, packages, triggers), converting PL/SQL to PL/pgSQL where it can. Since version 24.0 (July 2023) it also migrates SQL Server databases, and it has long supported MySQL and MariaDB sources.

It is written in Perl and needs Perl 5.10 or later plus the matching DBI drivers: DBD::Oracle for Oracle, DBD::MySQL for MySQL and DBD::ODBC for SQL Server; on Windows the README recommends Strawberry Perl. Output goes to files that you load with psql, or straight into PostgreSQL through DBD::Pg for COPY and INSERT exports. The current release is 25.0 (April 2025).

Key features

  • Migration assessment report (SHOW_REPORT) with a cost estimate in person-days and a migration difficulty level (ESTIMATE_COST)
  • Schema export by object type: TABLE, VIEW, SEQUENCE, GRANT, PARTITION, MVIEW, SYNONYM and more
  • PL/SQL to PL/pgSQL conversion for functions, procedures, packages and triggers
  • Data export as COPY or INSERT files, or direct load into PostgreSQL through DBD::Pg
  • Parallel data export, including each partition of a partitioned table in version 25.0
  • FDW export type that creates oracle_fdw foreign tables, with oracle_fdw data movement options
  • Data validation between source and target

Pros and cons

Pros

  • Free and open source, with a long history in Oracle to PostgreSQL projects
  • Assessment report and effort estimate before you commit to a migration
  • Converts procedural code, not only tables and data
  • Fine-grained control through export types and configuration directives

Cons

  • Data migration is offline; online migration is not part of Ora2Pg
  • Needs Perl, DBD drivers and Oracle client libraries installed, which takes setup work
  • Target is PostgreSQL only
  • Configuration file has many directives to learn

Pricing

Ora2Pg is free and open source under the GNU GPL v3. There is no paid edition of Ora2Pg itself; the project site also promotes HexaRocket, a separate commercial product for online migrations.

Pricing checked on the vendor's official page on 7 November 2026. Prices change; confirm before buying.

Who it is best for

DBAs and consultants moving Oracle, MySQL or SQL Server databases to PostgreSQL who want a free tool that assesses the work and converts schema and procedural code.

Who should look elsewhere

Verdict

Our take

Ora2Pg remains the free default for assessing and converting Oracle schemas and PL/SQL to PostgreSQL, and its newer SQL Server and MySQL support widens its use. Expect setup effort with Perl and drivers, manual review of converted code, and a downtime window for the data copy.

Frequently asked questions

Is Ora2Pg free?

Yes. Ora2Pg is free and open source under the GPL v3. The project site also lists HexaRocket, a separate commercial product for online migrations.

Can Ora2Pg migrate SQL Server or MySQL to PostgreSQL?

Yes. It supports MySQL and MariaDB sources, and version 24.0 (July 2023) added SQL Server to PostgreSQL migration, which needs the DBD::ODBC driver.

Does Ora2Pg do online migration?

No. The project describes its data migration as offline, requiring downtime. For minimal downtime you need a replication tool alongside it.

Sources

Checked November 2026.

How we research reviews and what star ratings mean: our editorial method.

Compare your options

Browse the full tools directory or see the head to head comparisons.