A user logged in and specified an initial database "ABC" which does not exist or the user does not have access too.
SQL Server 2014 Error message in error log
i am having this error message in sql error log kindly advise where to start looking for the solution
Message
[298] SQLServer Error: 4060, Cannot open database "ABC" requested by the login. The login failed. [SQLSTATE 42000]
SQL Server | Other
4 answers
Sort by: Most helpful
-
-
k shaz 36 Reputation points
2020-09-09T18:57:13.787+00:00 not sure how to find which user is trying to access?
-
Erland Sommarskog 128.9K Reputation points MVP Volunteer Moderator2020-09-09T21:08:53.89+00:00 That message is in the SQL Server error log? That is somewhat unexpected, because this is the message you would see at the client. The message in the SQL ERRORLOG when someone tries to login on the server, providing a non-existing database in the connection string is like this:
Login failed for user 'SOMMERWALD\sommar'. Reason: Failed to open the explicitly specified database 'kkkk'. [CLIENT: <local machine>]
Possibly this could be an error from attempt to access a linked server set up with MSDASQL (rather than the normal SQLNCLI11). But a login error on a linked server would normally not result in a message in the SQL Server error log. For that to happen, it would have to be some system process of some sort. For instance, an activation procedure for Service Broker.
Or are you actually looking in the Windows Event Log?
-
CathyJi-MSFT 22,406 Reputation points Microsoft External Staff2020-09-10T05:40:16.733+00:00 Hi @k shaz ,
Please refresh databases list check if ABC database still exist in your SQL instance. Please check the information around the error message to find some useful information. Or you can share us a screenshot about your issue.
Best regards,
Cathy
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.