Moving a SharePoint 2010 Content Database to a Different Drive


Let’s say you have a ContentDB that’s growing larger. I know, crazy idea right… Anyhow, the SQL server is running out of drive space. The solution is to move the ContentDB. There are two ways of going about this. One is to move to a new server instance. While this is a valid and supported solution it may not be the right one. Moving to a new instance has been well documented, so I’ll leave that alone for now. Also, if this is a common procedure in your environment you should be using a SQL Alias. Todd Carter’s post titled Don’t Tell SharePoint The Name of Your SQL Server is a great place to get up to speed on this topic.

The second solution is to move the database file to a new drive. Since all that’s needed is to detach and attach the database in the same instance, we don’t need to tell SharePoint to do anything differently. With that said there are a couple of tricks you can use to minimize downtime.

Start by moving only one ContentDB at a time. This will allow the other sites located in other ContentDBs to stay online. Also, setting the ContentDB to read-only and doing a copy backup users can still access the sites and data, but can’t write. This should help to insure data consistency during the move. Just be sure to remove the read-only attribute of the “copied” ContentDB before attaching. For more information see Moving User Databases.

Comments (2)

  1. Kapil says:

    We have for our client, Sharepoint Foundation 2010 with SQL Express installed locally. They have SQL standard edtion  installed on another server. As we are planning to upload thousands of documents, the content database will grow. I was wondering if I should only move the content database or move all the database to the new server. The database wss_content is expected to grow for at least 80gb.

    Below are the current databases and their size. The sql server running on Sharepoint server is SQL express with 10GB limit.

    Name                                                                              Size in MB

    —-                                                                                     ———-

    WSS_Content                                                                2966

    WSS_Search_<webappname>                                 384

    SharePoint_AdminContent_                                      101

    SharePoint_Config_                                                    56

    WSS_Logging                                                               46

    Bdc_Service_DB_                                                        6

  2. Mike Stevens says:

    @Kapil

    I suggest moving all of your databases to your SQL Server instance.  I don't recommend using SQL Express in any scenarios other than testing and development (i.e. not for production environments).

    You will also want to make note of the hardware recommendations for SQL Server in support of SharePoint 2010 found here:  technet.microsoft.com/…/cc288751(v=office.14).aspx

    Hopefully you initially installed your SharePoint farm as "Complete" and not "Standalone."  If you installed as "Standalone" (including a streamlined install of SQL Express), you will need to set up a new farm.  This means installing SharePoint 2010 again on at least one server or VM (selecting "Complete") using your SQL Standard instance and migrating your SQL content databases over to the new farm and its new web application(s):

    New Farm Install:  technet.microsoft.com/…/ee805948(v=office.14).aspx

    Upgrade and migration for SharePoint Server 2010:  technet.microsoft.com/…/ee517214

Skip to main content