X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7FF87D1C514 for ; Thu, 7 Aug 2003 17:42:52 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 10943-02 for ; Thu, 7 Aug 2003 14:41:27 -0300 (ADT) Received: from smtp015.mail.yahoo.com (smtp015.mail.yahoo.com [216.136.173.59]) by svr1.postgresql.org (Postfix) with SMTP id 6035BD1C4E1 for ; Thu, 7 Aug 2003 14:42:41 -0300 (ADT) Received: from pcp04100620pcs.neave01.pa.comcast.net (HELO yahoo.com) (renneyt@68.81.196.130 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 7 Aug 2003 17:42:40 -0000 Message-ID: <3F328F8E.3020207@yahoo.com> Date: Thu, 07 Aug 2003 13:42:38 -0400 From: Renney Thomas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: pgsql-admin@postgresql.org Subject: Re: RE : Oracle to PostgreSQL References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/102 X-Sequence-Number: 9825 What are the legal implications of copying Oracle's own PL/SQL procedures code and porting them to PgSQL as you suggested? Bruno BAGUETTE wrote: >"Marco Roda" wrote .. > > >>Hi, >> >>I need to port data from an Oracle 8.0 base to PostgreSQL 7.2. I have >>scripts to create the base on Oracle and PostgreSQL (it is about 40 >>tables), but I need to port a great amount of data to PostgreSQL. >>Can anybody help me? >> >> > >I never see any documents about migrating from Oracle8 to PostgreSQL, >but I've already done this kind of migration, here's my warrior's way : > >- Make a SQL dump of the tables (structure + constraints + sequences + >data), and try to add this dump file into a PostgreSQL database (via >psql). You will probably need to do several search and replaces in the >SQL code in order to get it PostgreSQL compliant. But as PostgreSQL try >to follow the SQL norm, it shouldn't be very difficult. > >- The most difficult step is to migrate the stored procedures. The >biggest work is to put PL/SQL packages into PL/PGSQL functions >(Unfortunately, PostgreSQL don't manages PL/PGSQL packages, that's still >in the TODO list). So your packages functions contacts.add() (for >example) will have to be renamed to contacts_add(); and you will also >have to patch all the clients that have to access this database. > >This migration may be quite long, so leave the Oracle database running. >Keep a note of all the changes you've done to have your SQL dump valid >for PostgreSQL, and make a script (in Perl, PHP, or shell,...). When >everything is OK, stop writes to the Oracle DB (allows only select >queries), do the SQL dump (with the latests datas), execute your script >on the sql DUMP, do the migration and switch the users to the new >database. (Be sure to have the new clients ready before doing the big >jump). > >The job of migrating from Oracle to PostgreSQL is a serious job (and >sometimes difficult) but the migration wins are really interesting. > >I Hope this will help and that you will understand my english. :-) > >Regards, > > >