Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq0Er-00041h-5X for pgsql-general@arkaria.postgresql.org; Wed, 15 Aug 2018 18:09:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fq0Ep-0005Q0-6Z for pgsql-general@arkaria.postgresql.org; Wed, 15 Aug 2018 18:09:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq0EP-0003GZ-RC for pgsql-general@lists.postgresql.org; Wed, 15 Aug 2018 18:09:18 +0000 Received: from lists.commandprompt.com ([69.168.55.30]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq0EL-0007Hy-SH for pgsql-general@lists.postgresql.org; Wed, 15 Aug 2018 18:09:15 +0000 Received: from [10.8.7.11] (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id AC2D9675; Wed, 15 Aug 2018 11:09:10 -0700 (PDT) Received: from cmdalert.com ([69.55.231.170] helo=[10.8.7.11]) by assp.commandprompt.com with SMTPSA(TLSv1_2 ECDHE-RSA-AES128-GCM-SHA256) (2.5.1); 15 Aug 2018 11:09:10 -0700 Subject: Re: moving data to from ms sql server via SSIS To: cosmin ioan , pgsql-general@lists.postgresql.org References: From: "Joshua D. Drake" Organization: Command Prompt, Inc. Message-ID: Date: Wed, 15 Aug 2018 11:09:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Assp-Version: 2.5.1(16177) on assp.commandprompt.com X-Assp-ID: assp.commandprompt.com m1-56550-01896 X-Assp-Session: 7FB128B78288 (mail 1) X-Assp-Original-Subject: Re: moving data to from ms sql server via SSIS X-Assp-Client-SSL: yes List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. *****