Umlauts and Accentchars not shown correctly


As source database server we use SQL Server 2012, the destination database is Microsoft Azure SQL server.

In Version v3.9.14.1 all Chars are shown correctly after migration, now we used the v4.0.17.1 Version accentchars and umlauts are not shown correctly

Is there some encoding setting?


ghuey wrote Feb 19, 2014 at 1:23 AM


The only difference between v3.x and v4.x is SQL Server bits that I built on (and BCP). In this case, I am guessing that BCP is the issue. One interesting test would be to use v3.9.14.1 to migrate the schema and not the data and then just use v4.0.17.1 and migrate just the data. If your data is still missing the accentchars, then we know that it is BCP that is the issue. So, if you want (have time) to try that test, it might help point to the issue. Note that you can play with the code page and BCP parameters (look for key BCPArgsOut) in SQLAzureMW.exe.config file. If BCP is the issue, you can even specify the path to the BCP exec that you want to run in the config file.

Another thing that you can do is use SQLAzureMW v3 to generate script and save off the script and then use SQLAzureMW v4 to generate the script and then use WinDiff to compare and see if anything is different. They should be 100% the same. If not, then there would be a difference in SQL Server SMO since that is what I use to generate the TSQL.

Anyway, from my code base, there is no difference. You can play with the settings in the config file. And anything that you find out, let me know so that if there is a problem, I can 1) fix it if it is my code or 2) report it to the SQL Server team.


ksin wrote Feb 19, 2014 at 11:57 AM


I've just experienced the same thing.
Seems like the BCPARGS commands are missing the argument -C RAW.

I edited the command directly in the sql Query window in and that worked for me.
-- BCPArgs:1144:[dbo].[TABLE_NAME] in "c:\SQLAzureMW\BCPData\dbo.TABLE_NAME .dat" -E -n -b
change to:
-- BCPArgs:1144:[dbo].[TABLE_NAME] in "c:\SQLAzureMW\BCPData\dbo.TABLE_NAME .dat" -C RAW -E -n -b
If you edit the SQLAzureMW.exe.config file the values to look for and correct values(for me at least) is:
#<add key="BCPArgsIn" value="{0} in {1}  -C RAW -E -n -b 10000 -a 16384"/> 
 <!-- BCP in command parameters -->
 <add key="BCPArgsOut" value="&quot;{0}&quot; out {1} -E -n -C RAW"/> 
     <!-- BCP out command parameters -->

ghuey wrote Feb 19, 2014 at 2:04 PM

You are right. I don't have -C RAW on the BCPArgsIn. Srakel, try adding -C RAW to BCPArgsIn. Let me know there results.


srakel wrote Feb 20, 2014 at 7:12 AM

I will try it next time and keep the issue up to date. This may take 2 - 3 days

raphaelsamy wrote Mar 14, 2014 at 1:00 PM

So have you figured this out?

Im having the same problem, but in my case i suspect something else, because even using the same version 4.0.xxx

When i run in a personal computer, it worked fine, then i uploaded the Migration Wizard right into the database server and ran it from there, but there the accents got all screwd up.

Gonna try this -C RAW aproach again, i had tried this, but not in 2 lines of config, only in one i think.

ghuey wrote Mar 14, 2014 at 5:33 PM

Let me know when happened when you put -C RAW on both BCPArgsIn and BCPArgsOut in the config file. Note that in some cases this has worked for me where I do something like this:
<add key="BCPArgsIn" value="{0} in {1} -E -c -b 10000 -a 16384"/>
<add key="BCPArgsOut" value="&quot;{0}&quot; out {1} -E -c"/>
Note that I used -c for character type. You could also try -w for wide character type.

Note that you can also eliminate SQLAzureMW and just focus on BCP. Create a couple of BCP commands and try out different combinations until it works.


raphaelsamy wrote Mar 14, 2014 at 8:38 PM

So i got it working, but first let me say that my case was a little diferent:

I want to "migrate" OUT of Amazon RDS and there is no easier way them with this tool.

I got the sugestion from the coment and ADD the -C RAW as follow:

<add key="BCPArgsIn" value="{0} in {1} -C RAW -E -n -b 10000 -a 16384"/>

<!-- BCP in command parameters --> <add key="BCPArgsOut" value=""{0}" out {1} -E -n -C RAW"/>
 <!-- BCP out command parameters -->
Then the target database needed to be created with the exact same collation otherwise even with this -C RAW it gets screwd up.

And for last since my target was a normal sql server i mark in the advanced options "Overide do not perform any compatibility checks"

Dont know if all this steps were involved, but tested for 2 large databases that were not working and now got the data out fast and correct.

Thanks anyway