Database Reference
In-Depth Information
You can join the
vManagedEntity
view on the
ManagedEntityRowId
column to
retrieve information on the monitored object the performance data is associated with.
To retrieve information on the performance rules, you can join
vPerform-
anceRuleInstance
on the
PerformanceRuleInstanceRowId
column. Each
counter that collected performance data is represented by a row in the
vPerform-
anceRuleInstance
view. You can then join the
vPerformanceRule
view on the
RuleRowId
column to get the counter and object names that were collected or join the
vRule
view on the
RuleRowId
column to get the rule that collected the performance
counter.
The following query returns yesterday's hourly performance aggregates, including the
counters, rules, and managed entities associated with the performance data:
SELECT
ME.FullName,
R.RuleDefaultName,
PR.ObjectName,
PR.CounterName,
P.SampleCount,
P.MinValue,
P.MaxValue,
P.AverageValue,
P.StandardDeviation
FROM
Perf.vPerfHourly P
INNER JOIN vManagedEntity ME ON
P.ManagedEntityRowId = ME.ManagedEntityRowId
INNER JOIN vPerformanceRuleInstance PRI ON
P.PerformanceRuleInstanceRowId =
PRI.PerformanceRuleInstanceRowId
INNER JOIN vPerformanceRule PR ON
PRI.RuleRowId = PR.RuleRowId
INNER JOIN vRule R ON
PRI.RuleRowId = R.RuleRowId
WHERE
YEAR(P.DateTime) = YEAR(DATEADD(d, -1, GETDATE()))
AND MONTH(P.DateTime) = MONTH(DATEADD(d, -1, GETDATE()))
AND DAY(P.DateTime) = DAY(DATEADD(d, -1, GETDATE()))