Ora2Pg installation
To process migrations from Oracle to PostgreSQL, Migration Platform uses the in-built Ora2Pg tool (see the full list of tools used for processing migrations in Migration Platform). To successfully start the Oracle to PostgreSQL migration, users need to complete the following steps to install all the necessary software:
1. Download and install the Ora2Pg client
To download the client, click on either of the following links: zip or tar.gz files.
2. Download and install Perl
To download and install Perl, click on the following link.
3. Download and install Oracle
To download and install ODAC, we recommend using one of the 12.2.0.1.1 or 18.3 versions.
However, you can use any ODAC version that is compatible with Migration Platform.
4. Download and extract PostgreSQL binaries
To download the 12.4 version of PostgreSQL binaries click on the following link.
5. Configure the connection
To properly set up the extracted files, do the following steps:
- Open CMD on your Windows PC (as administrator)
- Navigate to the folder that contains the ora2pg file (e.g. cd C:\Ora2Pg)
- Enter the Perl installation command:
perl Makefile.PL
- Press the Enter button
- Enter the gmake installation command:
gmake && gmake install
- Press the Enter button
6. Set the environment variables
To set the environment variables, head over to the Advanced system settings menu.
You need to set the following variables:
ORACLE_HOME=<ORACLE_CLIENT_SOFTWARE_LOCATION> LD_LIBRARY_PATH=<ORACLE_CLIENT_HOME>/lib
e.g.
ORACLE_HOME=C:\app\<user name>\product\11.2.0\client_2 LD_LIBRARY_PATH=C:\app\<user name>\product\11.2.0\client_2\lib
7. Install DBD::Oracle libraries
Open the CMD (as administrator) and enter the DBD::Oracle libraries installation command:
perl -MCPAN -e "install DBD::Oracle"
and press the Enter button.
8. Set up executable file paths in the Migration Platform application
Open Migration Platform and go to Global Settings > External Tools. Then, set the path to the .bat file for Ora2Pg that is responsible for the conversion process, set the path to the .bat file:
e.g
C:\Strawberry\perl\site\bin\ora2pg.bat
To set the path to the psql.exe file for PSSQL that is responsible for applying changes to the target database, set the path to executable files:
e.g
C:\Postgresql\pgsql\bin\psql.exe
After the paths are set, save Global Settings and restart Migration Platform.
Now, Ora2Pg is fully configured and ready to use.
Didn’t find the answer?
You can report problems, ask questions or share ideas for improvements on our email [email protected].