Print this posting |
This posting walks through the steps for restoring a Managed Metadata Service Application (MMSA) database. I use this process to "refresh" a development farm with the latest MMSA changes. The steps in brief are:
- Stop service
- Detach old database
- Attach backup database
- Grant farm service accounts access: Admin, farm, AppService
- Configure MMSA for new database
- Start MMSA
- Start MM service
- Check App pools and IIS web services root
- Reset IIS
- Log into a farm server using the SharePoint Setup User Administrator account.
- Launch a SharePoint Management Shell as Administrator (right-click).
- Execute the following: Get-SPServiceInstance | Where {$_.Name -Like "*Managed*"}. This will return all instances of the service application - one for each SharePoint server in your farm. not all of these instances will be running.
- Copy the GUID for the running instance.
- Execute the following: Stop-SPServiceInstance -Identity <ServiceGUID>. This will stop, or unprovision, the MMSA instance.
- Leave the shell and this login session open for the time being (if you can).
- Log into the farm database server host using a farm administrator account.
- Copy the backup MMSA database to this server.
- Launch SQL Server Management Studio (SSMS) as Administrator.
- In Object Explorer, expand the tree to the farm's Managed Metadata database.
- Right-click on the database, point to Tasks, and then click Detach...
- Enable the Drop Connections and Update Statistics options, then click OK.
- Navigate to the folder containing the MMSA database data file. By default, it will be: C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA.
- Rename the MMSA database file to something else.
- Repeat for the MMSA database log file.
NOTE: steps 12-14 are performed on the assumption that the restored MMSA database has the same database name and filename as the one that you are removing. If this is not the case, skip these steps.
- In SSMS, in Object Explorer, right-click on the Databases node, and then click Restore Database.
- Perform the usual steps for restoring a database, in this instance, the backup MMSA database.
- Configure farm service accounts for DBO database access:
- SharePoint Setup User Administrator (spAdmin)
- SharePoint Farm Service (spFarm)
- SharePoint Application Service (spService)
- Other farm administrator accounts as needed
- Close SSMS.
- Return to the SharePoint Server and the open shell session.
- Execute this script:
$app = Get-SPServiceApplication -Name "<service application name>" Set-SPMetadataServiceApplication -Identity $app -DatabaseName "<dbname>" Start-SPServiceInstance -Identity
replacing brackets with appropriate values.
- Navigate to: System Settings > Manage services on server.
- Verify that the Managed Metadata Web Service is started on the appropriate server. If it isn't, start it.
- Launch IIS Manager.
- In the Connections panel, select Application Pools.
- Verify that the SharePoint Web Services Root is started. If it isn't, start it.
- Now expand Sites, and then select SharePoint Web Services.
- Verify that it is started. If it isn't, start it.
- Open an elevated Command Shell.
- Execute IISReset.
- Test by first navigating to: Central Administration > Application Management > Manage Service Applications.
- Then select Managed Metadata Service, and then select the Manage button. The Term Store Management Tool should display without issue. If not review the steps performed here and ensure that you have completed all of them.
NOTE: the <service application name> above is not the one that you see when you execute Get-SPServiceInstance, but the one you see in Manage service applications and what you see when you execute Get-SPServiceApplication.
References
- SharePoint 2013: How to Restore Content Databases
- Move the Managed Metadata Service service application databases in SharePoint Server 2013
- Start or stop a service (SharePoint 2013)
- There are no addresses available for this application" error in SharePoint managed metadata service
Notes
- Managed Metadata Service Application runs on a single server, in this case a single application server.
1 comment:
We were migrating a Managed Metadata database from our SharePoint 2013 Farm into our new SharePoint 2016 Farm. We encountered exactly the "counter-intuitive" message you described in this post.
Your precise and well written steps for resolving the issue worked perfectly. You saved us a ton of time and aggravation. Thanks much.
Post a Comment