Question about SQL Compare

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

  • 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

  • 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 RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • I just installed Visual Studio 2010 and it has compare functionality built in. It is pretty nice.

  • 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 RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply