Common issues which arise when you use Import-SPMetadataWebServicePartitionData

Import-SPMetadataWebServicePartitionData is a Powershell command that is useful when moving an entire Term Store between environments. This may be between Dev / QA / Staging / Production environments, or between multiple farms in a distributed environment.

It is important to note that this is an “all or nothing” process. Importing will completely overwrite your existing term store, so proceed with caution and make sure you take good backups before you run this command.

ISSUE: You cannot find the ID of your MMS service application
This is needed to perform the export and import of your MMS data.
 
FIX #1:
Browse to your term store, and get the TCID parameter (GUID) from the query string in the page address.

FIX #2:
Use Powershell to find the correct value:

$taxonomySession = Get-SPTaxonomySession -site $taxonomySite
$termStore = $taxonomySession.TermStores[$termStoreName] 
$termStoreID = $termStore.ID

This can then be passed in as the -Identity parameter to Import-SPMetadataWebServicePartitionData

ISSUE: You do not have permission to use the bulk load statement

This is due to a missing permission on the MMS Service Application account, not the account running the Powershell script. In a least privilege set up, you will find that the BULK INSERT role is not configured for the user.

FIX: Add the BULK ADMIN role to the MMS Service Application account in SQL, either via Powershell or via the SQL Management Studio.

ISSUE: Cannot bulk load because the file “C:\99f6833d2bac4c53af26b816afca1d55\ECMGroup.dat” could not be opened

This is due to where the process is running, and affects environments where the SQL server and the SP server are on different machines. The Powershell command does some work on both the SP server *and* the SQL server, so both need to be able to use the file.

FIX: Create a shared location to store the CAB file on the SQL server, accessible by the SP server, and use this in your -Path parameter to the Powershell command.

ISSUE: Access denied

This is due to the user account that the MMS service application is running as not having permissions on the shared folder that the CAB file is stored in.

FIX: Ensure that the shared location is set to allow read AND write permissions for the MMS service account.

Hopefully this post will help other people debug what is happening when this step fails.

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: