Search

Tablediff fails to identify offending column when the only difference is casing by Arnoud Berendsen

Closed
as Won't Fix Help for as Won't Fix

1
0
Sign in
to vote
Type: Bug
ID: 765802
Opened: 10/2/2012 3:03:17 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
The TableDiff utility fails to correctly identify the offending column in a mismatch on a varchar column when the only difference is in the casing of the string.

While Tablediff correctly identifies the primary key has a mismatch, the name of the column with the mismatch does not appear in the list of OffendingColumns. When there are no other offending columns, OffendingColumns is left NULL.

Details (expand)

Product Language

English

Version

SQL Server 2012 - Standard Edition

Category

Tools (SSMS, Agent, Profiler, Migration, etc.)

Operating System

Windows 7 (all editions)

Operating System Language

English

Steps to Reproduce

Step 1: Execute the following script and Tablediff statement

drop table dbo.Tablediff_src;
drop table dbo.Tablediff_dest;

-------------------------------------------------------------------------------
-- Source
-------------------------------------------------------------------------------
select *
into dbo.Tablediff_src
from (
values (1,'A',0),(2,'B',1)
) x (A,B,C)


-------------------------------------------------------------------------------
-- Destination
-------------------------------------------------------------------------------
select *
into dbo.Tablediff_dest
from (
values (1,'a',1),(2,'b',1)
) x (A,B,C)


alter table dbo.Tablediff_src add constraint Tablediff_src_pk primary key (A);
alter table dbo.Tablediff_dest add constraint Tablediff_dest_pk primary key (A);

--Now execute this TableDiff statement:
-- tablediff.exe -sourceserver .\SQL2012 -sourcedatabase TST1 -sourceschema dbo -sourcetable Tablediff_src -destinationserver .\SQL2012 -destinationdatabase TST1 -destinationschema dbo -destinationtable Tablediff_dest -c -et Tablediff_errors -dt

select * from dbo.Tablediff_errors

Actual Results

Column B is not identified as having a mismatch, because it is mismatched on casing.
The output of TableDiff states as follows:

Table [TST1].[dbo].[Tablediff_src] on .\SQL2012 and Table [TST1].[dbo].[Tablediff_dest] on .\SQL2012 have 2 differences.
Err             A     Col
Mismatch        1     C
Mismatch        2

Expected Results

Column B is correctly identified as having a mismatch.
The output of TableDiff should be as follows:

Table [TST1].[dbo].[Tablediff_src] on .\SQL2012 and Table [TST1].[dbo].[Tablediff_dest] on .\SQL2012 have 2 differences.
Err             A     Col
Mismatch        1     B,C
Mismatch        2     B

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 10/12/2012 at 11:34 AM
Hi Arnoud Berendsen ,

given my previous message, I'm archiving this work item for now.

Best regards
Jean-Yves Devant 
Program Manager Servicing and Lifecycle Experience of High Availability Technologies in SQL Server
Program Manager SQL Server Replication, Change Data Capture, Change Tracking
Posted by Microsoft on 10/8/2012 at 4:25 PM
Hi Arnoud Berendsen ,

thanks for taking the time to share your feedback, this is really important to us. We've looked into this. Although we would like to improve the product this way it does not meet the bar for now. We will revisit the decision if more customers vote for the issue.

Best regards
Jean-Yves Devant
Program Manager Servicing and Lifecycle Experience of High Availability Technologies in SQL Server Program Manager SQL Server Replication, Change Data Capture, Change Tracking
Posted by Microsoft on 10/8/2012 at 4:25 PM
Hi Arnoud Berendsen ,

thanks for taking the time to share your feedback, this is really important to us.
We've looked into this. Although we would like to improve the product this way it does not meet the bar for now. We will revisit the decision if more customers vote for the issue.


Best regards
Jean-Yves Devant 
Program Manager Servicing and Lifecycle Experience of High Availability Technologies in SQL Server
Program Manager SQL Server Replication, Change Data Capture, Change Tracking
Sign in to post a workaround.