Memory Consumed By SQLServer

Categories: News, Professional, SSC
Tags: ,
Comments: No Comments
Published on: February 28, 2011

Have you wondered how much memory was being consumed by SQL Server?  Have you wondered if there was a way to find out that information from a tSQL command?

On occasion it would be nice to be able to find this information.  A command was provided for this very purpose.  Have you heard of DBCC MemoryStatus?

As stated in the MSDN documentation for this command, “The DBCC MEMORYSTATUS command provides a snapshot of the current memory status of Microsoft SQL Server.” (MSDN).  There is a grundle of information that is provided through this command.  I recommend reading the documentation on it to better understand the outputs – otherwise you may completely misunderstand the results.

Sometimes, you may just want to find high-level usage information.  For a snapshot of that high-level information, you could try a query such as this:

[codesyntax lang="tsql"]


I got the idea for this query online (slightly adapted) from the following blog.  Go check it out.  Once you delve into the result set of dbcc memorystatus, you can quickly see how many possibilities there would be for various scripts based on the results.

No Comments - Leave a comment

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

February 2011
« Jan   Mar »


  • @n9ljx: sorry (3/2) description is 'Method not found:System.Collections.Generic.IEnumerable`1< #sqlhelp
  • @muad_dba: @SQL_Padre what do you have max server memory set at? #sqlhelp
  • @n9ljx: gives cryptic error about a deprecated sp, but the sp isn't listed. How do I find the broken sp? #sqlhelp (2/2)
  • @n9ljx: on a 2008r2 instance we have several databases in 90 compatibility mode. running upgrade advisor on these DBs (1/2) #sqlhelp
  • @Ko_Ver: this time a lookup with no cache caused the issue. I guess the system is being haunted with an anti-RBAR spirit... #sqlhelp
  • @Ko_Ver: yet another package with the same issue. This time no OLE DB command. Weird stuff is going on... #sqlhelp
  • @Ko_Ver: another similar package with an OLE DB command is suddenly facing the same issue. I wish I could punch #ssis in the face... #sqlhelp
  • @SQL_Padre: #SQLHelp all T-SQL commands are queued and will not execute until application is forced closed --2/2
  • @SQL_Padre: #SQLHelp Can HEAVY read I/O cause enough CPU (or memory) pressure to cause the OS to stop working? No RDP or console login -- 1/2
  • @jeffrush: SSIS row count / script component issue (video for more detail) #sqlhelp #ssishelp

Welcome , today is Tuesday, September 23, 2014