?
Solved

Oracle to Postgresql Migration

Posted on 2011-03-18
6
Medium Priority
?
935 Views
Last Modified: 2012-05-11
Hi experts,

We have several instances of Oracle 9i and 10g, and we want to migrate them all into postgresql databases. Could you give me a step-by-step guide to perform this migration?

If we need to use any migration tool, it needs to be free, we won't afford to pay for a migration tool if there exists any other possibility.

Thank you
0
Comment
Question by:MarioAlcaide
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Expert Comment

by:POracle
ID: 35164131
If you want to do migration manually then first you have to make some spreadsheet.
One Spreadsheet contain Oracle datatype and its equvalent PG datatype.
2nd Spreadsheet contain Oracle function and its counterpart PG funcation.

After this you should be aware of existgin Oracle database architecture and design.

Start migration from table/index/view and other database object

Then migrate plsql code into pl/pgsql.

Test your application with new postgresql server

Some tools are availlable for migration, but you need to choose it carefully, because in some cases, after using tool much more work is require to correct migrated object.
0
 
LVL 7

Expert Comment

by:MrNed
ID: 35177215
As well as the data migration outlined by POracle, you need to be aware of the administration/maintenance changes too. For example, you can no longer rely on tablespace sizes to prevent disks from filling up, you may need to keep a closer eye on table fragmentation, backups/restores are completely different and you no longer have the ability to perform incremental backups etc.
0
 
LVL 4

Author Comment

by:MarioAlcaide
ID: 35179180
Thank you both for your answers. POracle your comment will be useful if we finally decide to perform the migration manually, but we have many schemas and it will take a lot of time.

If anyone knows an automatic procedure to do this task, with the minimal manual intervention, that would save us a lot of time and effort.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 7

Accepted Solution

by:
MrNed earned 2000 total points
ID: 35179287
Have you looked at this perl module: http://pgfoundry.org/projects/ora2pg

No idea if it's any good. I personally would be hesitant to use any tool without going through every single conversion manually to verify it works ok. Also some other links here if you haven't already seen them:

http://wiki.postgresql.org/wiki/Oracle_to_Postgres_Conversion
http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL
http://www.pgcon.org/2007/schedule/events/17.en.html
0
 
LVL 4

Author Comment

by:MarioAlcaide
ID: 35206329
Yes I have read about ora2pg but haven't used it, anyone has experience with this tool, or another similar one?

We will check all the conversions manually of course, but we need to automate this conversion as much as possible because it will be a massive migration...

Thank you all for your comments, if anyone else can provide more solutions, it will really help us
0
 
LVL 24

Expert Comment

by:johanntagle
ID: 35413287
If you are open to a ruby-based solution, you can make a migration script using the Sequel ruby gem.  http://sequel.rubyforge.org/documentation.html

Basically the script you need to come up with will:

1.  Connect to both Oracle and Postgresql databases.
2.  For each table to be migrated, you define the mapping of columns
3.  Loop around the columns in the source table and insert each into the target table, with formatting definitions as needed.

I think you can use ora2pg to recreate your schema in Postgresql, then use another tool to move the actual data.

I can help come up with a base script the uses Sequel, but let me know first if this is an option you will consider before I churn up some code.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to recover a database from a user managed backup
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question