Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B4B199FB43B for ; Fri, 9 Mar 2007 15:32:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 21871-02 for ; Fri, 9 Mar 2007 15:32:15 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by postgresql.org (Postfix) with ESMTP id C9DA99FB5FA for ; Fri, 9 Mar 2007 15:32:16 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so1372573ugf for ; Fri, 09 Mar 2007 11:32:12 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=HQnkAumchEgKCxNrigJpXXm8mXHVmtxsjENPi7T/kFRjepOHvKwHOrsvxoCPkyHHsajU0ljn3qanTVfUb6AAmxcIaXwybZ827Lqj4ezhsQ2sAKsekU4/xQ0cfzNQitdRN9ihiD1JSDsDwrvjeA3du8J98z/BFq3TtFEIhVhAp6k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=VrWMPUPM21HU04zSsMSeLz1X5uHjUZuEoyD39snzzT/ST9kYZDbCf8W3WaKdIP6h75/kuCZmbURMx0p8niQBcb/r3+RRGIBa0DUUSaUnlVeii/SWzgeyNQTrX+MGW/9dFRWD7EfzxkUv6Cz66TjFVmw4oGuuoEQsr8EBsj7qefw= Received: by 10.67.121.15 with SMTP id y15mr10249912ugm.1173468732466; Fri, 09 Mar 2007 11:32:12 -0800 (PST) Received: by 10.67.94.13 with HTTP; Fri, 9 Mar 2007 11:32:12 -0800 (PST) Message-ID: <55c095e90703091132y6f63c912ua816946d2a0b198a@mail.gmail.com> Date: Fri, 9 Mar 2007 16:32:12 -0300 From: "Ezequias Rodrigues da Rocha" To: "Jonah H. Harris" Subject: Re: [SQL] PostgreSQL to Oracle Cc: "pgsql general" , PostgreSQL In-Reply-To: <36e682920703091032u22cd9901w6212c9aba999ec8c@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1679_872.1173468732402" References: <55c095e90703090954m74e2b06arf73e3037f25f5c18@mail.gmail.com> <36e682920703091032u22cd9901w6212c9aba999ec8c@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/556 X-Sequence-Number: 110746 ------=_Part_1679_872.1173468732402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you Jonah, That isn't a decision taken but I will need to argue with the new team of my new company. I can't see why but I will see how the things occurs. Thank you again Ezequias 2007/3/9, Jonah H. Harris : > > On 3/9/07, Ezequias Rodrigues da Rocha wrote: > > Is it a simple action to convert a database from PostgreSQL to Oracle ? > > Yes, relatively. > > > Has someone any idea ? > > There's a couple ways to do this, but I'd recommend first using > pg_dump to export schema only. > > Your functions and triggers would need to be rewritten, but assuming > they're in PL/pgSQL, it's a fairly trivial task to translate them into > PL/SQL. > > As far as the views and sequences are concerned, pull them out of the > pg_dump export and re-run them in TOAD, SQL*Plus, or your favorite > tool. > > As far as the type goes, I'm not quite sure what you're doing with it > or how it's used, but it should also be easy to migrate. > > To copy the data and table definitions, I'd use a database link (on > the Oracle side) with hsodbc connecting to your PostgreSQL system via > ODBC. > > Now that my advice is done with, could you explain why you need to > move to Oracle from PostgreSQL? > > -- > Jonah H. Harris, Software Architect | phone: 732.331.1324 > EnterpriseDB Corporation | fax: 732.331.1301 > 33 Wood Ave S, 3rd Floor | jharris@enterprisedb.com > Iselin, New Jersey 08830 | http://www.enterprisedb.com/ > -- Ezequias Rodrigues da Rocha http://ezequiasrocha.blogspot.com/ use Mozilla Firefox:http://br.mozdev.org/firefox/ ------=_Part_1679_872.1173468732402 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you Jonah,

That isn't a decision taken but I will need to argue with the new team of my new company. I can't see why but I will see how the things occurs.

Thank you again
Ezequias
2007/3/9, Jonah H. Harris <jonah.harris@gmail.com>:
On 3/9/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> Is it a simple action to convert a database from PostgreSQL to Oracle ?

Yes, relatively.

> Has someone any idea ?

There's a couple ways to do this, but I'd recommend first using
pg_dump to export schema only.

Your functions and triggers would need to be rewritten, but assuming
they're in PL/pgSQL, it's a fairly trivial task to translate them into
PL/SQL.

As far as the views and sequences are concerned, pull them out of the
pg_dump export and re-run them in TOAD, SQL*Plus, or your favorite
tool.

As far as the type goes, I'm not quite sure what you're doing with it
or how it's used, but it should also be easy to migrate.

To copy the data and table definitions, I'd use a database link (on
the Oracle side) with hsodbc connecting to your PostgreSQL system via
ODBC.

Now that my advice is done with, could you explain why you need to
move to Oracle from PostgreSQL?

--
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/



--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox:http://br.mozdev.org/firefox/ ------=_Part_1679_872.1173468732402--