Exception part way though uploading data

May 15, 2015 at 10:17 AM
Hi I am running the wizard to migrate a SQL database, all appears to go well with the first phase and the tables all get created however the following exception gets thrown part way though, it has already uploaded several tables and has sent in the region of 8G when this fails. does anyone have a point ast to what might be wrong ?

server is W2008 R2 standard and SQL is 2008 R2 .net 4.5.1 is loaded

regards

John

Description:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: sqlazuremw.exe
Problem Signature 02: 3.15.6.0
Problem Signature 03: 5540ff6a
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 53a12268
Problem Signature 07: 2d84
Problem Signature 08: 2e
Problem Signature 09: System.NotSupportedException
OS Version: 6.1.7601.2.1.0.272.7
Locale ID: 2057

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Coordinator
May 15, 2015 at 1:15 PM
Hi John,

This code won't run properly with SQL Server 2008 R2. You need at least SQL Server 2008 R2 SP1 (or greater). Can you apply SP1 and try again?

Thanks,
George
May 18, 2015 at 9:25 AM
Hi George

I have checked and the source server is at SP1 level (10.50.2550.0) the exception is thrown as the upload happens, the gather process finishes fine from what I can see, all the tables get created but the batch upload of the data is where it fails ?

Best regards

John
May 18, 2015 at 9:27 AM
Sorry to be clear its the upload of data to Azure where it stops.

John
Coordinator
May 18, 2015 at 2:24 PM
Hi John,

What kind of error are you getting?

Also, if you type in BCP /v from a command window, what version does it say BCP is? On my machine, it is this: Version: 10.50.1600.1.

Note that older versions of BCP will not work with SQLAzureMW because they did not have the -d option.

Thanks,
George
May 18, 2015 at 2:31 PM
Hi George

BCP /v gives 10.50.250.0.

I just get a unrecoverable exception raised, nothing else. if I do schema only then there is no problem, I am going to try doing the table data in batches to see if I can narrow it down to a table, I don't suppose there is a way I can easily limit the threads so it just process serially ?

Best regards

John
Coordinator
May 18, 2015 at 2:33 PM
Hi John,

Also, when running through SQLAzureMW I write out the BCP command, in the status windows, that uploads the data to Azure. You should be able to copy the BCP command and run it from a command window. That should give you the same error message and we can debug from there.

Thanks,
George
Coordinator
May 18, 2015 at 2:37 PM
Hi John,

Yes, you can limit the number of threads. Edit SQLAzureMW.exe.config file and look for:

<add key="NumberOfBCPThreads" value="8"/>

The default is 8 threads. Change that to 1 for a single thread.

Regards,
George

PS, if you want, we can take this offline and setup a conference call. We might be a little faster in resolving the issue.
May 18, 2015 at 2:49 PM
Hi George

Thanks for the help on this, I have set it running again (one thread mode) and I will grab the BCP command when it comes up, it uploads about 9G to Azure before it fails, so it will be a while before I can narrow down the one that is causing the problem, so it might be tomorrow (I am in the UK) before I can come back to you with more info, but I might take you up on the offer to go offline tomorrow if that is ok

Best regards

John
May 19, 2015 at 11:13 AM
Hi George

I have found the problem and kicking myself for not seeing it earlier, some of the table names although correct in SQL table syntax contain illegal file path characters, for example the bcp command for one is:-

bcp.exe "[EstateManage].[dbo].[ATP:Location]" out "f:\SQLAzureMW\BCPData\dbo.ATP:Location.dat" -E -n -C RAW -S localhost -t

note the : in the output path.

I am not sure how its got to do its export from the source as there is no file in the export directory, but I suspect the exception is getting thrown by bcp when it looks at the file path to find its wrong.

suspect the fix would be if the script could replace invalid file path characters, or in my case I could manually rename the source tables before the wizard runs and rename them back again once they have arrived in Azure.

Best regards

John Tankard
Coordinator
May 19, 2015 at 2:48 PM
Hi John,

Yea, the work around at this time would be to rename the table to remove the :. This should bet you up and running. In the meantime, I will modify my code to look for invalid characters for filenames and replace them with something else. So, in the next version, you won't have to do the work around.

Thanks for catching this.
George