Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have web application on IIS7 with SQL server 2008 as RDBMS.

Need get 0 downtime during future upgrades of ASP.NET code and DB schema as well. I need to get right scenario for this.

I have 2 web servers and 2 sql servers and one http load balancer whcih allows to switch web backend server for web requests.

Main goal is to make 1st web server and DB server up and running, update code and db schema on 2nd server and then switch all the requests to 2nd server and then main problem - how to copy data from 1st database 2nd (which was changed during upgrade).

share|improve this question

This kinda depends on your definition of "Zero Downtime" -- A split->upgrade->fail-over->recovery scenario can be accomplished pretty easily by setting up replication between your two SQL servers, which also gives you the benefit of redundancy.
This works very similarly to what you describe above: When you do an upgrade you split your replication pair & upgrade one of them (along with a few app servers), switch the load to the upgraded set of machines, then upgrade the others and re-establish replication. The caveat is you will probably still need to stop accepting changes (inserts/updates) during the upgrade window (at least until the upgraded servers are running), otherwise you'll wind up with a split-brain scenario where you have changes on the "old" system that will be lost in the "new" one.

Depending on the kind of schema changes you're talking about & how well-written your application is you may be able to do some changes without downtime (adding new tables/views, adding a column, etc. can often be done without an outage, provided your app doesn't freak out when the number of columns in a table changes).

My suggestion to you is that you insist on an adequate maintenance windows for all changes/upgrades, to include outage time if necessary. Very few systems need to be truly 24x7x365, and if you wind up with an unexpected problem it's always better for the system to be offline with enough time for you to fix the problem or revert your changes than to be rushing through a fix with angry users breathing down your neck because they weren't expecting an outage...

share|improve this answer
Thank you for answer! My main problem that I really needs to accept changes (inserts/updates) during the upgrade window and I'm looking if it's possible in easy way. – eject May 14 '10 at 11:31
Sort answer: Probably not. Longer answer: It requires a multi-master database cluster, and even then certain schema changes still have the potential to break stuff, so taking the outage is significantly safer :) – voretaq7 May 14 '10 at 15:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.