Upgrade to SP2013, part 4: Upgrade Managed Metadata Service App

I will only upgrade one service app and that is the Managed Metadata service application, since I have built the company wiki based on a taxonomy tree there.

There is an article on technet that I followed to update this, but it failed. I tried it twice and got the same error and I am sure I missed something or did something wrong somewhere, but there is a limit on how many trials you do before you give up. So I did my own workaround and got it to work finally.

These are the recommended steps that I followed from Technet:
Detach the Managed metadata database on the SP2010 test server
Copy it to the new SP2013 server
Attach it to the SQL server
Then run this command in Powershell to upgrade the database:

$applicationPool = Get-SPServiceApplicationPool -Identity ‘SharePoint Web Services default’

$mms = New-SPMetadataServiceApplication -Name ‘Managed Metadata Service Application’ -ApplicationPool $applicationPool -DatabaseName ‘Managed Metadata Service’
(If you use a variable like $mms (or whatever you want to call it), you can refer to that when you create the proxy group):
New-SPMetadataServiceApplicationProxy -Name ‘Managed Metadata Service Connection’ -ServiceApplication $mms -DefaultProxyGroup

Did an iisreset just to be sure…

Right. So the result was an error message when I tried to access the Managed metatadata service app.

Opened the Properties to make sure it had the correct database (the upgraded db name) and application pool. And I actually created a new application pool and assigned the correct service account to that. That did not change anything.

Then I verified that the same service account has permissions to the database on the SQL server also.
Checked the Health Analyzer. Found a message about the managed metadata not being associated to the service apps:

Checked the “Configure service application associations” and the service apps were correctly associated.
Went back to Health analyzer and clicked on “Reanalyze now” and the message disappeared. Did not change anything.

Went into “Upgrade and Migration” and clicked on “Check upgrade status” and found the successful upgrade message so the database seems to be OK:

 

Clicked on the second Managed metadata service connection level and checked the second box also. I did not expect any changes from this, but just in case….

Went into “Security” and “Configure Service Accounts” and changed to another pool account and made an iisreset to see if that helped. No, did not change anything, still same error.

Checked the ULS and found this error:
Failed to get term store for proxy ‘Managed Metadata Service Connection’. 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) 3a24169c-4427-a0a0-8c09-185263be83c0
04/28/2013 14:01:11.13  w3wp.exe (0x2EDC)                        0x1E80 SharePoint Server              Taxonomy                       8088 Warning  The Managed Metadata Service ‘Managed Metadata Service Connection’ is inaccessible. 3a24169c-4427-a0a0-8c09-185263be83c0

Googled these errors and found nothing that really related and could solve my problem (“the given key was not present”).

Gave up and tried my own solution, which worked immediately! Steps follows below:

My own solution
Detached the database
Deleted the Managed Metadata service application in CA that I had created in the steps above
Created a new managed metadata service application and also a new application pool account.
And I checked “Add this service application to the farms default list”.
Attached the upgraded database (from my former steps above, so the database needs to be upgraded)
Changed the properties of the service app, and added the name of the upgraded database
Iisreset just to be sure…
It worked immediately.

May not be the correct way, but at least this worked on first shot!

5 1 vote
Rate this article!
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

13 Comments
newest
oldest most voted
Inline Feedbacks
View all comments
Manjiri

Thank you very much . I had exact same issue and been struggling with this for whole day and finally your post helped me. This is what i did
I deleted then recreated Managed metadata Service app using technet method with powershell using Sharepoint Webservices Default pool . Did not specify new account. Created new service applicationproxy using powershell. restore the metadata service database from 2010 . Go to properties , change the datbase name to point to this restored database and it worked.
Thanks again.

Lise Rasmussen

Hi Manjiri!
Glad I could help 🙂 Thanks for posting yours also.
/Lise

Squiggle

$mmsa = New-SPManagedAccount
[insert your preferred credentials]

$mmapppool = New-SPServiceApplicationPool -Name 'SharePoint Managed Metadata' -Account $mmsa
$mms = New-SPMetadataServiceApplication -Name 'Managed Metadata Service Application' -ApplicationPool $mmapppool -DatabaseName '[YOUR SP2010 DATABASE]' -Verbose
$mmsp = New-SPMetadataServiceApplicationProxy -Name 'Managed Metadata Service Application Proxy' -ServiceApplication $mms -DefaultProxyGroup -Verbose
Set-SPMetadataServiceApplication -Database DELETEME
Set-SPMetadataServiceApplication -Database '[YOUR SP2010 DATABASE]'

Then just go and delete the DELETEME database …

Hughesers

Thanks for this post. I wish I found it a couple hours ago. Following your steps worked for me however I didn't recreate the application pool. All I did was swap out the databases.

Anonymous

Thank you very much . I had exact same issue and finally your post helped me