[sql-server-2005] How much RAM is SQL Server actually using?

I am debugging one of my apps and noticed that the RAM on my SQL Server 2005 x64 box (running on a Windows 2003 R2 x64 ) is pegged and even going into the paging file.

I understand that SQL Server 2005 x64 just grabs everything it can, so this might be normal (???). How can I check how much memory it is actually using?

This question is related to sql-server-2005 ram

The answer is


Be aware that Total Server Memory is NOT how much memory SQL Server is currently using.

refer to this Microsoft article: http://msdn.microsoft.com/en-us/library/ms190924.aspx


  1. Start -> Run -> perfmon
  2. Look at the zillions of counters that SQL Server installs

Go to management studio and run sp_helpdb <db_name>, it will give detailed disk usage for the specified database. Running it without any parameter values will list high level information for all databases in the instance.


Related to your question, you may want to consider limiting the amount of RAM SQL Server has access to if you are using it in a shared environment, i.e., on a server that hosts more than just SQL Server:

  1. Start > All Programs > Microsoft SQL Server 2005: SQL Server Management Studio.
  2. Connect using whatever account has admin rights.
  3. Right click on the database > Properties.
  4. Select "Memory" from the left pane and then change the "Server memory options" to whatever you feel should be allocated to SQL Server.

This will help alleviate SQL Server from consuming all the server's RAM.


The simplest way to see ram usage if you have RDP access / console access would be just launch task manager - click processes - show processes from all users, sort by RAM - This will give you SQL's usage.

As was mentioned above, to decrease the size (which will take effect immediately, no restart required) launch sql management studio, click the server, properties - memory and decrease the max. There's no exactly perfect number, but make sure the server has ram free for other tasks.

The answers about perfmon are correct and should be used, but they aren't as obvious a method as task manager IMHO.


You should explore SQL Server\Memory Manager performance counters.