August 16, 2013 at 3:19 am
Hello Everyone,
I'm trying to get the Memory Usage of the SQL SERVER (Total Memory Usage) and available free memory of the system using the query which I got on the internet. The query seems to work for SQL SERVER 2008 but doesn't work on SQL SERVER 2005. The reason being "dm_os_sys_memory" and "dm_os_process_memory " are not available in SQL SERVER 2005.
Note: This should be achieved through queries only, as I don't have permission on machine to use permon and other features provided by windows.
The below mentioned query works in SQL SERVER 2008, please suggest if there is an alternate way
select A.total_physical_memory_kb/1024 as Total_Memory,
A.available_physical_memory_kb/1024 as Free_Memory,
B.physical_memory_in_use_kb/1024 as SQLServer_Memory
from master.sys.dm_os_sys_memory A, master.sys.dm_os_process_memory B;
Regards,
Prakasha N
August 16, 2013 at 3:31 am
Thanks a lot for replying.
Actually I'm trying to edit the title, but I'm unable to change it. There is no option for changing the title of the topic or deleting the topic.
I apologize for the inconvenience.
August 16, 2013 at 3:40 am
Have you tried DBCC MEMORYSTATUS? If not, you will find more information in this link http://support.microsoft.com/kb/907877
August 16, 2013 at 4:07 am
I was going through DMVs available and the ones which I can use for finding Memory, so found this and I wrote the query.
I did go through DBCC MEMORYSTATUS before posting. I was not able to clearly co-relate with the memory usage showed by Windows Task Manager and the query.
Since I'm fairly new to such things in SQL server, I'm not quite able to put everything and get the total SQL server memory consumption.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply