November 6, 2012 at 8:26 am
Hi,
I'm putting together a script to run some audit checks(various different things).
I'm just wondering if there is any TSQL to return the Total RAM on a server to SSMS?
I know there are a million other ways of doing this but I'd like to get store the script and run it whenever we have a request and I'd like to try and keep it all in TSQL.
Any help would be great.
Thanks in advance
November 6, 2012 at 8:33 am
November 6, 2012 at 8:36 am
Vets5 (11/6/2012)
Hi,I'm putting together a script to run some audit checks(various different things).
I'm just wondering if there is any TSQL to return the Total RAM on a server to SSMS?
I know there are a million other ways of doing this but I'd like to get store the script and run it whenever we have a request and I'd like to try and keep it all in TSQL.
Any help would be great.
Thanks in advance
select
physical_memory_in_bytes /1024.00 /1024.00 /1024.00
from sys.dm_os_sys_info
Mine returns 511.9882812 and we have 512 GB of RAM in the server.
November 6, 2012 at 8:41 am
Thanks guys!
Exacly what I'm looking for... Here is how mine looks
SELECT physical_memory_in_bytes / 1073741824 as 'Physical OS Memory in GB'
FROM sys.dm_os_sys_info
Works a treat!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply