SharePoint 2010 appears to continue SharePoint 2007's tradition of automatically creating horribly named SQL Databases. Like many companies we have multiple farms and developer workstations connecting to a central database server.

To make sure things don't become messy and difficult to manage, we prefer to use database names such as:

  • DEV_WS004_SharePoint_AdminContent
  • DEV_WS004_User Profile Service Application_ProfileDB

rather than:

  • SharePoint_AdminContent_9fc4ac7c-6895-4a74-bf10-df6ac4c2c1d6
  • User Profile Service Application_ProfileDB_a17efbf6942341f785c69829ce7f2d97

I am creating this question so we can create a central repository for renaming the various databases. I will try to find as many answers as possible myself, but would appreciate answers from the community as well.

At the moment the following databases have priority, but as we only have a limited set of services enabled I know there are many more.

  • SharePoint_AdminContent_[some guid]
  • Managed Metadata Service_[some guid]
  • Search_Service_Application_CrawlStoreDB_[some guid]
  • Search_Service_Application_DB_[some guid]
  • Search_Service_Application_PropertyStoreDB_[some guid]
  • User Profile Service Application_ProfileDB_[some guid]
  • User Profile Service Application_SocialDB_[some guid]
  • User Profile Service Application_SyncDB_[some guid]
  • WordAutomationServices_[some guid]
  • WSS_UsageApplication

Update: If you have multiple SharePoint 2010 farms connected to a single database server then you can see which databases belong to a farm on the following Central Administration screen: http://[Your CA Server]/_admin/DatabaseStatus.aspx. (CA / Upgrade and Migration / Review database status)

Update2: See this blog post on SharePoint 2010 Databases.

5 Answers 5


Hey there, so in my biased opinion, the best time to 'rename' a SharePoint database is before it's even created - in other words, you dictate the naming convention, not SharePoint's wizard. I've put together the AutoSPInstaller Powershell script to take care of this, and you can read about it on the 'Hey Scripting Guy' blog here.

Cheers Brian

  • I knew I was going to get this answer from at least one person, but for many people this will be too late as they will need to clean up someone else's environment without re-installing it. I haven't looked at your script yet, but I'll upvote it anyway as the idea is sound. Commented Apr 24, 2010 at 5:07
  • Is this the only / best publicly available SP2010 Auto Installer script or are there other, better, alternatives? Commented Apr 24, 2010 at 5:08
  • It has been a while, but I have started to use AutoSPInstaller. Although very light on documentation, it works well. My databases are now nicely organised. Marked as answer Commented Mar 14, 2011 at 17:05

To rename the SharePoint_AdminContent_[some guid] database the process is the same as under SharePoint 2007.

  1. Run as a user with the appropriate privileges to make these changes.

  2. stsadm.exe -o deletecontentdb -url http://[ca server]:[ca port] -databasename SharePoint_AdminContent_[some guid] -databaseserver [Your DB Server]

  3. Rename the database using a tool / script of your choice. We used SQL Management Studio. You may need to restart the SharePoint 2010 Timer service to make sure all connections to the DB are released or you will not be able to rename it.

  4. stsadm.exe -o addcontentdb -url http://[ca server]:[ca port] -databasename [Your new Database Name] -databaseserver [Your DB Server]


If you're stuck trying to rename databases such as that Search Administration DB that doesn't ask you what it wants to be called, the PowerShell instructions are here: http://technet.microsoft.com/en-nz/library/ff851878(en-us).aspx Note: some of the instructions here forget to tell you how to set the first Variable but easy to figure out.

If all else fails, another way to do this is the following:

  • Take a Backup of your farm using the SP Backup and Restore functionality
  • Delete the service application - e.g. Search Service Application
  • Check the Database status Screen to ensure the DB's are gone (http://[Your CA Server]/_admin/DatabaseStatus.aspx)
  • Restore the service application via Backup and Restore:
    • Choose the latest Backup
    • Select the Service to restore (not the whole farm - unless you want to)
    • Set Restore option to 'New Configuration'
    • Provide the new naming convention for each of the databases associated
    • Start Restore!
  • If you restore the Search Service Proxy, you man need to re-enable it in the Application Proxy Group under 'Service Application Associations'

Cheers, Dan


Microsoft has posted some guidance at http://technet.microsoft.com/en-us/library/ff851878.aspx It is helpful as it shows which methods can be used with which databases.


Nothing else required - except this.. by Toddklindt with screens.

  • Thanks, but that just appears to deal with the Admin Content DB. Commented Oct 11, 2010 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.