Solved

Oracle to Postgresql Migration

Posted on 2011-03-18
6
911 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

730 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