Share via

Performance Counters Collector Type

You can use the Performance Counters collector type to collect specific performance counter information from a computer that is running SQL Server 2008. You can use this data later as a baseline for troubleshooting or for capacity planning. This collector type is registered in the core.supported_collector_types view.

This collector type has the following input parameters:

  • Objects. The SQL Server objects running in an instance of SQL Server.

  • Counters. The counters associated with a SQL Server object.

  • Instances. The instances of the specified object.

For more information about objects and counters, see Using SQL Server Objects.


Some input parameters support wildcard characters, which enable you to include multiple counters in one statement. However, wildcard character support is limited. You cannot use a wildcard character at the Objects level. At the Counters and Instances levels, support is only provided for a wildcard character at the beginning of the string (for example, '* Processor') or at the end of the string (for example, 'Memory *').

Performance Counters Input Schema

The Performance Counters collector type uses the following schema for input parameters.

<xs:schema xmlns:xs="" targetNamespace="DataCollectorType">
  <xs:element name="PerformanceCountersCollector">
        <xs:element minOccurs="0" maxOccurs="unbounded" name="PerformanceCounters">
            <xs:attribute name="Objects" type="xs:string" use="required" />
            <xs:attribute name="Counters" type="xs:string" use="required" />
            <xs:attribute name="Instances" type="xs:string" use="optional" />
      <xs:attribute name="StoreLocalizedCounterNames" type="xs:boolean" use="optional" default="false" />

The following code example shows how to use the schema.

<ns:PerformanceCountersCollector xmlns:ns="DataCollectorType">  
      Counters="Lock *" 
      Objects="SQLServer:SQL Statistics" 
      Counters="% Processor Time" 

This example will result in counters for the "_Total" instance, with names that begin with "Lock", to be retrieved for the SQLServer:Locks object. It will also retrieve all instances of all counters that end with "/sec" for the SQLServer:SQLStatistics object. Finally, it will retrieve the "% Processor Time" counter for all instances of the Processor object.

Processing and Output

The Performance Counters collector type uses the collection and upload packages provided by the data collector. This collector type depends on the Performance Data Helper API for querying and obtaining data from performance counters. For more information, see Using the Performance Data Helper Library on MSDN.

When data collection is finished, the data collector bulk uploads the data to the snapshots.performance_counters view in the management data warehouse. For more information, see The Management Data Warehouse.