- You have a contained database in Microsoft SQL Server 2012 or SQL Server 2014.
- An application tries to connect to the contained database by enabling connection pooling.
- The application uses SQL Server authentication.
In this scenario, the application may be unable to connect to the database. Additionally, you find errors that resemble the following in the SQL Server error log:
datetime Logon Login failed for user 'SID'. Reason: Could not find a login matching the name provided [Client:]
datetime spid# Error: 18056, Severity: 20, State: 5.
datetime spid# The client was unable to reuse a session with SPID #, which had been reset for connection pooling. The failure ID is #. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.
Note This update makes sure that the user name is always returned by these functions, whether or not a contained database is used.
Article ID: 2894326 - Last Review: Apr 22, 2014 - Revision: 1