Today I have reciving lots of errors like show below in a SQL Server (Version 2008 R2).
Login failed for user ‘WORLD\SYS_SCOMAction’. Reason: Failed to open the explicitly specified database. [CLIENT: <named pipe>]
Error: 18456, Severity: 14, State: 38.
The problem looks be in an application what maybe is set wrong or reference inexisting database. The issue is how I can localize which database the process is trying connect. For this task You can use the SQL SERVER PROFILER
start the Profiler and set the default template using below two category of events:
1.Security Audit, keep the “Audit Login Failed” event.
2.Errors and Warning, check the “ErrorLog” and “User Error Message” events.
Start the trace, after running trace you will see error message saying:
“Cannot open database requested by the login. The login failed.”
Here you can see the database which the process is trying connect.
HTH – Antonio NAVARRO