0% found this document useful (0 votes)
184 views6 pages

Steps To Install Ora2pg On Windows and Linux

This document serves as a Quick Installation Guide for the ora2pg tool, facilitating the migration of schema and data from Oracle to Azure Database for PostgreSQL. It provides step-by-step instructions for installing ora2pg on both Linux and Windows systems, including necessary prerequisites and scripts for automation. The document also includes references and contact information for feedback and suggestions.

Uploaded by

Eone Byte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views6 pages

Steps To Install Ora2pg On Windows and Linux

This document serves as a Quick Installation Guide for the ora2pg tool, facilitating the migration of schema and data from Oracle to Azure Database for PostgreSQL. It provides step-by-step instructions for installing ora2pg on both Linux and Windows systems, including necessary prerequisites and scripts for automation. The document also includes references and contact information for feedback and suggestions.

Uploaded by

Eone Byte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Step-by-Step Guide to Install

ora2pg on Linux & Windows.

Prepared by

Data SQL Ninja Engineering Team ([email protected])

Prepared by Data SQL Ninja Engineering Team


Disclaimer
The High-Level Architecture, Migration Dispositions and guidelines in this document is developed in
consultation and collaboration with Microsoft Corporation technical architects. Because Microsoft must
respond to changing market conditions, this document should not be interpreted as an invitation to
contract or a commitment on the part of Microsoft.

Microsoft has provided generic high-level guidance in this document with the understanding that
MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO THE
INFORMATION CONTAINED HEREIN.
This document is provided “as-is”. Information and views expressed in this document, including URL and
other Internet Web site references, may change without notice.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or
connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft
product. You may copy and use this document for your internal, reference purposes.

© 2019 Microsoft. All rights reserved.

Note: The detail provided in this document has been harvested as part of a customer engagement
sponsored through the Data SQL Ninja Engineering.

Prepared by Data SQL Ninja Engineering Team


This document is intended to be used as a Quick Installation Guide to enable
migration of schema & data from Oracle to Azure Database for PostgreSQL
using ora2pg tool. More details about Ora2pg can be found at
http://ora2pg.darold.net/documentation.html. This document has details of
scripts that automate the installation of ora2pg tool using PowerShell for
Windows and Bash for Linux Machines. This script was tested with Oracle
11.xx & 12.xx, download respective oracle client and client-sdk.

Linux
Pre-Requisites for Linux: This script requires RedHat/Ubuntu 18+/Debian 10/Centos 7 or later

Step 1
Download bash script installora2pg.sh from Data SQL Ninja GitHub Repository

Step 2
Run the script downloaded in step 1 as sudo or root. Ensure active internet connection.

This script when run will run below steps:

o yum update all and install necessary software using yum

o Checks for libclntsh.so, if exists (from previously installed oracle client) continue to next
step, else install instant client files (sdk and basic) from the same directory. If files don’t
exist, then you are prompted to download from Oracle.com. Ensure to place both (Oracle
sdk and client) the zip files in same folder as installora2pg.sh script.

o Download and install the latest version of dbd oracle from


https://www.cpan.org/modules/by-module/DBD

o Checks for pg_config (PostgreSQL client/server is available), and install dbd Pg from the
internet, otherwise ora2pg is installed without PostgreSQL library

o Clone and install latest version of ora2pg from https://github.com/darold/ora2pg.git. Test


ora2pg installation without ora2pg.conf file. This script file was also tested on docker base
centos 7.

Prepared by Data SQL Ninja Engineering Team


Windows
Pre-Requisites for Windows: This script was tested on windows 10 64bit.

Step 1
Download PowerShell script installora2pg.ps1 from Data SQL Ninja GitHub Repository

Step 2

Manual step: Download Oracle client and Oracle client sdk from Oracle.com and rename the file to
instantclient.zip and instantclient-sdk. The script expects the file name to be “instantclient” and
“instantclient-sdk”.

Run the PowerShell script downloaded in step 1 with admin privilege.

This script does the following:

o Checks internet connection, exit out if no internet connection.

o Automatically download & install strawberry perl from http://strawberryperl.com/ and delete
installer file after installation.

o Automatically check for oracle client. If not found then uses the installclient.zip &
installclient-sdk.zip files to install client and client-sdk.

Prepared by Data SQL Ninja Engineering Team


o Download & install portable github from https://github.com/git-for-
windows/git/releases/download/v2.23.0.windows.1/PortableGit-2.23.0-64-bit.7z.exe to
location c:\github.

o Install 2 perllib DBD::Oracle and DBD::Pg using cpan

o Clone latest ora2pg from https://github.com/darold/ora2pg.git and Install ora2pg. Incase


ora2pg already exists, you will see below error message.

Note: Once the installation is complete, ensure to add c:\instantclient to PATH in system variables.

References
http://ora2pg.darold.net/documentation.html

http://strawberryperl.com/

https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

https://www.cpan.org/modules/by-module/DBD

Data SQL Ninja GitHub Repository

Prepared by Data SQL Ninja Engineering Team


Feedback and suggestions
If you have feedback or suggestions for improving this data migration asset, please contact the Data SQL
Ninja Engineering Team ([email protected]). Thanks for your support!
Note: For additional information about migrating various source databases to Azure, see the Azure
Database Migration Guide.

Prepared by Data SQL Ninja Engineering Team

You might also like