migrating from sql localdb to azure sql

May 4 at 7:42 PM
does this tool, or any other one, support migrating from the default sql localdb setups that vstudio 2013 project templates start you out with to an azure sql database setup necessary in order to deploy website/mobileservice/webrole?
Coordinator
May 5 at 2:20 PM
This tool will migrate a SQL Localdb to Azure SQL Database. Once migrated, any website / web roles / worker roles / IaaS vm / On Premise Apps will be able to access the Azure SQL Database if they have the username / password / IP Address allowed to access the DB.

I am not sure that I answered your question, so feel free to restate it if needed.

Regards,
George
May 5 at 4:19 PM
thanks for the response that helps.

when I try pointing to my "(LocalDb)\ProjectsV12" source it opens it successfully and I see the database [ / files ] I want to migrate to azure sql. When I run the wizard to product the migration script it contains the following error right at the top, is that expected and can it be ignored?

Using BCP to get data from table [dbo].[Customers]
bcp.exe "[CrmDbContext-20140325120101].[dbo].[Customers]" out "c:\SQLAzureMW\BCPData\dbo.Customers.dat" -E -n -C RAW -S (LocalDb)\ProjectsV12 -T
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at SQLAzureMWUtils.ScriptDatabase.DownloadTableData(String table, String bcpArgsOut, String file)
Coordinator
May 5 at 11:04 PM
Hi,

From looking at this, my first guess is that it can't find BCP. Out of curiosity, can you open up a command window and type in BCP /? and see what you get? You might have to find BCP on your machine and specify the full path in SQLAzureMW.exe.config (look for BCP.exe).

I tried this against my localDB and it works:

bcp.exe "[DevelopmentStorageDb22].[dbo].[Account]" out "c:\SQLAzureMW\BCPData\dbo.Account.dat" -E -n -C RAW -S (LocalDB)\v11.0 -T

Anyway, let me know if BCP is in your PATH or not.

Thanks,
George
May 6 at 4:11 PM
thanks for response.

you are correct the sql server path settings are not in my system path, i remove them so i only have default system path settings on my dev workstation.

i modified sqlazuremw.exe.config to contain the following fully qualified bcp.exe reference and after that things worked.
<add key="BCPExe" value="C:\Program Files\Microsoft SQL Server\110\Tools\Binn\bcp.exe"/>
Starting copy...
5 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 1 Average : (5000.00 rows per sec.)

BCP output file: "c:\SQLAzureMW\BCPData\dbo.Customers.dat"

Summary of BCP output commands
May 6 at 4:16 PM
just double checking,

is evolving and maintaining this tools support for migrating from localdb databases to azure sql databases high on your set of epic narrative priorities?

i ask because vstudio 2013 project templates all are setup now to start you out with use of sql12 (LocalDB)\v11.0 -> sql14 (LocalDB)\ProjectsV12 storage setups which you eventually need to migrate to azure sql in order to publish website/webrole in cloud and have it keep working.

for solutions using EF orm for sql/rdms interactions i was pointed to http://msdn.microsoft.com/pl-pl/data/jj591621.aspx article on code first migration support which it was suggested could cover this but i haven't been able to figure out how to make that work.
Coordinator
May 6 at 7:09 PM
Hi,

In truth, I never really thought much about localdb. I was more worried about SQL Server 2008 R2, SQL Server 2012, and working on SQL Server 2014. It was just that the SQL product has done a great job in making everything compatible that localdb just happens to work with SQLAzureMW. So, as long as the SQL product team keep everything compatible everything will be ok. If they create a one off that does not work with SQL Server SMO, then it won't work with SQLAzureMW either. For the most part, it was never my intention to replace any SQL tools, it was more or less to fill a gap until they could plug it.

Regards,
George