2

i am looking for some custom scripts to pull information on perfomance data counters being collected by OpsMgr. Does anyone have any scripts they are currently using?

LapTop006
  • 6,496
  • 20
  • 26
SQLRockstar
  • 713
  • 6
  • 10

1 Answers1

1

Here's some sql to get you started:

use operationsmanagerdw
SELECT TOP 100 pr.ObjectName, pr.CounterName, pri.InstanceName,
p.SampleValue
FROM Perf.vPerfRaw p
INNER JOIN vManagedEntity me ON me.ManagedEntityRowID =
p.ManagedEntityRowID
INNER JOIN vPerformanceRuleInstance pri ON pri.PerformanceRuleInstanceRowId
= p.PerformanceRuleInstanceRowId
INNER JOIN vPerformanceRule pr ON pr.RuleRowId = pri.RuleRowId
WHERE me.[Path] = 'server FQDN'

Works with SCOM 2007 SP1, SQL 2005 backend. Other performance tables in the data warehouse are Perf.vPerfHourly , and Perf.vPerfDaily

Jim B
  • 24,081
  • 4
  • 36
  • 60
  • thanks Jim, this is a great start. i am going to mark this question as answered, but would love if others could share similar scripts. – SQLRockstar May 28 '09 at 18:02