SCOM DW DB에서 성능 집계 데이터 쿼리 Etc.2011. 4. 4. 16:22
SCOM DW DB에서 성능 집계 데이터 쿼리
Select
dbo.vManagedEntity.Path as [Name],
MAX(Round(MinValue,2)) as [Minimum],
MAX(Round(AverageValue,2)) as [Average],
MAX(Round(MaxValue,2)) as [Maximum],
Convert(Char(10),DateAdd(hh,9,DateTime),120) as [Date]
from Perf.vPerfDaily
Join dbo.vPerformanceRuleInstance on dbo.vPerformanceRuleInstance.PerformanceRuleInstanceRowId = Perf.vPerfDaily.PerformanceRuleInstanceRowId
Join dbo.vPerformanceRule on dbo.vPerformanceRule.RuleRowId = dbo.vPerformanceRuleInstance.RuleRowId
Join dbo.vManagedEntity on dbo.vManagedEntity.ManagedEntityRowId = Perf.vPerfDaily.ManagedEntityRowId
Where dbo.vPerformanceRule.ObjectName = 'Processor'
AND dbo.vPerformanceRule.CounterName = '% ProcessoR Time'
AND dbo.vPerformanceRuleInstance.InstanceName = '_Total'
AND dbo.vManagedEntity.Path <> 'NULL'
Group By dbo.vManagedEntity.Path, Perf.vPerfDaily.DateTime