Question

We're looking to migrate from MSSQL to Postgres. I'm intending on using sql servers bcp tool for generating csv that we'll import into postgres with the bulk copy features. We are however, having trouble getting the DDL migrated. We've. I've gotten it to work by massaging the DDL generated by MMSQL by hand but We need something automated since we have a moving target (still adding tables, columns etc.) and will need to do this more than once.

We're open to commercial and open source products but have not found anything that does everything we need: Tables, serial columns, indexes (unique, multi column etc), defaults and foreign key constraints.

Was it helpful?

Solution 2

Finally settled on using http://www.enterprisedb.com/products-services-training/products-overview/postgres-plus-solution-pack/migration-toolkit. It's the most thorough and does data and ddl. There have been some issues with escaping backslashes that are followed by numbers since postgres thinks these are unicode escape sequences.

OTHER TIPS

Check this link http://dbconvert.com/convert-mssql-to-postgre-pro.php?DB=6

Specifically look at the "SQL Azure to PostgreSQL" feature. Hopefully that will handle your table DDL.

NOTE: I have not used this just ran across it at http://www.postgresql.org/ in the latest news section a few days ago.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top