开发者

books/links/samples on Microsoft Sync Framework for sqlite sync with sql 2008 [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

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

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 ext开发者_C百科ra 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.


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

Sync Services for SQL Server CE 3.5

MSDN - Change Tracking

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜