You are currently offline, waiting for your internet to reconnect

An application cannot connect to a contained database when connection pooling is enabled in SQL Server 2012 or SQL Server 2014

Consider the following scenario:
  • 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 Error: 18456, Severity: 14, State: 5.
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 problem does not occur the first time that a connection to a contained database occurs. However, the problem does occur on all successive attempts.
The issue was first fixed in the following cumulative update of SQL Server.

Cumulative Update 1 for SQL Server 2014

Cumulative Update 7 for SQL Server 2012 SP1

About cumulative updates for SQL Server

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
More information
This update also fixes another problem in which the following built-in functions return the user SID instead of the user name:

Note This update makes sure that the user name is always returned by these functions, whether or not a contained database is used.
See the terminology Microsoft uses to describe software updates.

Article ID: 2894326 - Last Review: 04/22/2014 00:12:00 - Revision: 3.0

Microsoft SQL Server 2012 Developer, Microsoft SQL Server 2012 Enterprise, Microsoft SQL Server 2012 Express, Microsoft SQL Server 2012 Parallel Data Warehouse, Microsoft SQL Server 2012 Standard, Microsoft SQL Server 2014 Developer, Microsoft SQL Server 2014 Enterprise, Microsoft SQL Server 2014 Standard

  • kbqfe kbfix kbsurveynew kbexpertiseadvanced KB2894326