Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TRRi7-0006VP-Ce for pgsql-admin@postgresql.org; Thu, 25 Oct 2012 17:59:15 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TRRi4-0003cD-Es for pgsql-admin@postgresql.org; Thu, 25 Oct 2012 17:59:14 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TRRi8-0003dW-DV for pgsql-admin@postgresql.org; Thu, 25 Oct 2012 19:59:16 +0200 Received: from cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com ([86.21.186.149]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Oct 2012 19:59:16 +0200 Received: from walterhurry by cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Oct 2012 19:59:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Walter Hurry Subject: Re: migrate from PostgreSQL to Oracle Date: Thu, 25 Oct 2012 17:58:50 +0000 (UTC) Lines: 23 Message-ID: References: <50893EB9.70306@sferacarta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) X-Pg-Spam-Score: -1.7 (-) X-Archive-Number: 201210/119 X-Sequence-Number: 40235 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.