pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Pepe TD Vo <pepevo@yahoo.com>
To: pgsql-admin@lists.postgresql.org, Thomas Kellerer <shammat@gmx.net>
Subject: Re: Exporting TBs of data in Oracle schema/database into CSV format to migrate into PostgreSQL
Date: Mon, 20 Apr 2020 16:39:39 +0200
Message-ID: <ee5a27d790ac43d4358b6353f37d09eee4214bbf.camel@cybertec.at> (raw)
In-Reply-To: <172687860.2288957.1587391373846@mail.yahoo.com>
References: <CAOLrvP6sSTH2Mq5q29-9Jdk3JrR-PGT5WE+eN=8xnqKg8vnvbw@mail.gmail.com>
	<c5b9987a-ad9e-ce37-d734-2fb38d1d7330@gmx.net>
	<172687860.2288957.1587391373846@mail.yahoo.com>

On Mon, 2020-04-20 at 14:02 +0000, Pepe TD Vo wrote:
> we can access Oracle table within Postgres?  How?  Need to create a database link
> and/or how can both talk to each other?

That would be the Oracle foreign data wrapper:
https://laurenz.github.io/oracle_fdw/

> My data is from production, can turn off the foreign key.  Is there a way to copy
> data from Oracle to Postgres faster?  Should I export the Oracle data table via
> dump file as text/csv and insert it into Postgres?  Can we use an oracle dump file?

You cannot use an Oracle dump, because that is in a proprietary format.

Using the foreign data wrapper, you define a foreign table in PostgreSQL.
When you select from that table, the data are directly fetched from Oracle.

Then you can do

   INSERT INTO localtable SELECT * FROM foreign_table;

to transfer the data, without any intermediary file storage.
In a way, the data are streamed from Oracle to PostgreSQL.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (21+ messages)  latest in thread

Message-ID: <ee5a27d790ac43d4358b6353f37d09eee4214bbf.camel@cybertec.at>
Permalink:  ../ee5a27d790ac43d4358b6353f37d09eee4214bbf.camel@cybertec.at/
Also on:    postgresql.org/message-id/ee5a27d790ac43d4358b6353f37d09eee4214bbf.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, pepevo@yahoo.com, shammat@gmx.net
  Subject: Re: Exporting TBs of data in Oracle schema/database into CSV format to migrate into PostgreSQL
  In-Reply-To: <ee5a27d790ac43d4358b6353f37d09eee4214bbf.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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