Red Gate forums :: View topic - Problem with ForceBinaryCollation option
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare 10
SQL Data Compare 10 forum

Problem with ForceBinaryCollation option

Search in SQL Data Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
mmchenry



Joined: 17 Oct 2012
Posts: 6

PostPosted: Wed Oct 17, 2012 5:25 pm    Post subject: Problem with ForceBinaryCollation option Reply with quote

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?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1117
Location: My desk.

PostPosted: Wed Oct 17, 2012 7:14 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
mmchenry



Joined: 17 Oct 2012
Posts: 6

PostPosted: Wed Oct 17, 2012 10:49 pm    Post subject: Reply with quote

Thanks. I emailed the requested files with details of how to replicate the scenario.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1117
Location: My desk.

PostPosted: Fri Oct 19, 2012 8:29 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
mmchenry



Joined: 17 Oct 2012
Posts: 6

PostPosted: Fri Oct 19, 2012 3:46 pm    Post subject: Reply with quote

OK, I feel stupid now. Embarassed

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