Move one site collection from one web application to another

Published 15 April 09 06:24 PM

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

 

Plan:

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

NOTE:

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

Go

 

YAN (YET ANOTHER NOTE) :

From:

http://blogs.msdn.com/sharepoint/archive/2009/03/24/possible-issue-with-mergecontentdb-stsadm-operation.aspx

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:

http://support.microsoft.com/kb/969242

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# umar said on November 13, 2009 2:04 PM:

Its a nice article ,  Liked it ,

Just followed all the instructions and it was great help . when i reattach my database with the new web app its says ready but number os sites is 0.

i try to attach the data base using stsadm and UI .every  time it says number of sites 0.

Will appreciate you help .

# Victor Butuza said on November 15, 2009 5:32 AM:

I would also consider attaching the database using stsadm -o addcontentdb operation.

I have once encountered the 0 sies behavior but could not figure out where the error lies as the sites were still in the database, but they wer not recoignized upon attach.

Checking tha shareepoint logs from the attach timeframe should reveal more.

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

This Blog

Syndication

Page view tracker