SQL Differences pane - inconsistent results at first glance

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

SQL Differences pane - inconsistent results at first glance

Postby jela » Mon Feb 10, 2014 11:25 am

Hello Red Gate team,

earlier today I did a compare of two databases and wondered about the results shown in the SQL Differences pane. So for example in line 50 of the target table a column is listed, which is marked for dropping whereas it is also listed in the source table in line 53 (it's a bit hard to explain).

The Deployment Wizard does get it right, though. The deployment script does not show any changes for the column in question.

I noticed the 'Example: ignoring column order' entry stating that changes would still be highlighted (when ignoring the column order), even if the tables would be marked as identical. So I wondered, whether my 'problem' is really by design. But nevertheless it is confusing, if one is only looking for changes made in the source database and is shown more than the expected difference(s).

I couldn't find any options in 'Edit Project' settings, which seemed to change this behaviour. Is there something I missed or are there any plans to change the default behaviour?

Kind regards,
Jens
jela
 
Posts: 7
Joined: Wed Dec 04, 2013 1:18 pm

Postby Manfred.Castro » Wed Feb 12, 2014 6:46 pm

When SQL Compare compares a schema, a semantic comparison will be performed (top grid) which will group the objects based on the rules you have applied to the deployment and other basic functionally similar syntax that will automatically be ignored. It is these differences that will be deployed.

The other comparison is a straight textual comparison, that will be displayed in the bottom SQL Differences pane. All textual differences will be highlighted here. We can try match the rows as best we can, but each method will have its limitations and we don't think it would be right to reorder the SQL at this stage.

http://documentation.red-gate.com/displ ... different#

This is designed behavior and there are no plans to change the default behaviour.
Manfred Castro
Product Support
Red Gate Software
Manfred.Castro
 
Posts: 209
Joined: Mon Apr 23, 2012 2:49 pm

Postby jela » Thu Feb 13, 2014 9:38 am

Hello Mr. Castro,

I wasn't aware, that there alreday existed a documentation entry regarding the topic of this threat - thanks for pointing that out.

The way I read your reply and the documenattion entry, I would assume, that both comparisons (semantic and textual) are carried out during the comparison phase. Would it be possible to highlight semantic differences in another colour? That way there wouldn't be a need to reorder the SQL statements, but one would still be able to spot 'real' differences more easily.

Thanks for your help, it's much appreciated.

Kind regards,
Jens
jela
 
Posts: 7
Joined: Wed Dec 04, 2013 1:18 pm


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests