Wednesday, July 8, 2015

SharePoint 2013 .... oh you naughty Managed Metadata Service.

The Managed Metadata Service or Connection is currently not available


So there everyone was using the termstore to happily tag document and list data with great ease using the Managed Metadata Service, when all of a sudden....





WTF!  Oh, breathe, this is SharePoint, these kind of issues are part of the package...let look at the ULS (log).

07-08-2015 14:50:54.86 w3wp.exe (0x2160) 0x2FA4 SharePoint Server Taxonomy f8bn Monitorable Failed to get term store for proxy 'Managed Metadata Service'. Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.     at Microsoft.SharePoint.Taxonomy.Internal.XmlDataReader.GetDateTime(String name)     at Microsoft.SharePoint.Taxonomy.Internal.SharedTermStore.Initialize(IDataReader dataReader, Guid termStoreIdValue, Boolean fromPersistedData)     at Microsoft.SharePoint.Taxonomy.Internal.SharedTermStore..ctor(IDataReader dataReader, Guid termStoreId, Boolean fromPersistedData)     at Microsoft.SharePoint.Taxonomy.Internal.DataAccessManager.GetTermStoreData(MetadataWebServiceApplicationProxy sharedServiceProxy, Boolean& partitionCreated) 4efe179d-3828-e053-26eb-92b558cf8026

Okay, a "keyNotFoundException", seems serious?  Without boring myself, this is how you fix it, with hardly any stress to you :-)  Open SharePoint CentralAdmin, so to Service Applications, select your Managed Metadata Service (if you called it that) and click properties in ribbon, like so...


You will get a popup like this.




Then make sure you backup (just in case) the metadata database, before doing the next steps.

In the DATABASENAME, prefix it with something like "TEMP", then click OK, this might create a DB with this name (you can delete it later).



Check the Managed Metadata Service, it should be working.  But with a new DB...Noooo!  Dont stress.  Repeat the above step, but this time, remove the prefix we added "TEMP" and click OK.

Voila, if all is well, your Metadata will be back up and running, with all its termsets.


In summary:


  1. Rename database for existing Managed Metadata Service.
  2. Click OK
  3. Check Metadata Service working (with new database)
  4. Rename database back to original
  5. Click OK
  6. All should be working.

Why this is caused, I dont know, will it happen again, likely.  If I figure out what the cause is, I will update this post, else, life goes on.