Subject: Need help migrating MSSQL2008R2 tables into PGSQL & make PGSQL mimic MSSQL behaviour.

From: [email-masked]
Date: Wed, 08 May 2024 00:20:17 +0000

I heard PGSQL can act like MSSQL behaviour so I'm trying to migrating
tables to try it myself, but I really 
have hard time to migrating them.

I already looked
https://wiki.postgresql.org/wiki/Microsoft_SQL_Server_to_PostgreSQL_Migration_by_Ian_Harding
but 
nothing is useful. For example, "Extension Links" section links are all
PAID links.

I have *.MDF and *.ldf MSSQL2008R2 DATA files.

Can anyone please give me a command to how to migrate those data? I do
not have MS' graphic studio GUI but I can 
access this database using "Navicat Lite"(IP:Port login).

---

From: Greenhorn <[email-masked]>
Date: Wed, 8 May 2024 11:20:05 +1000

How many tables do you have, and what are their sizes? I'm asking because
if you're considering migrating to PostgreSQL, starting from scratch might
be cleaner. This approach will also help you gain a deeper understanding of
how data types are handled in PostgreSQL compared to MSSQL.

---

From: Laurenz Albe <[email-masked]>
Date: Wed, 08 May 2024 16:55:18 +0200

On Wed, 2024-05-08 at 00:20 +0000, [email-masked] wrote:
> tables to try it myself, but I really have hard time to migrating them.

I think you have heard about Babelfish (https://babelfishpg.org/).
It is a modified version of PostgreSQL, written by Amazon, that provides
a TDS interface to PostgreSQL, so that a program written for Microsoft
SQL Server can connect to it.  It works up to a certain extent.
You could use it to migrate data to PostgreSQL, but you'd have to
continue to use Babelfish unless you change your application to speak
the PostgreSQL protocol.

There are other tools to migrate to PostgreSQL, for example
https://github.com/fljdin/mssql_migrator

Yours,
Laurenz Albe