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
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
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:
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.
Source: Stackoverflow.com