Re: Migration from M$ SQL - Mailing list pgsql-admin

From Robert Treat
Subject Re: Migration from M$ SQL
Date
Msg-id 1073339014.13729.7611.camel@camel
Whole thread Raw
In response to Migration from M$ SQL  ("Amitava Roy" <amitavroy@rediffmail.com>)
List pgsql-admin
On Mon, 2004-01-05 at 05:47, Amitava Roy wrote:
> Hi All,
>
> In our company we are planning for a migration from an
> MS SQL/NT to PostgreSQL/Linux. The current database contains
> mainly SQL standard data types(though a few user defined data types
> may be there), is using Triggers and Stored procedures.
> I have already seen the migration howtos available at the PostgreSQL
> site. I have some questions to be cleared before we really start a
> Pilot project for the planned migration:
> 1. How do we efficiently migrate data from MS to Pg? Is CSV good enough?
>   The existing database size is around 25 GB.

CSV is probably good enough; dump the files to CSV from M$ then use
PostgreSQL's COPY feature to copy the data into the requisite tables. It
will certainly take some time to move that much data, and I'd recommend
testing it first to make sure you don't have any "anomalies".

> 2. Is there a systematic/regular mapping of SQL Scripts for MS to that
>   for Pg? In other words, is it possible to come up with say, sed
>   scripts, which would convert an MS Stored Procedure/Trigger to that
>   in Pg?

I'd be very surprised if there were. AFAIK the syntax between m$ and
postgresql pl's isn't terribly compatible, and I think there are quirks
in how the two implementations actually work, so you'll want to test
this as well.

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


pgsql-admin by date:

Previous
From: Ray Ontko
Date:
Subject: Re: Incremental clustering?
Next
From: Tsirkin Evgeny
Date:
Subject: Re: postgresql crushed with XLogWrite error