Ora2Pg
Installation

Getting Started

Ora2Pg installation requirements and setup overview

INSTALLATION

All Perl modules can always be found at CPAN (http://search.cpan.org/). Just type the full name of the module (ex: DBD::Oracle) into the search input box, it will bring you to the page for download.

Releases of Ora2Pg are published at SF.net (https://sourceforge.net/projects/ora2pg/).

On Windows(TM) you should install Strawberry Perl (http://strawberryperl.com/) and the OSes corresponding Oracle clients. Since version 5.32, the Perl distribution includes pre-compiled driver for DBD::Oracle and DBD::Pg.

Required

The Oracle Instant Client or a full Oracle installation must be installed on the system. You can download the RPM from Oracle download center:

rpm -ivh oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12.2-jdbc-12.2.0.1.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm

or simply download the corresponding ZIP archives from Oracle download center and install them where you want, for example: /opt/oracle/instantclient_12_2/

You also need a modern Perl distribution (Perl 5.10 or later). To connect to a database and proceed with its migration, you need the DBI Perl module > 1.614. To migrate an Oracle database, you need the DBD::Oracle Perl module to be installed.

To install DBD::Oracle and have it working, you need to have the Oracle client libraries installed and the ORACLE_HOME environment variable must be defined.

If you plan to export a MySQL database, you need to install the Perl module DBD::MySQL which requires that the MySQL client libraries are installed.

If you plan to export a SQL Server database, you need to install the Perl module DBD::ODBC which requires that the unixODBC package is installed.

On some Perl distributions, you may need to install the Time::HiRes Perl module.

If your distribution doesn't include these Perl modules, you can install them using CPAN:

perl -MCPAN -e 'install DBD::Oracle'
perl -MCPAN -e 'install DBD::MySQL'
perl -MCPAN -e 'install DBD::ODBC'
perl -MCPAN -e 'install Time::HiRes'

otherwise, use the packages provided by your distribution.

Optional

By default, Ora2Pg dumps exports to flat files. To load them into your PostgreSQL database, you need the PostgreSQL client (psql). If you don't have it on the host running Ora2Pg, you can always transfer these files to a host with the psql client installed. If you prefer to load exports 'on the fly', the Perl module DBD::Pg is required.

Ora2Pg allows you to dump all output in a compressed gzip file. To do this, you need the Compress::Zlib Perl module or, if you prefer using bzip2 compression, the program bzip2 must be available in your PATH.

If your distribution doesn't include these Perl modules, you can install them using CPAN:

perl -MCPAN -e 'install DBD::Pg'
perl -MCPAN -e 'install Compress::Zlib'

otherwise, use the packages provided by your distribution.

Packaging

If you want to build binary packages for your preferred Linux distribution, take a look at the packaging/ directory of the source tarball. It contains everything needed to build RPM, Slackware and Debian packages. See the README file in that directory.

On this page

Powered by HexaCluster

HexaRocket

Ora2Pg+ for Enterprises

Need enterprise-grade migration? Get zero-downtime & continuous data replication.

Explore HexaRocket