Migrating from Oracle 9i to PostgresSQL 7.3.4 using Ora2Pg

Migrating from Oracle 9i to PostgresSQL 7.3.4 using Ora2Pg

How can I migrate a database from Oracle 9i to Postgres 7.3.4?

    Requires Free Membership to View

    When you register, my team of editors will also send you resources covering Linux administration and management; integration and interoperability between Linux, Windows and Unix; securing Linux and mixed-platform environments; and migrating to Linux.

    Cathleen A. Gagne, Senior Editorial Director

    By submitting your registration information to SearchEnterpriseLinux.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchEnterpriseLinux.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

What you need is Ora2Pg, which is a Perl module that is used to export an Oracle database schema to a PostgreSQL-compatible schema. It connects to your database, extracts the structure of the database and generates a SQL script that you can import into your Postgres database. It can dump the actual database schema (tables, views, sequences, indexes, grants), without editing the SQL code generated.

Ora2Pg is also capable of discharging the data in an online transaction, where one can choose what columns can be exported for each table. Features include database schema export (tables, views, sequences, indexes), grants/privileges export by user and group, data export and the SQL query converter. Best of all, the program is free and you can modify it under the same terms as Perl itself. Some more useful documentation on details of the process can be found here.

This was first published in December 2005