Visual Studio 2010 DataCompare 表比较
在 Visual Studio 2010 中,您是否能够比较两个数据库之间的数据库数据。我想用它来将数据从一个数据库复制到另一个数据库。这些数据库具有完全相同的结构。但是当我进行比较时,我看到 VS2010 的 DataCompare 视图中只显示 65 个表,但数据库中有 66 个表。
下一步是找出哪张桌子没有出现。该表的名称是“CMS_PluginInstanceRouteParams”。该表也存在于我也检查过的两个数据库中。该表的结构为:
FK 与 CMS_PluginInstance 表的 PK 相关。 CMS_PluginInstance 确实显示在“数据比较”窗口中,并且数据也被比较和复制。
我也找不到可以输入一些要忽略的表名称的对话框或选项。
有谁知道为什么该表没有显示在数据比较窗口的表列表中以及为什么该表的数据没有被比较。
In Visual Studio 2010 do you have the ability to compare the data of a database between 2 databases. I wanted to use this to copy data from one database to another. These databases have the exact same structure. But when I do a compare I see only 65 tables showing up in de DataCompare view in VS2010 but I have 66 tables in the database.
The next step was to find out which table not was showing up. The name of this table is 'CMS_PluginInstanceRouteParams'. This table is also present in both databases which I also have checked. The structure of this table is:
The FK is a relation to the PK of the CMS_PluginInstance table. The CMS_PluginInstance does show up in the Data Comparison window and the data is also compared and copied.
I also couldn't find a dialog or option where I can enter some table names to ignore.
Does anyone of you know why this table is not showing up in the list of tables in the Data Comparison window and why the data of this table not is compared.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在 http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/d84a758e-79ea-4170-8807-7f8bdec98de1/:
表和视图必须满足两个条件才能出现在列表中:
首先,源数据库和目标数据库之间的对象架构必须匹配。
其次,只有具有主键或唯一键的表和视图才会出现在列表中。
I found the solution on http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/d84a758e-79ea-4170-8807-7f8bdec98de1/:
Tables and views must meet two criteria to appear in the listing:
First, the schemas of the objects must match between the source and target database.
Second, only tables and views that have a primary key or a unique key appear in the list.
VS2010的DataCompare工具仅比较具有唯一键的表。这个缺失的表很可能没有唯一键。至于传输数据,最好的选择是使用 SQL Server Management Studios 导入和导出工具。您应该可以轻松地在线查找指南。
The DataCompare tool of VS2010 only compares tables that have unique keys. It is most likely that this missing table does not have a unique key. As for transferring data the best bet would be to use SQL Server Management Studios Import and Export tools. You should have no trouble finding guides online.