Saturday, May 9, 2015

SharePoint 2013: This content database has a schema version which is not supported in this farm.


You are attempting to migrate a content database from one farm to another.  You restore the content database in SQL Server and then attempt to mount the database to a web application on the destination farm.  When you execute Mount-SPContentDatabase, you see the following error appear in the shell:
Mount-SPContentDatabase :  This content database has a schema version which is not supported in this farm.
Checking ULS logs, you see messages like these:
Database '[content database]' on SQL Server instance '[name]' is not empty and does not match current database schema.
You then check the patch status on the destination farm, 15.0.4420.1017, and compare it with the patch status on the source farm, 15.0.4701.1001.

  • Upgrade the destination farm to at least the same patch level as the source farm.

  • In this case, the issue had nothing to do with permissions.
  • A similar issue occurs if you attempt to perform Restore-SPSite on the destination site in the destination farm, after using Backup-SPSite on the source farm.  If you attempt to restore a back up from a source site with a higher patch number than the destination site, you'll see this error:
    Restore-SPSite : <nativehr>0x80070003</nativehr><nativestack></nativestack>
    At line:1 char:1
    + Restore-SPSite "[URL of destination site]" -Path "[to backup file]"...
    + CategoryInfo          : InvalidData: (Microsoft.Share...dletRestoreSite:SPCmdletRestoreSite) [Restore-SPSite], D
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite
    which is unhelpful and even misleading; and then in the ULS log, you'll see something like this:
    Could not deserialize site from [path to backup file] . Microsoft.SharePoint.SPException: Schema version of backup 15.0.4711.1000 does not match current schema version 15.0.4420.1017     at Microsoft.SharePoint.SPSite.Restore(String filename, Boolean isADMode, Boolean& readOnlyMode, Boolean& hadWriteLock)
    Review this error message, the problem is immediately apparent.  The source farm in this case (different than the one discussed in the posting) is patched through April 2015 CU, while the destination farm is patched through March 2015 CU.  Again, its a situation of restoring a higher version backup to a lower version farm, and again the solution is simple: upgrade the destination farm to at least the same level as the source farm.

No comments: