I'm seeing thousands of rows in our error log about failed logins:

Error: 18456, Severity: 14, State: 38.
Login failed for user 'Ourcompany\myaccount'.
Reason: Failed to open the explicitly specified database 'mydatabase'. [CLIENT: 10.nn.nn.nn]

Some of our users do not have access to all databases on the server. When I switch off Intellisense in SSMS -> Tools -> Options -> Text editor -> Transact-SQL -> IntelliSense, the spamming stops.

Is this a bug in SSMS?
Are there ways around it (apart from granting access to all databases)?

2 Answers 2


Have users update SSMS. This was a bug in an earlier release of SSMS2016. Earlier this year I had the same issue, but only with some users. Those users had not updated their SSMS. Once they did, issue went away. Unfortunately I do not remember which version had this issue.


I found that, for me, it occurred after I took a database offline (on SQL 2012 SP1), using SSMS 2016 (13.0.16100.1).

Intellisense was trying to connect to that database. Occasionally, because of the failed login, it would result in my Windows login becoming disabled.

Every-time I restarted SSMS, and connected to the instance, an error log message would be generated.

Dropping the database ultimately resolved the issue, but prior to that, neither clearing the Intellisense cache, nor turning Intellisense off and on again would work.

Re-adding the database, and taking offline again caused the problem to recur.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.