KBI 310201 Failed To Connect To HKEY_PERFORMANCE_DATA




20 Aug 2010


Performance counter data is not being properly collected, with the following log excerpts appearing in the Monitoring Engine log:

18 Aug 2010 11:47:49.668 SVR1 admin Failed to connect to HKEY_PERFORMANCE_DATA registry of 

                                    server SQLPROD-B1 

18 Aug 2010 11:47:49.668 SVR1 admin DETERMINED offline server 'SQLPROD-B1'

18 Aug 2010 11:47:49.668 SVR1 admin Error status returned from Perf Child Process for 

                                    performance Rule 'PRF_DISK_READ_BYTES_SEC' on server 

                                    SQLPROD-B1 (Return code = 30)

Technical Background

Argent uses the PDH (Performance Data Helper) API to retrieve performance counters.

There are several reasons why the above log excerpts may appear:

   * The server is down

   * The Remote Registry service is not enabled

   * A firewall is blocking the request

   * The Argent service account has insufficient rights or invalid credentials to the server

In all cases above, logging onto the Monitoring Engine using the Argent service account, and doing a simple REGEDIT test to connect to the remote computer’s registry will confirm if the above is true.

If the remote registry test passed, then the issue is likely related to the Relator checkbox, in the Basic tab:

Execute Performance Counter Routines In The Separate Processes

When UNchecked, all queries for performance counters are done within a shared process, where connection handles remain open for the time specified in the Administration section, under Monitoring Engines, “Time To Keep Performance Handles In Cache”. The default is 30 seconds.

When checked, all queries for performance counters are done in individual, isolated processes.

There is a Microsoft bug with the Microsoft PDH API, which originated from the early days of Windows 2000.

If PDH is run in a shared process, if a single query fails in the shared pool (server offline, performance counter doesn’t exist, etc.), then ALL queries in the shared process will fail.

The bug was reportedly fixed in Windows 2003, but seems to have resurfaced in Windows 2008 (confirmed for Windows 2008 R1 SP2)


To address this issue, set all Relators to check “Execute Performance Counter Routines In The Separate Process”.