Solved

Oracle to Postgresql Migration

Posted on 2011-03-18
6
904 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
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 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

856 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