KB2895494 - Slow SQL Server performance and a memory leak after you apply Cumulative Update 3 for SQL Server 2012 Service Pack 1 or in SQL Server 2014

Work anywhere from any device with Microsoft 365

Upgrade to Microsoft 365 to work anywhere with the latest features and updates.

Upgrade now


After you apply Cumulative Update 3 for Microsoft SQL Server 2012 Service Pack 1 to an instance of SQL Server or in SQL Server 2014, SQL Server performance might be slow, and a memory leak might occur.

If you run the following query when this problem occurs, you see that the Mem in MB value and the row count value keep increasing for the MEMOBJ_COMPILE_ADHOC memory object:

select type, sum(pages_in_bytes)/1024.0/1024.00 'Mem in MB', count (*) 'row count' from sys.dm_os_memory_objects
where type like '%MEMOBJ_COMPILE_ADHOC%'
group by type


  • The DBCC FREEPROCCACHE command does not help reduce the Mem in MB value.

  • This problem only occurs when you run many sp_prepare procedures to prepare parameterized Transact-SQL statements.

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.


See the terminology that Microsoft uses to describe software updates.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.