Problem with ForceBinaryCollation option

Compares and synchronizes SQL database content.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, Michelle Taylor, chengvoon.tong

Problem with ForceBinaryCollation option

Postby mmchenry » Wed Oct 17, 2012 5:25 pm

I'm having a problem using the ForceBinaryCollation option on the command line. I first had the problem in 9.0, but I upgraded to the latest v10.2.3.5 and the problem still exists.

I'm using a scripts folder source and a SQL2008 DB as the target. I want the data comparison to be case sensitive, so I've specified the ForceBinaryCollation option on the command line. When the ForceBinaryCollation option is used the comparison does not notice a new record in one of the tables that exists only in the source. It thinks the source and target are identical. If I remove the ForceBinaryCollation option, it sees the new record and syncs it to the target correctly.

Here's a sample of the command line I'm using:
sqldatacompare.exe /Scripts1:MyScriptsFolder /Server2:MyServer /Database2:MyDatabase /ScriptFile:MyScriptFile.sql /Force /Synchronize /Options:ForceBinaryCollation /Export:MyExportFolder

If I do the same comparison via the GUI, it always sees the new record in the source, regardless of whether I check the Force Binary Collation check box or not, which is what I would expect. I'm not sure why the command line is different.

Has anyone else seen this behavior? Am I doing something wrong or is this a bug?
mmchenry
 
Posts: 6
Joined: Wed Oct 17, 2012 4:15 pm

Postby james.billings » Wed Oct 17, 2012 7:14 pm

Hi,

I had a look through our bugtracker but I couldn't find the specific scenario you describe.

It may be a bug; would it be possible for you to send over both the create script for the table from the DB, along with the files relating to the same table from the Tables and Data folders in your scripts? I'd like to see if I get the same behaviour here, and if so, log a bug.

If you can send it to support@red-gate.com with F0065780 in the subject line, it would be great, thanks.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby mmchenry » Wed Oct 17, 2012 10:49 pm

Thanks. I emailed the requested files with details of how to replicate the scenario.
mmchenry
 
Posts: 6
Joined: Wed Oct 17, 2012 4:15 pm

Postby james.billings » Fri Oct 19, 2012 8:29 am

Cheers for that.

I initially got the same result, but it's not actually looking like a bug. When you specify anything in the "options" switch, it'll remove the default options we assume. So by specifying /options:forcebinarycollation, ALL other options were turned off. If you go into the GUI and de-select all the options asides from that one you get the same effect. I think the problem then occurs because the Identity PK is ignored (the GUI is more helpful in this point, explaining it cannot actually compare the table, as opposed to not finding a difference).

The solution is to ensure you specify default too, i.e.:

/options:default,forcebinarycollation
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby mmchenry » Fri Oct 19, 2012 3:46 pm

OK, I feel stupid now. :oops:

I see that in the documentation now. I'm not sure it's a typically expected behavior for command line tools, but I guess it's my bad for not reading more carefully.

Thanks for the help.
mmchenry
 
Posts: 6
Joined: Wed Oct 17, 2012 4:15 pm


Return to SQL Data Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests