如何管理和Azure上我的MVC2应用程序发布的数据库? [英] How do I manage and publish a database with my MVC2 application on Azure?

查看:137
本文介绍了如何管理和Azure上我的MVC2应用程序发布的数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会说,我是相当新的云部署应用程序的想法,但是我最近下载了Azure的SDK,并希望建立一个示例应用程序,让自己先进的速度。这里就是我所做的。

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. 下载SDK天青

  2. 创建一个新的解决方案

  3. 添加一个新的ASP.NET MVC2 Web角色

  4. 编译

  5. 调试

一切似乎当我在本地调试模式下工作得很好 - 我可以创建用户,登录,然后单击左右。当我部署我的解决方案,不过,我觉得该数据库是没有得到部署。据我所知,SQL Azure的从SQL防爆preSS的工作方式不同,所以我有几个问题。

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. 是随之而来的还有数据库中的ASP.NET MVC2 Web角色意味着部署Azure的?

  2. 我怎样才能得到我的数据库入云?

  3. 什么是管理我的架构和查找数据部署到Azure的SQL?
  4. 的最佳方法

这让我吃惊,而我正在寻找一个解决方案的一件事是,有没有财富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!

编辑:我理想的解决方案并不涉及打开SQL Server Management Studio中我想要部署每次汇出我的架构/数据的脚本。当然还有一个更好的方法比这个?

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?

推荐答案

我结束了做一些更多的研究和与同事讨论。我们得出的结论是有管理的数据库为一体的传统会没有很好的方法,但你可以遵循的流程概述如下。

I ended up doing some more research and discussing with coworkers. We came to the conclusion that there is no great way to manage databases as one traditionally would, but you can follow the process outlined below.


  • 使用SQL Server Management Studio中2008 R2连接到SQL Azure的

  • 使用构造在Visual Studio中正常的SQL Server数据库项目数据库

  • 要在数据库中导出到SQL Azure的...

    • 在SQL Azure数据库部署为一个新的数据库

    • 从旧数据库复制数据到新的数据库

    • 删除旧的数据库

    这是关于它的将是现在最好的。您也可以使用一个数据层应用,基本上做同样的事情。

    This is about the best it is going to be for now. You can alternatively use a Data Layer application, which essentially does the same thing.

    这篇关于如何管理和Azure上我的MVC2应用程序发布的数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆