No search results when Database Status is offline

IMO, one of the dumbest (or most poorly worded, anyway) settings one can find in SharePoint is the “Database status” option on the “Manage Content Database Settings” Central Administration page.  This setting gives you two options: marking a database as “Ready” or “Offline.”

Given the wording, you might think that setting a database to “Offline” would take it, well, offline – preventing the database and its contents from being accessed, at least temporarily.

Except, not quite.  Take a look at the description of the setting on the left (emphasis mine):

Specify database connection settings for this content database. Use the Database status options to control whether or not new sites can be created in the database. When the database status is set to Ready, the database is available for hosting new sites. When the database status is set to Offline, no new sites can be created.

Setting the database to “Offline” doesn’t actually “Offline” the database, it only prevents new site collections from being added to it!  Existing site collections can continue to add, modify, or delete data from the database!  You cannot take the database offline in this manner, which makes the nomenclature being used hella confusing for anyone new to SharePoint.

Still, the setting is useful if you want to force a new site collection to be stored in a certain database: just set every database but the one you want the site collection to be stored in to “Offline” and the new database will be put in the correct location.  This was what I did recently to my SharePoint installation: one of our databases was growing to be too big, so I forced new site collections into a new database (yes, I know SharePoint is supposed to balance site collections and databases, but it’s not the best method either).

Then I started having issues with search.  In particular, sites stored in the “Offline” database started returning no results.  Sites in the new database had no problems.  It wasn’t until I thought to change the first database back to “Ready” that I got results again.  So, at least from what I’ve seen, it appears that the “Offline” setting works for some parts of SharePoint but not others.  Like I said, dumb.

Has this happened to anyone else or is it just me?