What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Cecking SQL stolen Memory

Votes:

0

I guys , i'm trying to check SQLServer:Memory Manager Stolen Server Memory on a 2012 sql server. Any idea ?

memory sql2012 wmi

Created on May 22, 2014 9:55:58 AM



Best Answer

Accepted Answer

Votes:

0

The Stolen Server Memory (KB) counter was introduced in SQL Server 2012. (In earlier versions, there was the Stolen pages counter)

The SQL Query below will get you the value you are looking for.

SELECT cntr_value
FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'Stolen Server Memory (KB)'

Using the Multi Channel SQLspXML sensor, you can select multiple values to report on, like

SELECT
   counter_name as Channel 
  ,cntr_type as Value
  ,1 as IsInt
  ,'KB' as Unit
FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'Stolen Server Memory (KB)'

UNION

SELECT
   counter_name as Channel 
   ,cntr_type as Value
   ,1 as IsInt
   ,'KB' as Unit
FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'SQL Cache Memory (KB)'

UNION

SELECT
   counter_name AS Channel 
  ,cntr_type as Value
  ,1 as IsInt
  ,'KB' as Unit
FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'Total Server Memory (KB)'

More info can be found in the sensor's manual.

Created on Jun 13, 2014 9:35:47 AM



3 Replies

Votes:

0

Hello,

thank you very much for KB-Post. Please check if you can get this metric with a SQL-Query, then you can use a normal SQL-Sensor with a SQL-Sensor and the query. Maybe the metric is also available as a Performance Counter or a WMI Class / Object. Then you could look into using a Custom Performance Counter or Custom WMI Sensor.

best regards.

Created on May 23, 2014 8:14:34 AM by  Torsten Lindner [Paessler Support]



Accepted Answer

Votes:

0

The Stolen Server Memory (KB) counter was introduced in SQL Server 2012. (In earlier versions, there was the Stolen pages counter)

The SQL Query below will get you the value you are looking for.

SELECT cntr_value
FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'Stolen Server Memory (KB)'

Using the Multi Channel SQLspXML sensor, you can select multiple values to report on, like

SELECT
   counter_name as Channel 
  ,cntr_type as Value
  ,1 as IsInt
  ,'KB' as Unit
FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'Stolen Server Memory (KB)'

UNION

SELECT
   counter_name as Channel 
   ,cntr_type as Value
   ,1 as IsInt
   ,'KB' as Unit
FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'SQL Cache Memory (KB)'

UNION

SELECT
   counter_name AS Channel 
  ,cntr_type as Value
  ,1 as IsInt
  ,'KB' as Unit
FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'Total Server Memory (KB)'

More info can be found in the sensor's manual.

Created on Jun 13, 2014 9:35:47 AM



Votes:

0

Ok guys , thanks for the answer. I've find another way to monitor it .. the perfcounter custom sensor. whit that i've managed to check everything i needed Hope can help someone also this solution

Created on Jun 13, 2014 9:49:17 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.