0

I am using Postgres db. I need to migrate this database to Microsoft SQL Server database. Is there any possible way?

1 Answer 1

1

Use this command:

pg_dump -U username your_db_name > db_backup.sql --column-inserts

The --column-inserts option generates INSERT statements possible for each row of data and should be compatible, but you may have to change the syntax just a little bit. (And it may cause data-loss, https://www.postgresql.org/docs/current/app-pgdump.html)

Then just simply open the .sql file and run it inside SqlServer

Sign up to request clarification or add additional context in comments.

2 Comments

There's also some tools out there: dbsofts.com/articles/postgresql_to_sql_server And I'd also suggest to check this answer from a similar question: stackoverflow.com/a/6567036/6104961
I tried that tool. But not working for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.