Submit a ticketCall us

AnnouncementsFace your biggest database issues head-on

Our new eCourse helps you navigate SQL Server performance blocks by teaching you how to recognize and deal with the three DBA Disruptors: Performance Hog, Blame Shifter, and Query Blocker. Register today to learn how to defend your environment and fend off menacing disruptions.

Register for your free eCourse.

Home > Success Center > Database Performance Analyzer (DPA) > DPA - Knowledgebase Articles > DPA and WMI metrics collection from SQL server

DPA and WMI metrics collection from SQL server

Table of contents

Updated September 7, 2017


DPA collects many metrics from the servers it monitors. 

Historically, versions of DPA would run some SQL on start up that would enable OLE Automation procedures to collect metrics from WMI. This article discusses the WMI metrics and how they were enabled in each version of DPA. 



  • DPA versions 9.2 and below
  • DPA version 10.0 
  • DPA versions versions 10.1


WMI metrics collection

IN DPA versions 10.0 and below 

The following statements always run when DPA connects to a non-RDS SQL Server instance:

exec sp_configure "show advanced options", 1
exec sp_configure "ole automation procedures", 1
declare @WmiServiceLocator int, @WmiService int
exec sp_OACreate 'WbemScripting.SWbemLocator', @WmiServiceLocator output, 5
exec sp_OAMethod @WmiServiceLocator, 'ConnectServer', @WmiService output, '.', 'root\\\\cimv2'
exec sp_OADestroy @WmiService
exec sp_OADestroy @WmiServiceLocator



  • In DPA 9.2 and earlier, these statements enable WMI-based resource metric collection, which is required.
  • In DPA 10.0, WMI-based resource metric collection is no longer required. However, the statements above still run when DPA connects to a non-RDS SQL Server instance.
  • In DPA 10.1 and later, the above statements are only run if the SQL_SERVER_WMI_METRICS_ENABLED advanced option is set to TRUE and DPA connects to a non-RDS SQL Server instance. This is found by clicking Options -> administration tab -> Advanced options -> DB instance options -> Select the instance from the drop down menu -> check the "support Options" check box. Look for SQL_SERVER_WMI_METRICS_ENABLED. These metrics were disabled because at times we would see the sessions from the SQL server and WMI orphan out and the monitoring would stop in DPA. DPA caps the connections to the SQL server to 10 by default. 


Last modified