共用方式為


SharePoint 2010 Database Naming Standards

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:

Technology_Organization_Scope_DatabaseType

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:

  • SPS2010 (SharePoint Server)
  • SPF2010 (SharePoint Foundation)

Organization. Required.  This is especially important when multiple organizations are on a shared infrastructure. Examples

  • Contoso
  • Northwind

Scope. Required. Typically farm or sub organization. Examples:

  • Farm (such as config database or default service application databases)
  • Sales
  • Marketing

Database TypeRequired.  Must be one of the following:

  • Config
  • Content
  • BDCService
  • ManagedMetadataService
  • PerformancePointService
  • ProfileService_Profile
  • ProfileService_Sync
  • ProfileService_Social
  • ProjectService_Content
  • ProjectService_Draft
  • ProjectService_Published
  • ProjectService_Archive
  • ProjectService_Reporting
  • SearchService
  • SearchService_Crawl
  • SearchService_Property
  • SecureStoreService
  • SessionStateService
  • StateService
  • SubscriptionSettings
  • UsageService
  • WebAnalyticsService_Staging
  • WebAnalyticsService_Reporting
  • WordAutomationService

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:

Comments

  • Anonymous
    November 20, 2010
    Good read; will start using this definitely

  • Anonymous
    November 24, 2010
    This is a very useful post. I always try to stick to some sort of a naming convention for my databases but your naming scheme is really well thought-out as it allows for easy and consistent naming across multiple farms and organizations. Thanks for sharing!


Sharepoint Resource Center sharepointresourcecenter.com

  • Anonymous
    December 30, 2010
    What about WSS_Logging... can this be renamed?

  • Anonymous
    January 26, 2011
    Awesome! Its definitely the way I think.

  • Anonymous
    September 17, 2013
    Avoid creating DB name like SPS2010_...  It is a bad practice to name your labels using product version. Why? because the version of the application keeps changing; couple of years from now you have to rename all those labels. Even if your site collection is using SPS 2010, I suggest you keep it simple, and prefix it with either SP_ or SharePoint_.

  • Anonymous
    November 26, 2013
    The comment has been removed

  • Anonymous
    January 23, 2014
    Good Article, i wanted to know how amny databases(DB's) get created when we install sharepoint form. i know Configdatabase and content database get created ,additional to this what other databases get created.