5

I have some data that is from a Postgres database dump (not csv or anything) and I am looking to get it into MS SQL. Is there an easy way to do this or a free tool that doesn't have limits on data import size etc?

The Postgres is on a Debian VM and I could export it to csv in there but I am new to Linux and don't know how I would transfer it from the VM to Win 7.

Thanks

4 Answers 4

1

On SQL Server you could use SSIS to parse the CSV files and load them into tables. If they are in the proper format to start with, you can use bulk import on the sql server side for fast load from a script.

That is about the best 2 says I can easily see ;)

1

A standard Postgresql dump is a text file with the SQL commands to create the tables and insert the data. But this is almost never fully compatible with other databases. If the schema is very small and simple, you could edit the dump, looking for the incompatible bits and replacing them for their MS SQL couterparts. Or, if you are just interested in the raw data, (and there are a few tables) you could re-dump as csv and try to import it.

See also: http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL

0

You could just FTP the CSV file over from the VM to windows. Besides, how are you going to get the Postgres data dump from the VM to windows?

To turn the dump into something that SSIS can parse, you could install a copy of Postgres on Windows (free, no data size limits) and export that to CSV, which SSIS will be able to parse.

0

My client requires an open-source DB solution, so I'm going the other way: SQL Server to PostgresSQL. However, I've found Ian Harding's article to be helpful in understanding the translation requirements between either databases.

Another resource to check is the Postgres application stack list, located here:

The list mostly offers frameworks, but also contains some import/export utilities to help you migrate a database.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .