How to List all SharePoint Databases

I know, I know…you’ve all been patiently waiting for the next SharePoint post from Darrel. Sorry to keep you waiting! Yes, I know…SharePoint is thrilling and I’m sure you’ve been wearing out your F5 key waiting for this post. (Why does SharePoint drive me to such thick, dripping sarcasm?)

Anyhow, here’s a quick tip that, as far as I can tell, hasn’t been posted in a findable blog post anywhere.

The scenario: You’ve spend months and months building out a few MOSS farms. In hindsight, you maybe didn’t always keep track of every single database that was created, and all those failed installs didn’t help either leaving behind all those oddly named config databases. Now your DBA is asking you a simple question: “Which databases belong to which farm?”.

Seems like a simple question. There must be a simple answer, right? Oh yea, this is SharePoint we’re talking about.

First, the hard way to find your databases:

  • Content DBs: These are actually listed quite nicely in central admin. At least they gave us that: APP MANAGEMENT >> CONTENT DATABASES >> select each WEB APP you want to see a list of content DBs for.
  • Config DBs: This one was tricky and took me a while. Turns out this info is in the registry. Sigh. REGEDIT >> HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDb
  • SSP Config and Search DB: This one was obvious in hindsight: Central Admin >> SHARED SERVICES ADMINISTRATION >> click the EDIT PROPERTIES drop down on the SSP you want to look at.

BUT…that’s still not all of the DBs. Specifically, the MOSS Help Search DB. Fortunately, after many Google searches and a few forum posts, Phread Langford gave me this great solution (and I slightly tweaked it):

Central Admin >> OPERATIONS >> PERFORM A BACKUP (which takes you to “/_admin/Backup.aspx”)

This page provides you a list of all items that are (or should be) backed up by MOSS. Lo and behold, there are ALL the databases listed! Alas, it also lists other things than the DBs, but it’s nice enough to tell you what each item is. Brilliant tip. Thanks, Phread!