ssis将数据从一个数据库移动到另一个数据库 [英] ssis moving data from one database to another database

查看:80
本文介绍了ssis将数据从一个数据库移动到另一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是SSIS的新手,我想将数据从一个数据库拉到另一个数据库.例如:我有表tb1,它有5行,并通过使用数据流掩码将表的副本移动到另一个数据库.如果稍后再插入第5行的第一个数据库,则运行数据流掩码目标数据库表,将添加插入的记录,但是现有的前5行正在复制.我的要求是在将前5行复制到新的数据库表中后,再添加第二5条记录,而不是复制前5条记录.

I am new to SSIS, I want to pull data from one database to another database. for example: I have table tb1 it has 5 rows and by using data flow mask move a copy of the table to another database. If first database is inserted with another 5 rows later I run the data flow mask destination database table the inserted record will be added but the existing first 5 rows are duplicating. My requirement is after first 5 rows are copied to new database table and later after adding second 5 records should be added instead of first 5 records duplicating.

谢谢

推荐答案

有两种方法可以解决此问题.最简单的方法是使用大负载.为此,您可以使用将截断目标表的执行SQL语句"任务来启动控制流(而非数据流).因此,每次运行包时,目标表都会被截断,最终您将加载源表中的所有内容.另一种方法是使用增量加载.在这里,您有很多可能性.查看此链接以了解更多详细信息在sis中增加负载的最佳方法

There are two ways to handle this. The easy way is to use bulk load. For this, you start your control flow (not data flow) with a Execute SQL Statement task that will truncate your destination table. So every time you run your package, the destination table will be truncated and you end up loading whatever in the source table. The other approach is to use incremental loading. Here you have many possibilities. Check out this link for more details Best way for incremental load in ssis

这篇关于ssis将数据从一个数据库移动到另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆