Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pDNFV-0007ci-Jg for pgsql-admin@arkaria.postgresql.org; Thu, 05 Jan 2023 10:13:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pDNFU-0001zY-Gh for pgsql-admin@arkaria.postgresql.org; Thu, 05 Jan 2023 10:13:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pDNFU-0001zO-1s for pgsql-admin@lists.postgresql.org; Thu, 05 Jan 2023 10:13:24 +0000 Received: from 9.mo575.mail-out.ovh.net ([46.105.78.111]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pDNFQ-0003GI-VA for pgsql-admin@postgresql.org; Thu, 05 Jan 2023 10:13:22 +0000 Received: from director4.ghost.mail-out.ovh.net (unknown [10.109.156.34]) by mo575.mail-out.ovh.net (Postfix) with ESMTP id 7F17422448 for ; Thu, 5 Jan 2023 10:13:17 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-mgz66 (unknown [10.110.171.220]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 99A031FF99; Thu, 5 Jan 2023 10:13:16 +0000 (UTC) Received: from darold.net ([37.59.142.109]) by ghost-submission-6684bf9d7b-mgz66 with ESMTPSA id fomFIbyitmMEIAMAts80MA (envelope-from ); Thu, 05 Jan 2023 10:13:16 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-109S0033430a156-4063-4ef0-9879-d8166fc56bf9, 31EB1074289ABE60A197B25F051C045372DDA9C6) smtp.auth=gilles@darold.net X-OVh-ClientIp: 81.251.156.133 Content-Type: multipart/alternative; boundary="------------da2XKJuLjU6ZM3Tf50Ae82En" Message-ID: <7f8c93f4-1e3b-44a6-ef69-8a44cadfdd5d@darold.net> Date: Thu, 5 Jan 2023 11:13:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 To: Pascal CROZET , Datta D , "pgsql-admin@postgresql.org" References: Content-Language: en-US From: Gilles Darold Subject: Re: MSSQL to PostgreSQL Migration In-Reply-To: X-Ovh-Tracer-Id: 11726529008469515920 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrjeekgddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegtkfffgggfvfhfhffujgesrgdtreertdefjeenucfhrhhomhepifhilhhlvghsucffrghrohhlugcuoehgihhllhgvshesuggrrhholhgurdhnvghtqeenucggtffrrghtthgvrhhnpeejgedutefhtefhfedvffffudehfeffleetvedtleelfedvtedvhfeuteejieejtdenucffohhmrghinhepuggstghonhhvvghrthdrtghomhdpghhithhhuhgsrdgtohhmpdhmihhgohhpshdrtghomhenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehgihhllhgvshesuggrrhholhgurdhnvghtqedpnhgspghrtghpthhtohepuddprhgtphhtthhopehpghhsqhhlqdgrughmihhnsehpohhsthhgrhgvshhqlhdrohhrghdpoffvtefjohhsthepmhhoheejhedpmhhouggvpehsmhhtphhouhht List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------da2XKJuLjU6ZM3Tf50Ae82En Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 > , > 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 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/ --------------da2XKJuLjU6ZM3Tf50Ae82En Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
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, 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/
--------------da2XKJuLjU6ZM3Tf50Ae82En--