Skip site navigation (1) Skip section navigation (2)

Re: database conversion to postgres

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: KeithW(at)narrowpathinc(dot)com
Cc: Jeff Dyke <jeff(dot)dyke(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: database conversion to postgres
Date: 2005-05-19 15:27:12
Message-ID: d11a7957cfa2a60379bf8ed49be06795@mail.nih.gov (view raw or flat)
Thread:
Lists: pgsql-novice
On May 19, 2005, at 11:01 AM, Keith Worthington wrote:

> Jeff Dyke wrote:
>> I'm very new to postgres but not to databases. I'm currently working
>> on a back end platform of Adaptive Server Anywhere 9.0 (Sybase) and
>> would like to move to Postgres.  I have a total of 6 production
>> databases, so about 24(dev/test/qa etc) dbs that need to be converted
>> first, so I'll have plenty of practice for the prod versions. The
>> largest of which is ~6G, and the smallest only ~100M.
>> I've done some searching on and have not found anything quick and
>> easy, and didn't really expect to, but was interested in any pointers
>> anyone may have.
>> The dbs are currently on a windows platform and will remain so, at
>> least for this first conversion.
>> I don't mind doing it programatically and that may be my only
>> choice...PHP/Perl.   Currently i connect to sybase solely over
>> odbc....anyway.  Any/all comments and welcomed and appreciated.
>> Thanks
>> Jeff
>
> Jeff,
>
> I am not familiar with the utilities that you may have with Sybase.  
> Do you have one that will output the SQL statements required to build 
> the database?  If so then you could use that file as input to psql to 
> rebuild the database in PostgreSQL.  Of course it will probably choke 
> but reviewing the error log would point you in the direction of the 
> required changes.  A good scrub with an editor like sed or Perl may 
> clean up a number of common changes.

There is also SQL::Translator, a set of perl modules for doing these 
types of conversions.  It isn't perfect, but does reduce the 
grunt-work.

Sean


In response to

pgsql-novice by date

Next:From: operationsengineer1Date: 2005-05-19 15:35:58
Subject: Revision Data Type
Previous:From: Keith WorthingtonDate: 2005-05-19 15:01:45
Subject: Re: database conversion to postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group