简体   繁体   English

数据传输到新的SQL Server数据库架构中

[英]Data Transfer Into New SQL Server Database Schema

Need to find the best way to transfer data from an existing SQL Server 2008 database into a new database schema. 需要找到将数据从现有SQL Server 2008数据库传输到新数据库架构的最佳方法。

For some tables the fields in the destination table and source table are lined up perfectly but in other cases a large table in the source is split up into smaller tables in the destination so we need to insert fields from the source table and then get the new key and insert it as a foreign key into other tables with fields from the source table. 对于某些表,目标表和源表中的字段完美对齐,但是在其他情况下,源中的大表被拆分为目标中的较小表,因此我们需要从源表中插入字段,然后获取新表键并将其作为外键插入到具有源表中字段的其他表中。

Not sure the best way to do this, looks like just a SQL script or an SSIS package but I am not sure an SSIS package can do this. 不确定执行此操作的最佳方法,看起来只是SQL脚本或SSIS程序包,但我不确定SSIS程序包可以执行此操作。

SSIS is an option. SSIS是一个选项。 You'll have to code the data transfers by hand (to get the order correct, to split up the tables that don't map directly), but it'll definitely work. 您必须手动编写数据传输代码(以正确确定顺序,以拆分不直接映射的表),但是绝对可以。 BIML might be able to give you a big bootstrap. BIML可能会给您带来很大的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM