[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Oracle to Postgresql Migration

Posted on 2011-03-18
6
Medium Priority
?
940 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

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 post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

656 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