From: Joshua D. Drake <jd@commandprompt.com>
To: cosmin ioan <oracos@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: moving data to from ms sql server via SSIS
Date: Wed, 15 Aug 2018 11:09:10 -0700
Message-ID: <e6b8090e-8ac9-16ad-6148-589796add37e@commandprompt.com> (raw)
In-Reply-To: <CAOhwvrkc1coA_On5YTL=rjquXwNeSt5+A4D-HM6Sm-xBvqOybw@mail.gmail.com>
References: <CAOhwvrkc1coA_On5YTL=rjquXwNeSt5+A4D-HM6Sm-xBvqOybw@mail.gmail.com>
On 08/15/2018 11:03 AM, cosmin ioan wrote:
> hi folks,
> we're trying to phase out MS SQL Server and we're trying to understand
> the easiest way to move data from MS SQL Server to postgres, via SSIS,
> say via ODBC, OleDB or .Net drivers, and basically create new tables &
> move data, into the target postgres db. What drivers would be the
> best/most flexible?
>
> thanks much for any info or white papers on the topic,
A *lot* of this is: it depends
However, a pretty simple way is to use either FDWs from PostgreSQL or
linked tables in MSSQL. It would be easy enough for example to have
table ms.foo which has data and then table postgres.foo that is empty.
If ms.foo is linked (or and FDW table) you can use standard SQL to do
things like INSERT INTO (SELECT * FROM).
Of course if you can take the outage and you prep PostgreSQL
appropriately you could also just dump out to csv or tab delimited files
and load them with COPY.
JD
--
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
*** A fault and talent of mine is to tell it exactly how it is. ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
***** Unless otherwise stated, opinions are my own. *****
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: jd@commandprompt.com, oracos@gmail.com
Subject: Re: moving data to from ms sql server via SSIS
In-Reply-To: <e6b8090e-8ac9-16ad-6148-589796add37e@commandprompt.com>
References: <CAOhwvrkc1coA_On5YTL=rjquXwNeSt5+A4D-HM6Sm-xBvqOybw@mail.gmail.com> <e6b8090e-8ac9-16ad-6148-589796add37e@commandprompt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox