views:

536

answers:

2

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?

+1  A: 

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

Sinister China Penguin
+1  A: 

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.

Phil