SQL Server Error: 18456

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.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s