Process to Install and Run ora2pg

Pre-installation steps :

1. ORACLE Client must be installed and ORACLE_HOME must be set.

2. Install perl (version 5.6 and above)

Installation steps :

1. Install DBI (database interface module)

apt-get install cpanminus (for ubuntu)

yum install cpanminus (for Linux)

cpanm DBI

2. Install DBD::Oracle and DBD::Pg

cpanm DBD::Oracle

cpanm DBD::Pg

3. Download the latest version of ora2pg from http://sourceforge.net/projects/ora2pg/ and run the following commands:

tar -xvf ora2pg-18.0.tar

cd ora2pg-18.0/

perl Makefile.PL

su root

make

make install

4. Do the changes as per req

By default Ora2Pg will look to ora2pg.conf configuration file into /etc/ora2pg/ directory.

ORACLE_HOME /app/oracle/product/11.2.0

ORACLE_DSN dbi:Oracle:host=[hostname];sid=[SID name]

ORACLE_USER [SYSTEM]

ORACLE_PWD [password]

USER_GRANTS 1

5. Check the version of pra2pg :

ora2pg SHOW_VERSION

6. Run the below command

ora2pg -c /etc/ora2pg/ora2pg.conf

ora2pg -c /etc/ora2pg/ora2pg.conf -p -P 10 -J 10 -L 1000000

7. .sql file will create in the current directory have converted data into Postgre