Thursday, August 26, 2010

Moving site collections to new databases SharePoint 2010

On the SharePoint Server, open command prompt to hive.
Type Stsadm -o enumsites -url > .xml

I used this for example:
Stsadm -o enumsites -url http://sp-giga > c:\sites.xml

Edit the sites.xml file to remove all sites that you do NOT want to move to another content db.

Then once you have done that, save the file back to c:\sites.xml.
Type Stsadm -o mergecontentdbs -url -sourcedatabasename -destinationdatabasename -operation 3 -filename

For example:
Stsadm -o mergecontentdbs -url http://sp-giga -sourcedatabasename wss_content -destinationdatabasename wss_content_sc_IT -operation 3 -filename c:\sites.xml

Check to make sure the sites moved over in central admin, manage content databases

No comments: