同步框架与SQL Server 2008更改跟踪 [英] Sync framework with SQL Server 2008 Change Tracking

查看:129
本文介绍了同步框架与SQL Server 2008更改跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以使用Microsoft Sync Framework和SQL Server 2008更改跟踪机制来同步两个SQL Server 2008数据库(任何版本),而不是为数据库提供所需的架构更改(触发器,sps,辅助表)来进行跟踪变化吗?

Is there a way to synchronize two SQL Server 2008 databases(any edition) using Microsoft Sync Framework and SQL Server 2008 Change Tracking mechanism, instead of provisioning the databases with the required schema changes(triggers, sps, aux tables) to track changes?

有代码示例吗?

推荐答案

是的,这是可能的.使用Sql Express示例同步提供程序( http://archive.msdn .microsoft.com/sync/Release/ProjectReleases.aspx?ReleaseId = 1200 ). Microsoft不支持它,它使用Sync Framework 2.0技术而不是更新的2.1技术来进行协作同步.

Yes, this is possible. Use the Sql Express sample sync provider (http://archive.msdn.microsoft.com/sync/Release/ProjectReleases.aspx?ReleaseId=1200). It is not supported by Microsoft and it uses Sync Framework 2.0 techniques instead of the newer 2.1 techniques for collaborative sync.

在服务器上启用更改跟踪,在客户端上创建锚和GUID表.在同步代理中为每个表创建同步适配器,您将无法使用.您必须记住,sql express客户端提供程序在幕后使用了服务器提供程序,因此您需要在某些地方扭转这种想法(下载变为上载).

Enable change tracking on the server, create the anchor and guid table on the client. Create sync adapters per table in the sync agent and you're off. You have to keep in mind that the sql express client provider uses the server provider under the covers, so you need to reverse it's thinking in some places (download becomes upload).

这篇关于同步框架与SQL Server 2008更改跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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