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

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).



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.

On Wed, 8 May 2024 at 10:20, <buggedme@riseup.net> wrote:
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).


On Wed, 2024-05-08 at 00:20 +0000, buggedme@riseup.net wrote:
> 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 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