Making database schema changes using Microsoft Sync framework without losing any tracking table data

前端 未结 2 1907
死守一世寂寞
死守一世寂寞 2021-02-11 07:43

I am using Microsoft Synch Service Framework 4.0 for synching Sql server Database tables with SqlLite Database on the Ipad side.

Before making any Database schema change

2条回答
  •  执笔经年
    2021-02-11 08:24

    the provisioning process should automatically populate the tracking table for you. you don't have to copy and reload them yourself.

    now if you think the tracking table is where the framework stores what was previously synched, the answer is no.

    the tracking table simply stores what was inserted/updated/deleted. it's used for change enumeration. the information on what was previously synched is stored in the scope_info table.

    when you deprovision, you wipe out this sync metadata. when you synch, its like the two replicas has never synched before. thus you will encounter conflicts as the framework tries to apply rows that already exists on the destination.

    you can find information here on how to "hack" the sync fx created objects to effect some types of schema changes.

    Modifying Sync Framework Scope Definition – Part 1 – Introduction

    Modifying Sync Framework Scope Definition – Part 2 – Workarounds

    Modifying Sync Framework Scope Definition – Part 3 – Workarounds – Adding/Removing Columns

    Modifying Sync Framework Scope Definition – Part 4 – Workarounds – Adding a Table to an existing scope

提交回复
热议问题