"The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator."
In Central Admin > Manage Service Application > check whether the Managed Metadata Service application was started and the service is working fine.
In Central Admin > Manage services on server > whether the Managed Metadata Web Service is started.
In IIS, check whether the Application pool for the metadata service is started. Also
see what is the account in which the application pool for the metadata service is running. if the password for this account is changed, you need to reenter the account password by selecting the metadata service Application Pool in IIS > Advance settings > Enter the account and the password.
See the Error details, if you see the below in the error message:
Cause : Cannot open database “Manage Metadata Service” Login Failed for user (a user account),
then check the SQL server, if the user account is the owner of the “Manage Metadata Service” Database.
In my experience, I realized, the “Manage Metadata Service” Database have been replaced with another DB, named “SharePoint Service ManagedMetadata", so despite the “Manage Metadata Service” DB has been removed from SQL server, SharePoint Farm still trying to reference to it.
I used a PowerShell command which I found in this blog, to remove this DB from the list of SP Databases:
- In SharePoint Management Shell, type get-spdatabase and press enter. it will show you all the SP DBs.
- As you see in the below scennshot, despite the DB “Manage Metadata Service” (mentioned on the error message) has been removed from SQL server, SharePoint Farm still trying to reference to it.
- Find the database “Manage Metadata Service” (the DB name in the error message). Right click in PowerShell , click on mark and copy the ID of this DB.
- Type $bad = get-spdatabase <your ID> .
- Type $bad and press enter. I see the database in the $bad variable.Now I can delete this DB
- Run $bad.Delete()
- Now when I run get-spdatabase, I can see the DB in error message is gone.
Hope it helps,