Microsoft Sync Framework - 如何在架构更改后重新配置表(或整个范围)?
我已经设置了与 Microsoft Sync Framework 同步,现在我需要向表中添加字段。 如何重新配置数据库?
设置非常简单:
- 两台 SQL Express 2008 服务器
- 范围包括整个数据库
- 使用 Microsoft Sync Framework 2.0
- 通过直接访问进行同步。使用标准的新
SqlSyncProvider
我是否在两端进行结构更改?或者我是否只更改一台服务器并让 Sync Framework 以某种方式传播更改?
我是否需要删除_tracking
表和/或存储过程?触发器怎么样?
有人用过同步框架吗?请帮忙。
I have already setup syncing with Microsoft Sync Framework, and now I need to add fields to a table.
How do I re-provision the databases?
The setup is exceedingly simple:
- Two SQL Express 2008 servers
- The scope includes the entire database
- Using Microsoft Sync Framework 2.0
- Synchronizing by direct access. Using the standard new
SqlSyncProvider
Do I make the structural changes at both ends? Or do I only change one server and let Sync Framework somehow propagate the change?
Do I need to delete the _tracking
tables and/or the stored procedures? How about the triggers?
Has anyone been using the Sync Framework? Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
实际上,我在我的博客上发布了自己的答案 http://myazurejourney.blogspot.com/
它有一个几步,这绝对是一个黑客。但它有效。
一探究竟。告诉我你的想法
Actually, I posted my own answer on my blog http://myazurejourney.blogspot.com/
It has a few step, and it's definitely a hack. But it works.
check it out. tell me what you think
我使用了 Montago 的解决方案,但将其转换为 SQL 代码,这对我来说完成了这项工作。随意使用它,我希望它对您有所帮助:)
正如您所看到的,它会遍历所有表格并尝试查找同步痕迹。您只需更改数据库名称(第一行)。
另外,如果您希望删除的内容更安全,请使用以下代码查找表:
这只会查找实际正在同步的表
I've used Montago's solution, but converted it to SQL code which did the job for me. Be free to use it, I hope it helps you :)
This, as you can see goes through all the tables and try to find traces of syncing. You just need to change the database name (first line).
Also, if you want to be safer with what you delete, use this code to find tables:
This will only look for tables that are actually being synchronized
删除范围并重新配置...使用此代码删除范围
remove the scope and re-provision... use this code to remove a scope
您可以使用这个脚本:
You can use this script: