1

I've been attempting to use Visual Studio 2010 schema compare to take updates from a Dev database and move it to a UAT environment.

The compare itself works fine, but the tool continually orders the update scripts incorrectly.

It will try to update a stored procedure first, then the view that the procedure depends on. If my view includes new fields that the procedure depends on, then it will fail the update.

I've attempted to force the dependency to be recognised by qualifying all references to the dependent views with the schema name (essentially dbo.view rather than view), as suggested in http://msdn.microsoft.com/en-us/library/aa833294.aspx

Is there any way to force the scripts to a particular order (tables, views then sprocs), or is there a way to tell how and why the dependencies are calculated so I can see what's going wrong?

James Osborn
  • 1,275
  • 7
  • 12

1 Answers1

0

I don't think that either of the things I was hoping to do are possible.

What I have learnt is that the refresh on the schema compare doesn't always seem to recalculate dependencies correctly.

Closing it and starting a new one worked, just refreshing the original didn't.

James Osborn
  • 1,275
  • 7
  • 12