I did a full backup from production. and kicked of a restore to a dev farm. Everything went smoothly except the managed metadata piece. How do I go by fixing this so I dont get this?

here is the error from the error log

[11/20/2012 11:12:22 AM] FatalError: Object Metadata Service Application failed in event OnPostRestore. For more information, see the spbackup.log or sprestore.log file located in the backup directory.
    InvalidCastException: Unable to cast object of type 'Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication' to type 'Microsoft.SharePoint.Administration.SPDatabaseServiceInstance'.
[11/20/2012 11:12:22 AM] Debug:    at Microsoft.SharePoint.Administration.SPDatabase.GenerateConnectionStringFromComponents()
   at Microsoft.SharePoint.Administration.SPDatabase.get_ConnectionString()
   at Microsoft.SharePoint.Administration.SPDatabase.get_DatabaseConnectionString()
   at Microsoft.SharePoint.Taxonomy.MetadataWebServiceDatabase.EnsureApplicationAccess(String userName)
   at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication.OnProcessIdentityChanged(SecurityIdentifier processSecurityIdentifier)
   at Microsoft.SharePoint.Administration.SPIisWebServiceApplication.SetAccessControl(SPIisWebServiceApplicationSecurity security)
   at Microsoft.SharePoint.Administration.SPServiceBackupRestoreUtilities.RestorePermissionsAcl(SPBackupRestoreInformation info, SPIisWebServiceApplication application)
   at Microsoft.SharePoint.Administration.SPIisWebServiceApplication.Microsoft.SharePoint.Administration.Backup.IBackupRestore.OnPostRestore(Object sender, SPRestoreInformation info)

Thanks Moe

  • Are you using an account that has permissive access to the new Managed Metadata Service Application in the database?
    – Mike
    Dec 7 '12 at 16:05
  • Did you backup and restore your MMS service application to the farm before restoring the site content? Dec 7 '12 at 16:06
  • I am using farm account who has permission to mms. I am using central admin restore. and I think the service db restore is after the content db restore. Dec 7 '12 at 16:24

On the MSDN blog of Tajeshwar Singh Site Collection Backup\Restore and Managed Metadata he describes how to ensure your term store is available to your site content after a restore is completed:

Wherever you restore the site collection, Managed Metadata Service should be available. Managed metadata columns consult the MMS service whenever we interact with data stored in these columns. If MMS is not there things can break and show unexpected behavior. The easiest option to make things work is to restore the termstore from source farm to target farm.

To do this via PowerShell:


$mmsApp = theSourceMMSGuid;

$mmsproxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "ExportTaxonomyProxyName"};

Export-SPMetadataWebServicePartitionData -Identity $mmsApp -ServiceProxy $mmsproxy -Path \\location\exportfile.bak;


$mms2 = theDestinationMMSGuid;

$mms2proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "ImportTaxonomyProxyName"};

Import-SPMetadataWebServicePartitionData -Identity $mms2 -ServiceProxy $mms2proxy -path \\location\exportfile.bak -OverwriteExisting;
  • I am not sure if this is the solution. I will mark it as answer for now and will come back. Dec 7 '12 at 16:56
  • The article is about a site collection restore, but the same applies to a farm restore. My colleague in the cubicle next to me was just working on the same issue last week. Dec 7 '12 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.