Performance views still show counters when performance collection rules are disabled in System Center Operations Manager

Applies to: System Center 2012 R2 Operations ManagerMicrosoft System Center 2012 Operations Manager Service Pack 1Microsoft System Center 2012 Operations Manager More

Symptoms


When performance collection rules are disabled in Microsoft System Center Operations Manager, performance views still show counters even after all the data is groomed out.

This clutters PerformanceDataAllView, and, in extreme cases, can make the view difficult to use because of the number of counters that are selected.

Cause


This issue is by design. The Operations Manager grooming processes does not groom the PerformanceSource table.

Resolution


The following is a small SQL script that will remove the entries from PerformanceDataAllView for which no data is recorded.

Note Stop all the Operations Manager services on all Management Servers before you run the script. Always back up your OperationsManager Database before you run this script.

Use OperationsManager
delete from PerformanceSource where PerformanceSourceInternalId in
(
select PS.PerformanceSourceInternalId from PerformanceSource PS
left join PerformanceDataAllView PDA on PDA.PerformanceSourceInternalID = PS.PerformanceSourceInternalId
where PDA.PerformanceSourceInternalId IS NULL
)

Note If you want to see which performance counters will be deleted for what objects before you run the delete script that is listed before, first run the following script:

Use OperationsManager select PS.PerformanceSourceInternalId, BME.BaseManagedEntityId, BME.DisplayName, PC.CounterName, PC.ObjectName, PS.TimeAdded, PS.LastModified, PDA.PerformanceSourceInternalId from PerformanceSource PS left join PerformanceDataAllView PDA on PDA.PerformanceSourceInternalID = PS.PerformanceSourceInternalId join PerformanceCounter PC on PC.PerformanceCounterId = PS.PerformanceCounterId join BaseManagedEntity BME on BME.BaseManagedEntityId = PS.BaseManagedEntityId where PDA.PerformanceSourceInternalId IS NULL