I am using Postgres db. I need to migrate this database to Microsoft SQL Server database. Is there any possible way?
1 Answer
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
2 Comments
rennf93
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
Amith Thillenkery
I tried that tool. But not working for me.