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:
- 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:
- Create a new content database
- Set the other databases all to status "Offline"
- Create your Site Collection (It will be put automatically in your fresh made database)
- 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
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