Why does Schema Compare in Visual Studio 2010 show differences when there are none?
Asked Answered
R

3

3

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?

Roguery answered 27/4, 2010 at 21:27 Comment(2)
I'd be curious to know if you ever manage to troubleshoot this issue successfully?Cocklebur
for some reason, I can't get it to compare and report differences in indexes! Yest I have turned "Ignore" off. Very strange that I cna't find anybody else with this issue.Degreeday
B
1

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.....

Blasien answered 30/6, 2010 at 10:6 Comment(0)
M
1

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.

Mala answered 10/9, 2010 at 20:27 Comment(0)
R
1

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

Rochette answered 16/6, 2011 at 16:41 Comment(1)
White space differences, such as between tabs and spaces, are still causing false positives in Visual Studio 2013's schema comparison tool. And yes, Ignore Whitespace is checked in the comparison options. Drilling down into the details, the schema comparison is only indicating differences with the body text (e.g.: white space differences). If I clear the Ignore Whitespace option, I get more differences, so that checkbox does something, but I don't know what.Intelligentsia

© 2022 - 2024 — McMap. All rights reserved.