April 20, 2010 at 1:39 am
I often use SQL Compare to compare Views in a development database with a production database. When I'm ready to update a view in the production database I'll open the views in both databases by doing this ...
Script View As | Alter to | New Query Editor Window
... copy the code from the development View, paste it over the code in the Production view and execute.
Then, maybe after updating the views I'll use SQL Compare just to double check everything is now the same in both databases. But, sometimes, SQL Compare will flag a difference, like, in one database ...
CREATE VIEW [dbo].[vwCustDetails]
and in the other ...
CREATE VIEW dbo.vwCustDetails
despite the fact one view is an exact copy of the other. And, this doesn't happen on every view, just the odd one. Also you get odd things like a couple of extra lines of blank space appearing in one view which, again, is flagged as a difference and, again, despite the fact one view is an exact copy of the other.
Any ideas what is going on? Thanks for any help.
April 20, 2010 at 4:15 am
probably SQL compare is not intelligent enough and uses char by char comparison and hence you are getting a difference b/w
CREATE VIEW [dbo].[vwCustDetails]
and
CREATE VIEW dbo.vwCustDetails
April 20, 2010 at 6:41 am
There are options for the compare, such as "Ignore white space," that you may have unchecked (or checked, depending). I'd go there to see what the settings are.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 20, 2010 at 9:44 am
I just installed Visual Studio 2010 and it has compare functionality built in. It is pretty nice.
April 20, 2010 at 11:11 am
greggoble2 (4/20/2010)
I just installed Visual Studio 2010 and it has compare functionality built in. It is pretty nice.
It is decent and functional. I don't think it quite has all the bells & whistle's of Red Gate SQL Compare, but that's just my opinion.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply