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

International SharePoint Conference – London 2012

Often, developers new to SharePoint can get lost in the new world they encounter – with strange, obscure acronyms and terminology. There is a steep learning curve for developers and team leads starting their first development project in SharePoint.
 
At the International SharePoint Conference in London last week, the developers track did something different. We broke away from the traditional session based approach to concentrate creating a single solution on the SharePoint platform. We took input from the IT Pro and Business tracks and worked to explore challenges to building projects in SharePoint from the ground up. Concentrating on helping attendees with the choices that they will have to make when designing and building a solution, the conference aimed to give developers clear guidance on the important processes and decisions that make the difference between success and failure on SharePoint projects. We started with nothing but a list of requirements – to build a Knowledge Base solution – and ended the 3 days by publishing the solution on a live instance of Office 365.
 
Taking us out of the traditional 60 -75 minute time slot had its fair share of challenges. Would the attendees want to sit through 3 whole days on the same scenario? What would happen if the servers broke half way through the conference? How do you get a diverse group of MCAs, MCMs and MVPs to agree on anything? Looking at the reactions on Twitter and verbally at the conference, the new approach worked very well.
 
The 16 sessions covered topics such as customizing Visual Studio, the building blocks of the solution (web parts, branding, content types etc), packaging and deployment, advanced features (Managed Metadata, Business Connectivity Services, Search, Word Automation) and integration with cloud services (SQL Azure, Azure worker roles and Office 365).
 
The nine speakers (Andrew Connell, Ben Robb, Eric Shupps, Matthew McDermott, Mirjam van Olst, Paul Schaeflein, Todd Carter , Waldek Mastykarz  and Wictor Wilén), together with support from the ITPro track (especially Steve Smith and Spence Harbar) worked hard for nearly 6 months to bring this project to fruition, and announced the publication of the code base onto Codeplex at the conference. You can download the various projects which make up the solution here: http://spkbase.codeplex.com