pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
from postgres to oracle
2+ messages / 2 participants
[nested] [flat]

* from postgres to oracle
@ 2002-10-24 15:01 Carlos Sousa <carlosdsousa@hotmail.com>
  2002-10-24 15:20 ` Re: from postgres to oracle Thomas Good <tomg@q8.nrnet.org>
  0 siblings, 1 reply; 2+ messages in thread

From: Carlos Sousa @ 2002-10-24 15:01 UTC (permalink / raw)
  To: pgsql-sql


hi to all

can some one tell how to transfer the contents from a postgres database into 
a oracle database

thanks for your time and repaly


_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband.  
http://resourcecenter.msn.com/access/plans/freeactivation.asp




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

* Re: from postgres to oracle
  2002-10-24 15:01 from postgres to oracle Carlos Sousa <carlosdsousa@hotmail.com>
@ 2002-10-24 15:20 ` Thomas Good <tomg@q8.nrnet.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Thomas Good @ 2002-10-24 15:20 UTC (permalink / raw)
  To: Carlos Sousa <carlosdsousa@hotmail.com>; +Cc: pgsql-sql

On Thu, 24 Oct 2002, Carlos Sousa wrote:

> can some one tell how to transfer the contents from a postgres database into
> a oracle database

Carlos,

I use pg_dump to create full CREATE strings, with no double quotes.

   pg_dump -s -n -D -x dbname > dbname.sql

Then I use pg_dump to create full INSERT strings, with no double quotes.

   pg_dump -a -n -D -x dbname > dbname.df

Then I edit the dbname.sql file to remove things oracle objects to
like TEXT datatypes (change to whatever you prefer, LONG, VARCHAR2(4000),
etc.)  SEQUENCE syntax has to be modified slightly, GRANTS (removed with
the -x flag) should not exist, etc.

I prepend my usual Oracle stuff (SET NLS_DATE_FORMAT = 'whatever you used with
Pg';, SET SCAN OFF; SPOOL load.log;, etc)  to the file and then test it.
With sql*plus as the loader you'll want to stick an EXIT; at the EOF if
you run the script using indirection (sqlplus user/pass @dbname.sql)

HTH

I have examples, if you want em.
-----------------------------------------------------------------------
Thomas Good                                  e-mail: tomg@sqlclinic.net
Programmer/Analyst                           phone:   (+1) 718.818.5528
Residential Services                         fax:     (+1) 718.818.5056
Behavioral Health Services, SVCMC-NY         mobile:  (+1) 917.282.7359
--                                                                   --
SQL Clinic - An Open Source Clinical Record           www.sqlclinic.net
------------------------------------------------------------------------






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


end of thread, other threads:[~2002-10-24 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-24 15:01 from postgres to oracle Carlos Sousa <carlosdsousa@hotmail.com>
2002-10-24 15:20 ` Thomas Good <tomg@q8.nrnet.org>

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