How To Change the Name of a SharePoint 2007 Content Database

Recently I wanted to rename a few SharePoint content databases so that their names better reflected the sites and content that they held.  Below are the steps I took to accomplish this task.

Warning:  You are doing this at your own risk.  You should try this on a test server prior to attempting in your production environment.   Make sure you have a backup of your environment before proceeding.

  • Log into SharePoint Central Administration and go to the application management tab.
  • Select the content databases option under SharePoint Application Management heading.
  • Select the web application from the drop down list that is related to the content database.
  • Click on the name of the database you wish to rename.
  • From the Manage Content Database Settings page place a check in the remove content database box.   Note:  This will not delete your database, it only disconnects it from SharePoint.  Click ok to commit the changes.
  • Connect to the SQL Server that hosts the SharePoint databases.
  • To force all connections to drop I right click on the database and choose take offline.  This may take several minutes to complete.  
  • Once the database is offline, right click on it and choose to bring the database back online.
  • After the database is back online you can right click and choose rename.   Change the database to the new name.
  • Return back to the manage content database page in SharePoint Central administration.   Click on the add a content database button.
  • Fill in the database server name and the new database name o the add content database page.   Complete the rest of the fields according to your environment needs and then click ok.

Leave a Reply