Those who are my regular clients would know that I am very active in replying to emails. My average time of response is around 24 minutes. Many of the emails are for suggestions and I don’t get much time to help everyone, but I do reply to them letting them know the alternatives. If you are following my blog, you would know that I do provide “On Demand” services to help critical issues. This blog is an outcome of one of such short engagement about login failed.
One of my client was worried about login failed messages which they were seeing in the SQL Server ERRORLOG file.
2017-09-11 04:53:19.880 Logon Error: 18456, Severity: 14, State: 38.
2017-09-11 04:53:19.880 Logon Login failed for user ‘GLOBAL\PORTAL01$’. Reason: Failed to open the explicitly specified database. SharePoint_Config’ [CLIENT: ]
As per them, there is no complaint from anyone about any issue, but those messages are not looking good.
WORKAROUND/SOLUTION
First, we needed to figure out the account which is trying to access. If you look at the account which is shown in the error message is ending with “$” which means a machine account. In our case PORTAL01 was a front server in the SharePoint farm. This comes when there is some service, running under Local System account, it is trying to connect. After digging further, I found that this was SharePoint server which was trying to connect.
State 38 of Login failed, is logged when the account is having insufficient access to the database (SharePoint_Config). To fix it, we connected to SQL Server using SSMS and navigated to the Security > Logins > Right click on the account, and went to properties. We clicked on “User Mapping” tab and there we saw that the login was not mapped with the database SharePoint_Config. We noticed that it was only mapped to the master database. Now, this explains the cause of the error messages in ERROLROG.
Once we mapped that login to that mentioned database, we stopped receiving login failed error messages.
If you are having any quick issue to resolve, you can also avail the same kind of services. Click here to read more about it.
Reference: Pinal Dave (https://blog.sqlauthority.com)
First appeared on SQL SERVER – Login Failed – Error: 18456, Severity: 14, State: 38 – Reason: Failed to Open the Explicitly Specified Database