Solved

Oracle to Postgresql Migration

Posted on 2011-03-18
6
874 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
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 7

Accepted Solution

by:
MrNed earned 500 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now