Term Stores in SharePoint 2010

Managed metadata is a hierarchical collection of centrally managed terms that you can define, and then use as attributes for items in Microsoft SharePoint Server 2010.

Terms and term sets

term is a word or a phrase that can be associated with an item in SharePoint Server 2010. Aterm set is a collection of related terms. You can specify that a Microsoft SharePoint Server column must contain a term from a specific term set. Managed metadata is a way of referring to the fact that terms and term sets can be created and managed independently from the columns themselves.

Local term sets are created within the context of a site collection. For example, if you add a column to a list in a document library, and create a new term set to bind the column to, the new term set is local to the site collection that contains the document library.

Global term sets are created outside the context of a site collection. For example, the term store administrator could create a term set group called “Human Resources” and designate a person to manage the term set group. The group manager would create term sets that relate to Human Resources, such as job titles and pay grades in the Human Resources term set group.

Users can see only global term sets and term sets that are local to the user’s site collection.

Issue

There is an interesting scenario or situation that would arise when we use the Global term sets.  In most of the enterprises, there would be a QA/Test SharePoint Farm and the Production farm.

All the development / content creation activities happen in the QA farm and then later would be pushed to the production farm for consumption.  In this scenario, there is no out of the box mechanism to push the term store from QA to production.  Even the content deployment will not help you here.

A site collection in the QA farm consumes the term store (Managed Metadata Service) of the QA farm.   When you create a column in a list of type Managed Metadata, then it consumes the local Managed Metadata Service to bring the terms.

Please note the special icon – for the Technology column.  You can explore the different term sets by clicking on this icon.

Once the item is saved to the list, SharePoint populate a hidden list with the item selected for the Technology column.  This list is called Taxonomy Hidden list and the URL to open the list ishttp://URL-of- the-site-collection/Lists/TaxonomyHiddenList/AllItems.aspx.

If you edit the item that gets created in the hidden list you see the following screen.

Internally we store the term using some unique ID’s and that’s the reason the term doesn’t resolve when the backup of the site collection is restored to a new farm.

If you take the backup of this and restore in the production, then the list columns which uses the term store will only show the data and you would not be in a position to edit it as the same term store is not available in the production farm.  The following screenshot shows this scenario.

The term ‘Search’ is in a disabled state and it shows the data as it is present in the taxonomy hidden list.

Resolution

The resolution to the above described problem is to export the Taxonomy term store from the source / QA farm and restore it in the destination.  Once it is restored, you have to link the column in the list to the restored term store through the List settings.

Export the MMS term store from the source and restore it in the destination.

===================================================================

#Export

$mmsApp = “4a867ce5-d9ee-4051-8e73-c5eca4158bcd”; # this sets the exporting MMS ID

MMsProxy=”GUID”   # this sets the exporting MMS Proxy ID

Export-SPMetadataWebServicePartitionData -Identity $mmsApp -ServiceProxy $mmsproxy -Path \\ServerName\Share\MMS.bak ;

#Import

$mms2 = “d045d3ce-e947-4465-b039-0dfbbe24fb22″   #this sets the importing MMS ID

$mms2proxy = “GUID”   # this sets the importing MMS Proxy ID

Import-SPMetadataWebServicePartitionData -Identity $mms2 -ServiceProxy $mms2proxy -path \\ServerName\Share\MMS.bak -OverwriteExisting;

Reference

To get the MMS ID run the Get-SPServiceApplication command

Example:

PS C:\> Get-SPServiceApplication

DisplayName          TypeName             Id

———–          ——–             –

Access Services      Access Services W… 9d4b0b22-d351-468a-8877-ec4682eba6e6

Secure Store Service Secure Store Serv… 75d4a963-9bdc-412c-a10c-b8089e958cee

State Service        State Service        8bf67a48-21db-4c5b-9fda-482a5b337849

PerformancePoint … PerformancePoint … 6571a4d0-68c2-439a-909c-c978ad3940ce

Visio Graphics Se… Visio Graphics Se… 0f4f3b22-f329-4132-839b-7dca8f162086

taxonomy         Managed Metadata … 4a867ce5-d9ee-4051-8e73-c5eca4158bcd

PS C:\> Get-SPServiceApplicationProxy  – To get the Proxy id for the MMS

===================================================================

Leave a comment