views:

38

answers:

3

I'll start by saying that I'm fairly new to the idea of deploying applications to the cloud, but I recently downloaded the Azure SDK and wanted to build a sample application to get myself up-to-speed. Here's what I did.

  1. Download the Azure SDK
  2. Create a new solution
  3. Add a new ASP.NET MVC2 Web Role
  4. Compile
  5. Debug

Everything seems to work just fine when I am in debug mode locally--I can create users, log in, and click around. When I deploy my solution, though, I feel like the database is not getting deployed. I understand that SQL Azure works differently from SQL Express, so I have a few questions.

  1. Is the ASP.NET MVC2 Web Role with its accompanying database meant for deployment to Azure?
  2. How can I get my database "into the cloud"?
  3. What is the best way to manage my schema and lookup data for deployment to SQL Azure?

One thing that struck me while I was searching for a solution is that there is not a wealth of good documentation for Azure--all of the tutorials I found are old or targeted at betas. Help!

Edit: The ideal solution to me does not involve opening SQL Server Management Studio to export my schema/data scripts every time I want to deploy. Surely there is a better way than this?

+1  A: 

Deploying to SQL Azure is no different than it would be when you are deploying to a separate SQL Server machine running SQL Server Standard or Enterprise edition. This is different from deploying to a web server that is also running SQL Server Express, that allows you to package an MDF file as part of the ASP.NET app, but that is by design. There are tools available, but you could also script the changes to the database (either by hand or automatically).

Another possible way of automating the deployment is by leveraging the SQL Azure migration wizard, but that will still require a bit of setting up (it is more geared towards 1-time-only migrations).

tijmenvdk
So should I actually create a new database project based on the schema of the MDF I currently have in the App_Data folder, and then deploy that project to SQL Azure using the connection string I have?
Ed Altorfer
Not sure if there is a built in deploy option if you do that, should be there if you use VS2010. However, this will not get the data in your SQL Azure instance, you would need to script that out separately.
tijmenvdk
I have been reading up on solutions to managing tables, and I do not see any that are particularly developer-friendly. You can not use a standard database project. Hmm...
Ed Altorfer