SQLAzureMWBatchUpload cannot work against local SQL Server


I use SQL MW to download databazes from cloud locally from command line. When I try to use SQLAzureMWBatchUpload.exe in order to "upload" data to local SQL Server, I get the following error:
SQLAzureMWBatchUpload, Version
Unhandled Exception: System.Data.SqlClient.SqlException: Incorrect syntax near 'MAXSIZE'.
at SQLAzureMWUtils.TargetProcessor.CreateDatabase(TargetServerInfo targetServer, String collation, String edition, Int32 dbSize, Boolean bDropDatabaseIfExists)
at SQLAzureMWBatchUpload.Program.Process()
at SQLAzureMWBatchUpload.Program.Main(String[] args)
I've checked the source code and the problem is that command line utility doesn't allow to specify server type and uses the default SQLAzure value of enum ServerTypes. If this utility is used to upload data to local SQL Server and it is going to create new target database, it tries to attach MAXSIZE setting to the CREATE DATASE statement, which results in the mentioned error.
Is there possible to add one more command line argument (e.g. -Y) for setting target server type?
PS: I'v done the necessary modifications of the application in my local copy of source code myself (added -Y command line argument), but it would be better if this option is implemented in your release. Is there some way how to get this fix there or do I have to wait while it is implemented on your side?


ghuey wrote Aug 17, 2012 at 1:42 AM

Hi, sorry about that. I will put that on the top of my to do list and see if I can't get it fixed over the weekend.


ghuey wrote Aug 18, 2012 at 1:13 AM

Hi, I fixed the code (check out v3.9.2 or v4.0.5). Basically, I just check the server instance name for database.windows.net and if it didn't have that in the instance name, then it defaults to SQL Server. If SQL Database ever comes out with another naming convention, you can modify SQLAzureMWBatchUpload.exe.config file and put in the new extention.

Check it out and see if it works for you. If there is any issues, please let me know.

Thanks again,

tiny wrote Aug 18, 2012 at 8:16 AM

Hi, Thank you for quick response. I'll test it on Monday.


wrote Feb 21, 2013 at 11:59 PM