pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
migrate from PostgreSQL to Oracle
4+ messages / 3 participants
[nested] [flat]

* migrate from PostgreSQL to Oracle
@ 2012-10-25 13:29 jo <jose.soares@sferacarta.com>
  2012-10-25 13:33 ` Re: migrate from PostgreSQL to Oracle Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>
  2012-10-25 17:58 ` Re: migrate from PostgreSQL to Oracle Walter Hurry <walterhurry@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: jo @ 2012-10-25 13:29 UTC (permalink / raw)
  To: pgsql-admin

Hi all,

I'm working with same db schema in PostgreSQL and Oracle,
We mainly work in PostgreSQL but sometimes we need to copy schema and data from pg to oracle
because some our customers want to use oracle instead of pg.

Thus I'm looking for some linux script to migrate from pg to oracle.
At the moment, I dump data from pg using pg_dump in the format:
INSERT INTO table (columns) (values)
then I load it into the Oracle db using cx_Oracle
this procedure is so slow, and sometimes I have to edit and modify
data manually, because some INSERT format aren't compatible.
Is there any interesting linux script to do this more easily? something like the ora2pg script.

thanks

j






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: migrate from PostgreSQL to Oracle
  2012-10-25 13:29 migrate from PostgreSQL to Oracle jo <jose.soares@sferacarta.com>
@ 2012-10-25 13:33 ` Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>
  2012-10-25 13:47   ` Re: migrate from PostgreSQL to Oracle jo <jose.soares@sferacarta.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Gabriele Bartolini @ 2012-10-25 13:33 UTC (permalink / raw)
  To: jo <jose.soares@sferacarta.com>; +Cc: pgsql-admin

Il 25/10/12 15:29, jo ha scritto:
> Is there any interesting linux script to do this more easily? 
> something like the ora2pg script.
Have you tried searching for pg2ora on Google?

Cheers,
Gabriele

-- 
  Gabriele Bartolini - 2ndQuadrant Italia
  PostgreSQL Training, Services and Support
  gabriele.bartolini@2ndQuadrant.it | www.2ndQuadrant.it





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: migrate from PostgreSQL to Oracle
  2012-10-25 13:29 migrate from PostgreSQL to Oracle jo <jose.soares@sferacarta.com>
  2012-10-25 13:33 ` Re: migrate from PostgreSQL to Oracle Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>
@ 2012-10-25 13:47   ` jo <jose.soares@sferacarta.com>
  0 siblings, 0 replies; 4+ messages in thread

From: jo @ 2012-10-25 13:47 UTC (permalink / raw)
  To: Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>; +Cc: pgsql-admin

Gabriele Bartolini wrote:
> Il 25/10/12 15:29, jo ha scritto:
>> Is there any interesting linux script to do this more easily? 
>> something like the ora2pg script.
> Have you tried searching for pg2ora on Google?
>
> Cheers,
> Gabriele
>
Yes Gabriele,
this was the first thing that I did, but I did not find anything 
interesting.
Thanks anyway.
j





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: migrate from PostgreSQL to Oracle
  2012-10-25 13:29 migrate from PostgreSQL to Oracle jo <jose.soares@sferacarta.com>
@ 2012-10-25 17:58 ` Walter Hurry <walterhurry@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Walter Hurry @ 2012-10-25 17:58 UTC (permalink / raw)
  To: pgsql-admin

On Thu, 25 Oct 2012 15:29:29 +0200, jo wrote:

> Hi all,
> 
> I'm working with same db schema in PostgreSQL and Oracle,
> We mainly work in PostgreSQL but sometimes we need to copy schema and
> data from pg to oracle because some our customers want to use oracle
> instead of pg.
> 
> Thus I'm looking for some linux script to migrate from pg to oracle.
> At the moment, I dump data from pg using pg_dump in the format:
> INSERT INTO table (columns) (values)
> then I load it into the Oracle db using cx_Oracle this procedure is so
> slow, and sometimes I have to edit and modify data manually, because
> some INSERT format aren't compatible.
> Is there any interesting linux script to do this more easily? something
> like the ora2pg script.

If the schemata are truly the same, I'd use 'copy to' a CSV file on the 
Postgres side, then SQL*Loader to put it into Oracle. Easily scriptable.

For maximum speed, use 'copy to on the server side; *not* psql, and 
(assuming that the data is clean), direct path for SQL*Loader.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2012-10-25 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-10-25 13:29 migrate from PostgreSQL to Oracle jo <jose.soares@sferacarta.com>
2012-10-25 13:33 ` Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>
2012-10-25 13:47   ` jo <jose.soares@sferacarta.com>
2012-10-25 17:58 ` Walter Hurry <walterhurry@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox