Sunday, December 27, 2009

SQL Azure Migration Wizard. BCP upload process failed: SQLState = 37000, NativeError = 40531

In SQL Azure the BACKUP and RESTORE functionality is not available. This makes it a little bit more complex to transfer existing data to the SQL Azure database. A way to upload data to SQL Azure is using BCP. The SQL Azure Migration Wizard makes use of BCP to upload your data. The SQL Azure Migration Wizard helps you migrate your local SQL Server 2005 / 2008 databases into SQL Azure. The wizard walks you through the selection of your SQL objects, creates SQL scripts suitable for SQL Azure, and allows you to migrate your data from:
  • SQL to SQL Azure
  • SQL Azure to SQL
  • SQL Azure to SQL Azure.

This tool can do a lot. A nice screen cast in which the author: George Huey explains what the tool can do can be found here:

I practise with this tool and could create the SQL objects, like tables very easy. The migration wizard can also check your scripts for compatibility issues with SQL Azure. However the upload of data always failed with next error message:

Process starting ...
-- Success: CREATE NONCLUSTERED INDEX [JournalStatusEntryGuid] ON [dbo].[amutak] ...
Uploading data to "Deltabike.dbo.amutak
Sorry, but BCP upload process failed:
SQLState = 37000, NativeError = 40531
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Server name cannot be determined. It must appear as the first segment of the server's dns name ( Some libraries do not send the server name, in which case the server name must be included as part of the user name (username@servername). In addition, if both formats are used, the server names must match.

This error can be solved if you specify also the servername after the login name. @
instead of only

Enjoy uploading your data to SQL Azure.


Anonymous said...

I want to thank the blogger very much not only for this post but also for his all previous efforts. I found to be very interesting. I will be coming back to for more information.

Anonymous said...

Hi there all, I just signed up on this incredible community forum and desired to say hey there! Have a extraordinary day!

Anonymous said...

hi everybody

just registered and put on my todo list

hopefully this is just what im looking for looks like i have a lot to read.