Pages

Tuesday, June 10, 2014

Importing Managed Metadata into the Term Store

If you need to move Managed Metadata Terms from one SharePoint Farm to another, then you can follow this article: http://blogs.msdn.com/b/taj/archive/2011/01/11/site-collection-backup-restore-and-managed-metadata.aspx

However, when I ran the Import-SPMetadataWebServicePartitionData PowerShell cmdlet, I encountered the following error message:

You do not have permission to use the bulk load statement.

Fortunately, I found this article, which deals with this issue: http://www.lucacostante.com/item/5-import-spmetadatawebservicepartitiondata-you-do-not-have-permission-to-use-the-bulk-load-statement.html

As it turns out, I needed to add the "bulkadmin" permission to the user in SQL Server that was assigned to the Managed Metadata database.


 
Once I did that, I was able to successfully run the import statement!
 
Below was the completed PowerShell statement that I used:
 
Add-PSSnapin Microsoft.SharePoint.PowerShell
 
 
Clear-Host
 
$mmsGuid = "cd373ccc-2a40-411f-b4ab-eecf249bdaa0"
$mmsApp = $mmsGuid;
$backupFile = "C:\root\MMS.bak";
$mmsProxy = Get-SPServiceApplicationProxy | Where-Object {$_.TypeName -like "Managed Metadata*"}
Import-SPMetadataWebServicePartitionData -Identity $mmsApp -ServiceProxy $mmsProxy -Path $backupFile -OverwriteExisting;

 

However, I did notice ONE MAJOR THING:

 

The import ONLY deals with Managed Metadata Global Terms.  Any locally created Managed Metadata Terms that were created WILL NOT BE IMPORTED.  I guess this needs to be handled separately (possibly through manually creating a CSV file and Importing the Term Set).


No comments:

Post a Comment