- You have a stored procedure that contains a child stored procedure in Microsoft SQL Server 2012.
- The child stored procedure uses a table as a parameter.
- You create a temporary table, and then you pass it to the child stored procedure as the parameter.
- The child stored procedure runs some queries against the temporary table by using cursors.
Cumulative update information
Cumulative Update 3 for SQL Server 2012 Service Pack 1 (SP1)The fix for this issue was first released in Cumulative Update 3. For more information about how to obtain this cumulative update package for SQL Server 2012 SP 1, click the following article number to view the article in the Microsoft Knowledge Base:
|Rule software||Rule title||Rule description||Product versions against which the rule is evaluated|
|System Center Advisor||SQL Server Memory leak when queries are run against a temporary table in a nested stored procedure in SQL Server 2012||In this SQL Server instance advisor detected the presence of a SQL Server build lower than the fixed build for a Memory Leak issue. This can happen when you have a stored procedure that contains a child-stored procedure, which uses temp tables that further uses cursors. You may notice MEMORYCLERK_SQLOPTIMIZER of sys.dm_os_memory_clerks and MEMOBJ_EXECCOMPILETEMP from sys.dm_os_memory_objects going very high.|
Refer to the KB article for more details.
|SQL Server 2012|
Article ID: 2803065 - Last Review: Jan 30, 2014 - Revision: 1