Using DBCC MEMUSAGE

The DBCC MEMUSAGE statement displays information about how SQL Server uses memory, and it provides a snapshot of both the data cache and the procedure cache. It is the only means of accurately determining the size of the SQL Server executable code.

The output from DBCC MEMUSAGE provides three types of information:

For more information, see the Microsoft SQL Server Transact-SQL Reference.