使用SSIS在两个数据库之间进行同步 [英] synchronization between two database using SSIS

查看:542
本文介绍了使用SSIS在两个数据库之间进行同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们.

我需要您的帮助才能在两个数据库之间同步数据.

我有两个数据库. D1和D2
我想将数据从D1同步到D2.我在两个数据库中都有一个结构相同的表,名为库存".我创建了一个SSIS包,但运行包数据时,数据已从D1.Inventory复制到D2.Inventory.

我希望它遵循以下方式.

1.应从D2.Inventory表中清除旧数据,并将所有数据从D1.Inventory复制到D2.inventory.



2.仅应更新我指定的那些数据(我不知道如何通过查询或使用日期过滤器的任何其他方式指定),因此只有所需的记录才从源表更新到目标表. [不知道有没有可能.]

如果上面有任何选择,请指导完成我的任务.任何可以帮助我的教程或参考链接.

谢谢
Imrankhan

Hi friends.

I need your help to synchronize data between two databases.

I have two database. D1 and D2
I want to synchronize data from D1 to D2. I have one table in same structure in both database named is "inventory". I create a SSIS package but when I run package data is copied from D1.Inventory to D2.Inventory.

I want it to be following way.

1. Old data should be cleared from D2.Inventory table and all data should be copied from D1.Inventory to D2.inventory.

OR

2. Only those data should be updated that I specify(I don''t know how do I specify by Query or any other way using date filters) so only needed records are updated from source table to destination table. [Don''t know is it possible or not].

If any options from above is possible, please guide to accomplish my task. Any tutorial or reference link that will help me out.

Thanks
Imrankhan

推荐答案

可以在将数据传输到其他数据库之前对其进行过滤.这是一个很好的分步示例的链接.
*数据流源是数据进入系统的方式.
*数据流转换使您能够以各种方式更改和操纵数据.数据流转换.
*数据流目标是可以发送转换后的数据的位置.流目的地.

http://www.accelebrate.com/sql_training/ssis_tutorial.htm [
You can filter data before you tranfer it to other database. Here is the link where there is an good step wise step example.
* Data Flow Sources are ways that data gets into the system.
* Data Flow Transformations let you alter and manipulate the data in various ways. data flow transformations.
* Data Flow Destinations are the places that you can send the transformed data. flow destinations.

http://www.accelebrate.com/sql_training/ssis_tutorial.htm[^]


这篇关于使用SSIS在两个数据库之间进行同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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