A SharePoint Database Naming Convention

I’m far from being a DBA, but when I (for some bizarre reason) log in to SQL Management Studio I like to see a nicely ordered set of databases.​ Aside from being slightly obsessive, there are two reasons for this.

  1. ​To group databases together by function, so they can be viewed in logical blocks.
  2. To remove GUIDs from database names, aiding readability and scripted administration.​
This table shows the convention that I use, which can be tweaked to fit in with an existing naming format.
 
Role Name Format​ ​Example(s)
​Configuration Database ​sp_config ​sp_config
​Content Database ​sp_content_<function> ​sp_content_admin

sp_content_portal
sp_content_mysites
​Single Database Service Application ​sp_service_<service application name> ​sp_service_mms
sp_service_state
​Multiple Database Service Application ​sp_service_<service application name>_<database name> ​sp_service_ups_profile​

Now for the good news. If you want to follow this convention, you’re going to have to use PowerShell for some of your installation.

I’m not going to go into that in this post, but a good place to start would be Todd Klindt’s blog (​@ToddKlindt​), where he goes through creating your farm​ (which works for both SP2010 and SP2013)​ and the SP2013 Search service application. These two elements are the key locations where its not possible to specify the names of all the databases created using the GUI.