Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to take a Microsoft SQL Server database backup (dump) file and import/restore into a PostgreSQL database. Does anybody have some sort of transform script (maybe a perl/sed/awk script) that could be run on the MSSQL Server backup file, so that it could be restored to the PostgreSQL database? Let's assume the tables have already been created in postgres, but they are all empty.

share|improve this question
add comment

2 Answers

I would start with this article from the Postgresql site

share|improve this answer
1  
We really do prefer that answers contain content not pointers to content. Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Iain Feb 8 '13 at 8:44
add comment

You could export data from MSSQL in CSV format (using MSSQL Enterprise Manager) and then import the CSV files into Postgresql (here there is an example). I suggest to export one CSV per table, so you can better manage any constraint rule.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.