Move one site collection from one web application to another

I know that reading the above you will say : backup and restore  or export and import .

Perfectly true.

What if the procedure involves moving one BIIIIIIG Site > 15 Gb?

If you have the time to do it, that’s perfect. Just schedule the operations and go ahead.

Here is a method that will save you some time in completing this operation:

Say you have the webapplication http://myportal

Your customers create their sites under http://myportal/customers/subportal

CustomerA  upgraded his contract , which entitles him to a full blown URL like http://MycustomerA  and you need to port his data from Http://myportal/customer/subportalA to http://mycustomerA



On the old webapplication:

Create a new content database My_CustomerA_DB

open a command prompt on the Sharepoint Server and navigate to

%COMMONPROGRAMFILES %\Microsoft Shared\web server extensions\12\BIN and run :

stsadm –o mergecontentdbs -url http://myportal/customers/subportal

   -sourcedatabasename WSSCOntentDB -destinationdatabasename My_CustomerA_DB

Mergecontentdbs- Stsadm operation (Office SharePoint Server)

After the operation completes, detach the My_CustomerA_DB from the old webapplication


If you have the infrastructure update installed (or later fixes) you don’t need to run the preparetomove command, see: Todd Carter's WebLog - PrepareToMove Away From Running This Command


Create a new webapplication for the Http://mycustomerA URL with a DefCOntentDB

Attach the My_CustomerA_DB to the new webapplication and remove the default DefContent DB





Under certain circumstances, the mergecontentdb Stsadm operation may fail. These circumstances include combinations of significant site collection size, user traffic, and SQL Server load. When the command fails, both the source and destination databases can be corrupted.

If you use mergecontentdb, make sure that you:

· Always back up both the source and target databases before using this operation.

· Set the site collection to be read-only before using mergecontentdb to move it.

· Refrain from cancelling the operation (either on the front-end Web server or the server running SQL Server).

· Run the command during off-peak hours, because mergecontentdb places significant additional load on the server running SQL Server.

Alternatively, consider using Batch Site Manager and the method described here . Because the Batch Site Manager works with site collections by using the Stsadm backup and restore operations with the –url parameter, we recommend that you not use Batch Site Manager for site collections larger than 15 GB.

The Batch Site Manager is included in the SharePoint Administration Toolkit:

· Microsoft SharePoint Administration Toolkit v3.0 x86

· Microsoft SharePoint Administration Toolkit v3.0 x64

Related KB: