从SqlServer到Postgres DDL的迁移/转换 [英] SqlServer to Postgres DDL migration/conversion
问题描述
我们希望从MSSQL迁移到Postgres。我打算使用sql server bcp工具生成csv,然后使用批量复制功能将其导入到postgres中。但是,我们无法迁移DDL。我们已经。我已经通过手动按摩MMSQL生成的DDL使其工作了,但是我们需要自动化的东西,因为我们有一个移动的目标(仍在添加表,列等),并且将需要执行多次。
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.
推荐答案
最后决定使用 http://www.enterprisedb.com/products-services-training/products-overview/postgres-plus-solution-打包/迁移工具包。这是最彻底的,可以处理数据和ddl。转义反斜杠后跟数字存在一些问题,因为postgres认为这些是unicode转义序列。
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.
这篇关于从SqlServer到Postgres DDL的迁移/转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!