Multiple databases for 1 Web Application

Sometimes I get the impression that a lot of people think you can only have 1 database for every Web Application. Well a lot of people (actually all of them that think that way) couldn't be more wrong than that. In the category people who do know this fact, most of them don't know how to control where to put Site Collections. Well, this post is all about that.

In your database you can place multiple Site Collections. So for your database a Site Collection is seen as "one item" (hence the Site Collection List in "Central Administration > Application Management"). This means you can make multiple databases, with one Site Collection in every database.
Why is this so interesting, well for example:

  • Performance
  • Backup / Recovery
  • Copying data to another farm (let's say to the staging environment)

How do you do it?

Well, when a Site Collection is created, MOSS Searches for the first available database.
When is a database available? A database is available when it's status is "Online".
You can change this status when going to "Central Administration > Application Management > Content Databases" and then clicking on the database of your choice.

AND HERE is the misunderstanding: When you set the status to "Offline" it does NOT mean the database is unavailable. It ONLY means than you cannot create new Site Collections (aka Top Level Sites).

So if you want to create a new database for 1 specific Site Collection, do this:

  1. Create a new content database
  2. Set the other databases all to status "Offline"
  3. Create your Site Collection (It will be put automatically in your fresh made database)
  4. Set that database to status "Offline" (This prevents other Site Collections to be made in this database)

Don't forget after doing this, that you at least have to set one database back online. Otherwise it won't be possible for new users to create their MySite. Since every Mysite is a Site Collection.

Today I installed a MOSS 2007 Farm for a customer and at the end we had 4 content databases. Three of them have now the status "Offline" and each has 1 Site Collection. The forth is reserved for the MySites and thus has status "Online"

Keep on spinning
Tom

One last personal thingy to finish this post: Next week Saturday I'm moving out of the parents house to go live in a roofapartment in the fantastic city of Ghent. So anyone who's strong is always welcome to help moving furniture and stuff Wink

 

 

 

Published Thursday, June 21, 2007 9:30 PM by Tom Vandaele

Comments

# re: Multiple databases for 1 Web Application

Thursday, June 21, 2007 1:36 PM by Bart Bultinck

nice post Tom ! and by the way congrats on the decision ! You don't want me having around to help moving as it will probably cost you by bringing all your stuff to some repairshop... catch ya laterz

//Bart

# A Sharepoint Legend : One Web Application = One Content Database

Tuesday, December 18, 2007 5:03 PM by Blog de Jérémie Clabaut (ak MinSou)

Today I heard from a "Sharepoint Expert" that we can create only one content database per web application on Sharepoint. From an expert, It makes me laugh Tom Vandaele explains (better than me ) on his blog why this assertion is false ! &#1

# Understanding IIS Web Site and SharePoint Web Application « Nishant Rana’s Weblog

Pingback from  Understanding IIS Web Site and SharePoint Web Application « Nishant Rana’s Weblog

Powered by Community Server (Commercial Edition), by Telligent Systems