While preparing a demo for a presentation, I generated a 18456 error in the SQL instance by selecting a non-existent database in my connection string.
To my surprise, the SQL Errorlog now discloses the database that I was trying to connect to:
This seems to be improved for at least state 38 and state 40 of error 18456.
I no longer must create a trace to catpure the User Error Message to extract this information. Efficiency gained – now what to do with all that spare time?