为什么在Visual Studio 2010中的Schema Compare在没有时显示差异? [英] Why does Schema Compare in Visual Studio 2010 show differences when there are none?

查看:301
本文介绍了为什么在Visual Studio 2010中的Schema Compare在没有时显示差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经希望Visual Studio 2010会对模式比较功能带来一些改进。我怀疑有一些,但我不能得到一些基本的工作。我从SQL Server 2005数据库中吸入了一个模式。然后为了确保事情正在工作,我做了一个模式比较选择数据库作为源和我的模式项目作为目标。他们在同步。当您过滤仅查看非跳过对象时,不会列出任何对象。这告诉我,这些模式确实匹配。

I had hoped that Visual Studio 2010 would have brought some improvements to the Schema Comparison function. I suspect there are some, but I can't get something basic working. I've sucked in a schema from a SQL Server 2005 database. Then to assure things were working, I did a schema compare choosing the database as the source and my schema project as the target. They were in synch. When you filter to view only "Non-skip Objects", no objects are listed. This tells me that the schemas do indeed match.

然后,一些模式更改被推送到数据库(外部 - 不通过Visual Studio)。我想捕获这些更改的结果,所以我做了另一个模式比较 - 再次选择数据库作为源和我的项目作为目标。它正确地发现了一些变化。但是,在我将更新写入我的项目并重做模式比较后,它仍然列出更改。我继续做模式比较和编写更新。它们似乎成功,但随后的模式比较总是列出看起来是相同的更改(就好像写失败)。但是,输出窗口只显示成功消息:

Then, some schema changes were pushed to the database (externally -- not through Visual Studio). I wanted to capture the result of those changes so I did another schema compare -- again choosing the database as the source and my project as the target. It correctly found a number of changes. However, after I "Write the Updates" to my project and redo the schema compare, it still lists changes. I keep doing schema comparisons and Writing the Updates. They appear to succeed but the subsequent schema compare always lists what appears to be the same changes (as if the Write failed). However, the output window shows nothing but success messages:

Target database synchronization has started.
Analyzing comparison results
Looking for modified catalog or server options
Finding dropped objects in the project system
Finding modified objects in the project system
Ready to process comparison results
Modifying scripts for objects that have changed or have been deleted
Adding new objects to the project system
Target schema was updated successfully. To compare the schema again, click Refresh.

此外,当我点击列为不同定义的对象并查看这些对象在对象定义窗口中,我可以看出在左窗格和右窗格中显示的内容之间没有可见的差异。请注意,我检查了我的模式比较选项,我忽略了空格。

What's more, when I click on objects that are listed as "Different Definition" and view the schema for these objects in the "Objects Definitions" window, I can discern no visible differences between what's shown in the left and right panes. Note that I checked my schema compare options and I am ignoring whitespace.

任何想法?

推荐答案

我今天这样做,它不会忽略的东西,如制表符或返回,即使忽略空格打开。我将文本复制/粘贴到winmerge,并打开视图空格,我可以看到(非空白据推测)差异。

I'm doing this today, and it's not ignoring things like tabs or returns, even though ignore whitespace is on. I copied/pasted the text to winmerge, and turned on view whitespaces and I can see the (non-whitespace supposedly) differences.

键码alt-20和alt-21

keycodes alt-20 and alt-21

这篇关于为什么在Visual Studio 2010中的Schema Compare在没有时显示差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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