SqlServer to Postgres DDL migration/conversion

断了今生、忘了曾经 提交于 2019-12-24 09:26:45

问题


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.


回答1:


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.




回答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.



来源:https://stackoverflow.com/questions/20745667/sqlserver-to-postgres-ddl-migration-conversion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!