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:
SPS2010_Contoso_Intranet_Content SPS2010_Contoso_Intranet_ProjectService_Archive SPS2010_Contoso_Intranet_ProjectService_Content SPS2010_Contoso_Intranet_ProjectService_Draft SPS2010_Contoso_Intranet_ProjectService_Published SPS2010_Contoso_Intranet_ProjectService_Reporting SPS2010_Contoso_CentralAdministration_Content SPS2010_Contoso_Farm_BDCService SPS2010_Contoso_Farm_Config SPS2010_Contoso_Farm_ManagedMetadataService SPS2010_Contoso_Farm_PowerPointService SPS2010_Contoso_Farm_ProfileService_Profile SPS2010_Contoso_Farm_ProfileService_Social SPS2010_Contoso_Farm_ProfileService_Sync SPS2010_Contoso_Farm_StateService SPS2010_Contoso_Farm_SessionStateService SPS2010_Contoso_Farm_SecureStoreService SPS2010_Contoso_Sales_Content SPS2010_NorthWind_Farm_Config SPS2010_NorthWind_Intranet_Content
Now for some detail on each component of the naming standard.
Technology. Required. Must be one of the following:
Organization. Required. This is especially important when multiple organizations are on a shared infrastructure. Examples
Scope. Required. Typically farm or sub organization. Examples:
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: