Re: pumping data: mssql->pgsql

From: Gary Jarrel (garyjarre..mail.com)
Date: Wed Feb 15 2006 - 23:05:14 EST

  • Next message: Andrus Adamchik: "Re: Event Listeners"

    I've worked in similar situations and could never come up with an
    automated way to do it. The easiest thing that I've done so far was to
    reverse engineer a database into a modelling tool such as Datanamic
    for example (non-free) change from MySQL to SQL Server, update any
    field types if necessary when the tool couldn't do a conversion
    automatically. Then generate the schema in the destination database
    specific syntax. Create the database, and then write code to transfer
    data, from one DB to another. When writing the code I was then faced
    with the issue of having to transfer data in the correct order, so
    that Foreign Key constraints aren't violated (i.e. join tables)

    Anyway, that's my 5 cents.

    Gary

    On 2/16/06, Matt <mat..ogicsquad.net> wrote:
    >
    > Tomi NA wrote:
    > > On 2/16/06, Matt <mat..ogicsquad.net> wrote:
    > >>
    > >>
    > >> Tomi NA wrote:
    > >> > I'd like to transfer table structure and _data_ from a source mssql
    > >> > database
    > >> > to a postgresql database.
    > >> > Has anyone here tried something like this? I have a feeling parts of
    > >> > cayenne
    > >> > code might be of help, but it's hard to think clearly after straight
    > >> 16
    > >> > hours of staring at the screen...any suggestions would be very
    > >> welcome.
    > >> >
    > >>
    > >> Hello,
    > >>
    > >> have you considered just dumping the structure and data, and inserting
    > >> it
    > >> into postgres, outside of cayenne?
    > >>
    > >> # mysqldump -u username -p password database_name > file.sql
    > >>
    > >> edit out you mysql badness
    > >>
    > >> # psql -d myDataBase (-a) -f file.sql
    > >>
    > >
    > > That's the problem with names like mssql and mysql: they get mixed up
    > > really
    > > easily. Who ever came up with a name like SQL Server for RDBMS?!
    > > Anyway, there's no simple way to dump structure and data from a MSSQL
    > > database...well, actually, there is, but I have a 50MB script on my hands
    > > now, which is very hard to work with (modify the syntax so that pgsql
    > > doesn't complain about it)...and that still doesn't adress the finer
    > > aspects
    > > of the transition (object name case management, for one).
    > >
    > > Tomislav
    >
    > Aah.. my apologies!
    >
    > Matt
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Feb 15 2006 - 23:05:16 EST