I have a SQL server 2005 SP2 and is installed on a dedicated windows box.
I am referring to the below URL: http://msdn.microsoft.com/en-us/library/ms190924.aspx
I am trying to monitor the amount of memory used by SQL server at any point of time.
I am trying to understand the below 2 parameters: Target Server Memory (KB) --> Total amount of dynamic memory the server can consume.
Total Server Memory (KB) --> The committed memory from the buffer pool (in kilobytes). Note: This is not the total memory used by SQL Server.
As per my understanding, Total Server Memory (KB) is max amt of memory SQL server can use BUT is NOT the amt of memory SQL server is using right now.
Options that I found: 1) select * from sys.dm_os_performance_counters where counter_name like '%server memory%' 2) Check SQLSERVER.EXE from TASK MANAGER.
So HOW can I find out amt of memory that SQL server is using? I need to find the exact memory usage which may keep on changing at any point on time.
NEED HELP ASAP!!!!
asked Mar 26 '10 at 02:38 AM in Default
Checkout this article about MEMORYSTATUS and you might also find below scripts useful**.
Top 10 consumers of memory from Buffer Pool:
How much Physical RAM does the machine have?
Get PLE from sys.dm_os_performance_counters:
Find out what has the most entries in the buffer cache
Also checkout sys.dm_exec_query_resource_semaphores on books online
**I am not the author of these scripts. I found them somewhere on the net a while back and I was using them since and I figured somebody might benefit from them here . I dont remember where I found them so I couldnt give credit properly. Let me know if this is not appropriate and I will remove them.
You might find a good starting point here - using DBCC MEMORYSTATUS.
The following code would give you the working set in KB:
answered Apr 03 '10 at 05:46 PM
Matt Whitfield ♦♦