我是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将数据从一个数据库移动到另一个数据库
发布评论