Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 804269FB8DF for ; Fri, 9 Mar 2007 14:32:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 90787-08 for ; Fri, 9 Mar 2007 14:32:21 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by postgresql.org (Postfix) with ESMTP id D55FD9FB85B for ; Fri, 9 Mar 2007 14:32:22 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id x4so1171652nfb for ; Fri, 09 Mar 2007 10:32:21 -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:content-transfer-encoding:content-disposition:references; b=afo9mU0l6wsexlxoFWo8tKZq0w2BBxf1+h8cwZBiPVBRFG5h4yX9atr+AeA4qQqw056k5nxnYq+mVZ0Xtx30XlLXLnK3ODVKxDHXY5ixyTVAp1BwlWnAhxrYZQiyEblD+ys3cFGumRpO5Sfq/aRM3D5EX2Xzkp1aoBedT7/U+fs= 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:content-transfer-encoding:content-disposition:references; b=g/C4/5rDAwxG91gyUy+SAotJiXhlmKoOMOJxnJuJCsq49KdFPUQDF/FJRnT61pbOiYN95heNj+Krfg6mYp15+QYMokmj6tKifvlaaga/MkXKCkt34pZGp7YcjdMQDo4gKNQfiUfS2TxLOGg2rHO1ne7r+yQO6VhNR5CMLr8coI8= Received: by 10.114.58.1 with SMTP id g1mr658654waa.1173465140582; Fri, 09 Mar 2007 10:32:20 -0800 (PST) Received: by 10.114.183.2 with HTTP; Fri, 9 Mar 2007 10:32:20 -0800 (PST) Message-ID: <36e682920703091032u22cd9901w6212c9aba999ec8c@mail.gmail.com> Date: Fri, 9 Mar 2007 13:32:20 -0500 From: "Jonah H. Harris" To: "Ezequias Rodrigues da Rocha" Subject: Re: [SQL] PostgreSQL to Oracle Cc: "pgsql general" , PostgreSQL In-Reply-To: <55c095e90703090954m74e2b06arf73e3037f25f5c18@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <55c095e90703090954m74e2b06arf73e3037f25f5c18@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/547 X-Sequence-Number: 110737 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/