为什么 Visual Studio 2010 中的架构比较显示差异,而实际上没有差异?

发布于 2024-08-31 01:09:22 字数 1003 浏览 3 评论 0原文

我本来希望Visual Studio 2010能够对Schema Comparison功能带来一些改进。我怀疑有一些,但我无法让一些基本的工作发挥作用。我从 SQL Server 2005 数据库中获取了一个架构。然后为了确保一切正常,我进行了模式比较,选择数据库作为源,我的模式项目作为目标。他们是同步的。当您过滤为仅查看“非跳过对象”时,不会列出任何对象。这告诉我模式确实匹配。

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

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.

此外,当我单击列为“不同定义”的对象并在“对象定义”窗口中查看这些对象的架构时,我无法辨别出不同定义之间的明显差异。显示在左窗格和右窗格中。请注意,我检查了架构比较选项,并且忽略了空格。

有什么想法吗?

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.

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.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

我很坚强 2024-09-07 01:09:22

它确实执行了一些非常晦涩的设置 - 我发现两个表的锁定升级设置不同。我只能通过 SSMS GUI 在表的属性中找到它。

我想它还会寻找其他同样晦涩难懂的设置......

It does comapre some VERY obscure settings - I found the Lock escalation setting was different for 2 tables. Which I only managed to find in the properties of the table though the SSMS GUI.

I would imagine there are other uqually obscure settings it looks for as well.....

追我者格杀勿论 2024-09-07 01:09:22

我在VS 2008中也遇到了类似的问题。问题的根源在于该项目被设置为SQL Server 2005项目,但目标服务器实际上是SQL Server 2008。

I had a similar issue in VS 2008. The route of the problem was that the project was set as a SQL Server 2005 project but the target server was actually SQL Server 2008.

酒绊 2024-09-07 01:09:22

我今天正在这样做,它并没有忽略制表符或回车之类的东西,即使忽略空白已打开。我将文本复制/粘贴到 winmerge,然后打开视图空白,我可以看到(据说是非空白)差异。

§¶

键码 alt-20 和 alt-21

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.

§¶

keycodes alt-20 and alt-21

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文