Showing posts with label moving sites. Show all posts
Showing posts with label moving sites. Show all posts

Tuesday, June 17, 2014

SharePoint 2013: Database Schema Version Issue using Move-SPSite

You may use Move-SPSite in SharePoint PowerShell to move site collections from one content database to another. However after applying updates and creating new content databases, when attempting to move a site collection, you may receive the following error:


Cannot complete the copy or merge operation because the database schema versions are different.
 
 
Sometimes you content databases do not get properly upgraded during the installation of a cumulative update or service pack. There is a quick an easy fix. Just use the Upgrade-SPContentDatabase cmdlet to update the content database:
 
 
Upgrade-SPContentDatabase -Identity <<content database name>>
 
 


Just for good measure, I usually run this cmdlet on all content databases - just in case. The system will let you know if the content database does not need to upgraded.

Once all databases are in sync, you may use the Move-SPSite as normal without any database schema errors!

 

Wednesday, March 20, 2013

SharePoint 2013: Moving a Site Collection to Its Own Content DB

I wanted to move a site collection to its own content DB and not have any other site collections added. This was for migration purposes but eventually the new content DB will be used for other sites.

The first step to create a new empty content database. Therefore from Central Admin, under Application Management, select Manage content databases in the Databases section:



On the Content Databases page, click on the Add a content database link:
 
 
 
 
On the New Content Database page, enter the new database name and click OK:





Back on the Content Databases screen, click the link of the new content database you created. The Manage Content Database Settings page appears. Change the Database status to Offline:
 
This is such that nobody can add new site collections and have them stored in your new content database. Click OK.

Next, on the server, open SharePoint 2013 Management Shell and issue the following statement:

          Move-SPSite <<http://server/sites/SiteCollection>> -DestinationDatabase <<NewContentDBName>>



 
Run IISReset per the message.
 
Refresh your Content Databases screen and you should see 1 site collection in your new content database, and 1 less in the original content database:




 

Matched Content