pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gilles Darold <gilles@darold.net>
To: Pascal CROZET <pascal.crozet@metanext.com>
To: Datta D <dattadeshpande.it@gmail.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: MSSQL to PostgreSQL Migration
Date: Thu, 5 Jan 2023 11:13:15 +0100
Message-ID: <7f8c93f4-1e3b-44a6-ef69-8a44cadfdd5d@darold.net> (raw)
In-Reply-To: <PAXP251MB01780E200377F70691C9FE4898F79@PAXP251MB0178.EURP251.PROD.OUTLOOK.COM>
References: <CANhObs2JcdUmxm_gVEpqbCe76_v18R5JAEtTrU5B5wPCx4DNOg@mail.gmail.com>
	<PAXP251MB017829C6A15BA75A9033FD0E98F79@PAXP251MB0178.EURP251.PROD.OUTLOOK.COM>
	<PAXP251MB01780E200377F70691C9FE4898F79@PAXP251MB0178.EURP251.PROD.OUTLOOK.COM>

Le 02/01/2023 à 09:22, Pascal CROZET a écrit :
>
> Datta D.
>
> I’ve read MySql instead of MsSql :/ Sorry. I prefer to name it as 
> SqlServer, to avoid this issue.
>
> In this page 
> <https://dbconvert.com/blog/migrate-data-from-sql-server-to-postgresql/;, 
> you can found /pgloader or Sqlserver2pgsql/as open source tools
>

Actually, I need it for a customer migration at MigOps, so it does since 
few days:


commit 7d9796b2949982867925eaebaa112bf5520403d5
Merge: 4220916 c911903
Author: Gilles Darold <gilles@darold.net>
Date:   Tue Nov 29 21:11:58 2022 +0100

     Add SQL Server migration to Ora2Pg. Most of the SQL Server objects are
     supported as well as data export. Translation of the TSQL stored
     procedures to plpgsql is complicated because of the lack of statement
     separator in TSQL but as usual Ora2Pg is doing is best to do as much
     work as possible. Migration assessment is also possible with SQL Server
     database. There is some dedicated configuration directives added to
     ora2Pg.conf.


I have planned to publish a new release and an announcement this month. 
Note that it is a new feature that needs to be polished, your feed back 
will be welcome.


If you can't wait the new release you can download the development code 
using git or as an archive from 
https://github.com/darold/ora2pg/archive/refs/heads/master.zip

It just works like an Oracle migration, the most complicated thing is to 
connect Ora2Pg to the remote SQL Server database :-)

There is only 2 new configuration directive related to this RDBMS:


   Control SQL Server export behavior
     DROP_ROWVERSION
         PostgreSQL has no equivalent to rowversion datatype and feature, if
         you want to remove these useless columns, enable this directive.
         Columns of datatype 'rowversion' or 'timestamp' will not be
         exported.

     CASE_INSENSITIVE_SEARCH
         Emulate the same behavior of MSSQL with case insensitive search. If
         the value is citext it will use the citext data type instead of
         char/varchar/text in tables DDL (Ora2Pg will add a CHECK constraint
         for columns with a precision). Instead of citext you can also set a
         collation name that will be used in the columns definitions. To
         disable case insensitive search set it to: none.

Look at documentation (README) on how to migrate a SQL Server database 
with Ora2Pg.


Best regards,

-- 
Gilles Darold
MigOps Inc
http://www.migops.com/

view thread (12+ messages)  latest in thread

Message-ID: <7f8c93f4-1e3b-44a6-ef69-8a44cadfdd5d@darold.net>
Permalink:  ../7f8c93f4-1e3b-44a6-ef69-8a44cadfdd5d@darold.net/
Also on:    postgresql.org/message-id/7f8c93f4-1e3b-44a6-ef69-8a44cadfdd5d@darold.net

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: gilles@darold.net, pascal.crozet@metanext.com, dattadeshpande.it@gmail.com
  Subject: Re: MSSQL to PostgreSQL Migration
  In-Reply-To: <7f8c93f4-1e3b-44a6-ef69-8a44cadfdd5d@darold.net>

* 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