In a previous post I made a case for following a database naming standard for SharePoint databases. What started as an investigation into how to rename the auto-generated SharePoint 2010 databases led me down a path bordering obsession. I spent several weeks implementing a comprehensive collection of PowerShell scripts that automate upgrade from 2007 to 2010 using database attach, and rename the databases in the process. I will be sharing those scripts with the SharePoint community in the near future, but I in the mean time, I wanted to share the database naming standards that evolved from this effort.
It’s good to have a plan. Although my initial goal was to rename the databases with the GUIDs, I soon realized that I needed a naming standard so I knew what to rename the databases to. I wanted an approach that would accommodate multiple farms (2007 or 2010), multiple organizations, and enable you to easily identify what belongs to what. It was also important to me that the databases sorted nicely. After several iterations, here is the naming standard I arrived at:
Here are some examples:
Now for some detail on each component of the naming standard.
Technology. Required. Must be one of the following:
- SPS2010 (SharePoint Server)
- SPF2010 (SharePoint Foundation)
Organization. Required. This is especially important when multiple organizations are on a shared infrastructure. Examples
Scope. Required. Typically farm or sub organization. Examples:
- Farm (such as config database or default service application databases)
Database Type. Required. Must be one of the following:
If you are creating a new farm, it’s fairly easy to establish the standard up front. For most, however, the decision to implement a naming standard is made after the farm is created. Here’s some recommended reading on the topic of creating and renaming SharePoint databases: