ssis将数据从一个数据库移动到另一个数据库

编程入门 行业动态 更新时间:2024-10-23 23:26:24
本文介绍了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将数据从一个数据库移动到另一个数据库

本文发布于:2023-10-16 16:44:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1498150.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据库   数据   ssis

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!