Microsoft Sync Framework 上的书籍/链接/示例,用于与 sql 2008 同步的 sqlite [英] books/links/samples on Microsoft Sync Framework for sqlite sync with sql 2008

查看:27
本文介绍了Microsoft Sync Framework 上的书籍/链接/示例,用于与 sql 2008 同步的 sqlite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Microsoft Sync Framework 的新手,并尝试将 sqlite db 与 sql server 2008 同步,因此我在以下网站上阅读了相关信息:

i'm new to Microsoft Sync Framework and trying to synchronise an sqlite db with sql server 2008 and so fare I read about it on the following websites:

http://sqlite.phxsoftware.com/forums/p/1381/6011.aspx

http://www.vitalygorn.com/blog/post/2008/01/Microsoft-Sync-Framework-Support-in-Visual-Studio-2008.aspx

http://www.codeproject.com/KB/smart/takedataoffline.aspx

在第一个链接中,有人创建了一个提供程序,它简单地用 sqlite 替换了 sqlce,它适用于 SyncGuru 的示例(最后一个链接),我尝试使用 SQL Server 2008 做类似的事情,据我所知不需要额外的列来跟踪更改.

in the first link someone created a provider that simply replaces the sqlce with sqlite and it works for the sample by SyncGuru (the last link), my attempt is to do a similar thing with SQL server 2008, which as I understand does not need extra columns for tracking changes.

虽然我希望它可以像 这个例子 似乎不是.任何提示/指导表示赞赏

Although I wish it could be as simple as in this example it appears not to be. Any hints/guidance is appreciated

更新:据我所知,不需要墓碑表、额外的列或触发器.

UPDATE: from what I heard there's no need for tombstone tables, extra columns or triggers.

推荐答案

以下是我尝试在 SQL 2008 和 SQL CE 之间设置同步时使用的一些链接.它并不是 SQLite 特有的,但它们可能会有所帮助.您的方案有点复杂,因为我认为他们没有可用于 SQLite 的同步提供程序(因此您必须自己编写).

Here are a few links I used when I was trying to set-up syncing between SQL 2008 and SQL CE. It's not really specific to SQLite but they might help. Your scenario is a bit more complex because I don't think they have a sync provider available for SQLite (so you have to write your own).

MSDN

SQL Server CE 3.5 同步服务

MSDN - 更改跟踪

SQL Server 2008 内置了对更改跟踪的支持,您只需要启用它(在数据库和表上).

SQL Server 2008 has built-in support for change tracking, you just need to enable it (on the database and on your tables).

ALTER DATABASE NameOfYourDatabase
SET CHANGE_TRACKING = ON
(CHANGE_RETENTION = 7 DAYS, AUTO_CLEANUP = ON);

IF NOT EXISTS (SELECT * FROM sys.change_tracking_tables WHERE object_id = OBJECT_ID(N'[dbo].[NameOfYourTable]')) 
ALTER TABLE [dbo].[NameOfYourTable] 
ENABLE  CHANGE_TRACKING

这篇关于Microsoft Sync Framework 上的书籍/链接/示例,用于与 sql 2008 同步的 sqlite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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