Red Gate forums :: View topic - Case Sebsitive Data Comparisons
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Toolkit Previous Versions
SQL Toolkit Previous Versions forum

Case Sebsitive Data Comparisons

Search in SQL Toolkit Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
airvine



Joined: 26 Mar 2007
Posts: 3

PostPosted: Fri Feb 08, 2008 7:39 pm    Post subject: Case Sebsitive Data Comparisons Reply with quote

I'm the writer/maintainer of a custom application our company uses to synchronize 4 versions of one of our larger databases. The app uses SQL Toolkit 5, and for the last year has been successfully used by our support personnel to perform thousands of maintenance operations.
Recently, a bug report appeared on my desk stating that a field in one of the tables being synchronized was not considered different by this application, even though there was a slight difference. The difference being that the field in the source database was the identical string to the destination database however the source database value had a capitalized first letter, and the destination database was all lowercase.
My company would like changes such as this to be discovered by the application and synchronized accordingly, however I am unable to find a property or comparison option that I can apply to the comparison session object that will ensure that case-sensitivity is enforced. Does such an option exist, or is there another method I can use to ensure that case changes are discovered as differences.

Thanks,

Al Irvine
Four Leaf Solutions Inc.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Sat Feb 09, 2008 11:34 pm    Post subject: Reply with quote

Hi Al,

That's a good question. If you're using v5 of the SQLDataCompare.Engine, it checks the column collation on the first database before performing a comparison of text fields. A case-sensitive column in database1 will cause SDC to compare case-sensitively, and a case-insensitive collation will cause it to compare without regard to case.

Typically, a case-sensitive collation will have a 'CS' in the collation name, and a 'CI' if it's case-insensitive.

If the collations are both CI, then you would need to change the column in the first database to be CS. If one is CI and the other CS, you can swap the first and second databases being compared and put the case-sensitive one as the first database.

The documentation says that you can't change a field collation in code (the property is read-only).
Back to top
View user's profile Send private message
airvine



Joined: 26 Mar 2007
Posts: 3

PostPosted: Mon Feb 11, 2008 2:19 pm    Post subject: Reply with quote

Hi Brian,

I wondered if the collation of the columns might be the culprit here. It seems I can pass this bug on to the DBAs.

Thanks for the quick reply.

Al Irvine
Four Leaf Solutions
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Mon Feb 11, 2008 2:28 pm    Post subject: Reply with quote

Hi Al,

FYI I believe SQL Toolkit v6 has an option to force a binary (case-sensitive) collation.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group