0

I want to migrate a PostgreSQL database to MS SQL Server. My PostgreSQL database is on SUSE Linux Enterprise Server 11 (x86_64).

I can backup PostgreSQL database using below command and it saves in .sql file. But I don't know how to restore this Database file into MS SQL Server.

/opt/netiq/idm/apps/postgresql/bin/pg_dump -U idmadmin idmuserappdb > /home/idmuserappdb.sql

So please help me to restore database of PostgreSQL into MS SQL Server.

I am using Microsoft SQL Server 2014 - 12.0.4100.1 (X64) and PostgreSQL 9.3.4

9
  • 1
    "how to restore this database file into MS SQL Server" - you can't. It's a SQL script that contains Postgres specific syntax. You would need to edit it in order to be able to run it against a SQL Server database. Commented Oct 23, 2017 at 12:38
  • @a_horse_with_no_name Which type of changes I have to do? Commented Oct 23, 2017 at 12:53
  • In short: a lot. Some things might not even be available in SQL Server e.g. boolean, json, interval, enums, arrays or indexes on expressions Commented Oct 23, 2017 at 12:57
  • @a_horse_with_no_name I also see stackoverflow.com/questions/6563846/… but I am not able to find solution for me. Commented Oct 23, 2017 at 13:03
  • @a_horse_with_no_name Is it possible to restore database into MS SQL Server via CSV file? Commented Oct 23, 2017 at 13:36

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.