Merge content databases (Office SharePoint Server 2007)
Applies To: Office SharePoint Server 2007
This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.
Topic Last Modified: 2009-04-17
You can merge content databases when a database is smaller than expected and it is convenient to combine several site collections into one database to help with load balancing.
Merge content databases
Use the following procedure to merge content databases that are associated with your site collections.
Important
We recommend that you install the April Cumulative Update before you merge content databases. This update fixes known issues with the Stsadm mergecontentdbs operation. For more information, see Deploy software updates for Office SharePoint Server 2007.
Before you use the mergecontentdbs operation within the Stsadm command-line tool, make sure that there is free space available on the hard disk that is equivalent to at least three times the size of the source site collection. To determine the size of your site collection, refer to the StorageUsedMB attribute of the enumsites operation. For more information, see Enumsites: Stsadm operation (Office SharePoint Server).
To complete the following procedure, you must be a member of both the Farm Administrators group and the Administrators group on the local computer. You must have Full Control permission for any site collection that needs to be moved. The account that you use to perform this procedure must be a member of the db_owner fixed database role in Microsoft SQL Server.
Merge two or more site collection databases
At a command prompt on the drive where SharePoint Products and Technologies is installed, change to the following directory:
%COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin
Type the following command, and then press ENTER:
Stsadm -o mergecontentdbs -url <URL> -sourcedatabasename <database name> -destinationdatabasename <database name> -operation 2where url is the address of the Web application that contains the site collections that you want to move; sourcedatabasename is the name of the first database that you want to merge; destinationdatabasename is the name of the second database that you want to merge; and operation 2 is the “Full Database Merge” operation.
For more information, see Mergecontentdbs: Stsadm operation (Office SharePoint Server).
Restart IIS by typing the following command, and then pressing ENTER:
iisreset /noforce
See Also
Concepts
Add, split, and merge content databases (Office SharePoint Server 2007)
Add a content database (Office SharePoint Server 2007)
Move site collections to a new database (split a content database) (Office SharePoint Server 2007)