在Sync中包含一个新表 [英] Include a new table to the Sync

查看:97
本文介绍了在Sync中包含一个新表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我已经在我的内部部署和云数据库[使用同步工具]之间建立了同步,并且我的应用程序需要创建一个新的数据库表,如何将新表添加到现有的同步?

Let's say I have established sync between my in-premise and the cloud database [using the sync tool] and my application demands creating a new database table, how do I add the new table to the exisiting Sync?

如果我将工具运行到"仅"包括创建的新表,它会提示我"DROP"。云数据库  - 有更好的解决方案吗?或者这是一个已知的问题? 

If I run the tool to "only" include the new table created, it prompts me to "DROP" the cloud database - is there a better solution? Or is this a known issue? 

推荐答案

您好,

从技术上讲,修改 不支持现有的范围。 通过apis你无法做到这一点。 如果要将表添加到现有同步范围,则必须使用SqlSyncTableProvisioning和
配置表,然后手动将表的xml配置添加到scope_config(这不容易构建,尽管您可以复制其他表的现有配置,并为新表填写正确的值。

Technically, modifying an existing scope is not supported.  This is no way through the apis you can do this.  If you want to add a table to an existing sync scope you'd have to provision the table using the SqlSyncTableProvisioning and then manually add the xml config for the table to the scope_config (which is not easy to construct, although you can copy the existing config for the other tables and fill in the correct values for the new table.

否则,您必须使用新表创建新范围。 该工具非常简单,UI不支持此功能,因此您可以看到删除提示。但是,同步配置类确实支持在Sql Server上配置多个范围,因此您可以考虑编写自己的配置应用程序。

Otherwise, you'd have to create a new scope with the new table.  The tool is very simple and the UI does not support this thus you see the drop prompt.  But the Sync provisioning classes do support provisioning multiple scopes on Sql Server so you can look into writing your own provisioning app.

-Jesse


这篇关于在Sync中包含一个新表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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