Reputation: 81
I am using Postgres db. I need to migrate this database to Microsoft SQL Server database. Is there any possible way?
Upvotes: 0
Views: 1559
Reputation: 61
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
Upvotes: 1