English 中文(简体)
数据库图
原标题:Azure seamless upgrade when database schema changes
  • 时间:2012-05-15 09:33:25
  •  标签:
  • azure

我要说的是,我利用自己的数据库(SQL)制作和进行部署。 如果构造的变化和生产需要部署,是否有实现生产数据库数据库数据库升级的确定方法(不停时间)?

e.g. 如果I swap VIP 停电;->,生产(同时,自动改变连接线扼杀了某些how)是将 s升数据库自动化的最佳过程。

我的想法是了解环境变化中的环境变化(尽管我不敢肯定VIP甚至连火焚烧了环境的作用环境Changinng),并在此时对照即将到来的数据库(即原封)操作script,然而,我需要确保该书只运行一次,而且有多个过渡情况。

最佳回答

So you have production deployment which has its own SQL Azure database and staging deployment which has its own SQL Azure database. In this situation both the application have their connection string pointing to two different databases.

你的第一项要求是,在你放弃部署或做一些事情时,改变飞行数据库图象,我对这一设计有以下关切:

  1. 如果你在“国家空间活动”行动中写出任何守则,那么就没有保证只有国家空间活动委员会才能这样做。 视几种情况而定,时间会多。

    1.1 In any situation you VM needs to be reimage by the system and this CODE will do the exactly same what it did during last reimage

    1.2 You might protect it to not happen at role start or VM start by some registry method of some external key but there is full proof mechanism that not to happen.

  2. 既然如此,我会建议你准备采用全部门办法。

    2.1. 2.1 将文字介绍到有关生产中 (这不会对下载产生影响,因为下载没有触及,但在更新你的数据库图象时,你可能更清楚地知道它如何影响你的申请)

    2.2 改变分阶段部署的配置,以达到生产标准(这根本不会有任何停产的生产应用)。

    2.3 部署的全系统计划(这也不会停用)

因此,即使你人工更新了行文ema,然后是全系统计划,但除非洲开发银行更新该表所需的时间外,部署时间没有显著下降。

问题回答

我一直在研究这方面的最佳做法,没有发现。 到目前为止,这是我所做的事:

  • Deploy to staging (Production is already running)
  • Copy app_offline.htm file to the web root on Production. This way I block users from using the application, thus blocking changes to the database. I am using only one instance.
  • Backup the database.
  • Run DDL, DML and SP scripts. This updates the production database to the latest schema.
  • Test application on Staging.
  • Swap VIP. This brings the application back online since the app_offline.htm file is not present on Staging (new Production).
  • If something goes wrong, swap VIP again, restore database and delete app_offline.htm.

采用这种办法 我有近5分钟的倒闭时间;我的数据库是小的,比等待瓦姆的建立和用户出现错误要好。





相关问题
Windows Azure WorkerRole response

I am working on an Azure demo to run Powershell in a worker role. In my web role I add the name of the Powershell script which is to be run to a CloudQueue object. I can print the script output to ...

Windows Azure WebRole stuck in a deployment loop

I ve been struggling with this one for a couple of days now. My current Windows Azure WebRole is stuck in a loop where the status keeps changing between Initializing, Busy, Stopping and Stopped. It ...

Getting a token for Windows Azure

We are looking at Windows Azure, but getting a token appears to be hard now, at least that s what I m seeing in web searches. Anyone tried it or know how to accelerate that process? Any idea how long ...

Developing Azure .Net 4.0 Applications

Presently .Net 4.0 is not supported on Azure. This thread indicates that you will not be able to use .Net 4.0 with VS 2010 until it is supported in the cloud. http://social.msdn.microsoft.com I d ...

.NET 4.0 on Windows Azure?

My google-fu is failing me on this one. As a possible solution to Unit Testing .NET 3.5 projects using MStest in VS2010 (but I ve put this in a seperate question because it s kind of unrelated): Is ...

热门标签