Amith Thillenkery
Amith Thillenkery

Reputation: 81

Is there any possible way to convert PostgreSQL database to MS SQL Server?

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

Answers (1)

rennf93
rennf93

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

Related Questions