Pages

Tuesday, February 8, 2011

memory checking in sqlserver

memory checking in sqlserver

 
SELECT cntr_value/1024 as 'MBs used'from master.dbo.sysperfinfo where
object_name = 'SQLServer:Memory Manager' and
counter_name = 'Total Server Memory(KB)'
GO


If you are checking for Named instance then replace 'MSSQL$InstanceName:Memory Manager'