Ora2Pg

Open source

Ora2Pg is a free, open source tool that scans Oracle or MySQL databases and generates SQL scripts to migrate them to PostgreSQL.

Open-source alternative to

ora2pg.com
Ora2Pg homepage screenshot
GitHub stars
1.2k
Last 30 days
+4(+0%)
Last commit
9 days ago
Repository age
14 years
Version
v25.0
Licence
GPL-3.0
Self-hosted
Yes

About Ora2Pg

Ora2Pg connects to an Oracle database, scans it, extracts its structure or data and generates SQL scripts that can be loaded directly into PostgreSQL. MySQL is also supported as a source. The site notes more than 25 years of development and says it is created by Gilles Darold and maintained with the team at HexaCluster.

The open source toolkit covers migration assessment reports, schema conversion including Oracle PL/SQL to PostgreSQL PL/pgSQL, data migration and data validation. Data migration is offline and requires downtime. It is released under GPL v3, and version 25.0 is shown on the site.

For harder cases the same people offer HexaRocket, an enterprise product that adds online migration with rollback and change data capture for live replication. HexaCluster also sells migration help for projects that need manual fixes or production cutover support.

Key features

  • Scans Oracle databases and generates PostgreSQL scripts
  • Migrates MySQL databases as well as Oracle
  • Assessment, schema extraction, data export and SQL conversion
  • Converts Oracle PL/SQL to PostgreSQL PL/pgSQL
  • Offline data migration with validation

Good fit for

  • Assess an Oracle to PostgreSQL migration
  • Convert PL/SQL code to PL/pgSQL
  • Export Oracle data into PostgreSQL
Built with
Perl tools
Tags
oracle
postgresql
migration
mysql
database
pl/sql
open source

Ora2Pg: questions and answers

What is Ora2Pg used for?
Ora2Pg is a free, open source tool that scans Oracle or MySQL databases and generates SQL scripts to migrate them to PostgreSQL. It is a good fit for assess an Oracle to PostgreSQL migration, convert PL/SQL code to PL/pgSQL and export Oracle data into PostgreSQL.
Is Ora2Pg open source?
Yes. Ora2Pg is open source under the GPL-3.0 licence. Its source code is on GitHub at darold/ora2pg and is written mainly in Perl.
Is Ora2Pg free?
Yes. Ora2Pg is open source, so the software itself is free to use.
Can I self-host Ora2Pg?
Yes. Ora2Pg can be self-hosted on your own server or infrastructure.
What is Ora2Pg an alternative to?
Ora2Pg is an open-source alternative to AlloyDB for PostgreSQL. Other open-source alternatives to AlloyDB for PostgreSQL include PostgreSQL, TimescaleDB and CloudNativePG.
Is Ora2Pg actively maintained?
Yes. The most recent commit to Ora2Pg was on 4 November 2026, and the latest release is v25.0, published on 20 April 2025. The project has 1.2k stars on GitHub, with 4 added in the last 30 days.

Open-source alternatives to Ora2Pg

See all

SaaS alternatives to Ora2Pg

See all