Database Management
SQL Sentry Rebuild Counters
This article will guide on how to resolve an error indicating that Performance counters need to rebuilt.
First published date
Last published date
Overview
Product section
Cause
Resolution
Step-by-step guide: If client receives error indicating that Performance counters need to be rebuilt
- Make sure that you’re able to see the missing counters in Perfmon (check locally and remotely from the server hosting the monitoring service)
- If they’re not there, check the following path in the Registry (regedit.exe) for the “Disable Performance Counter” value: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER\PerformanceIf you are able to see and load the counters in Perfmon, a restart of the Remote Registry service may resolve the issue. If it doesn't, the counters could be corrupted and you may need to rebuild them
- If this value is present and is set to 1, change it to 0
- Restart the Remote Registry service on the target server
- Restart the SQL Sentry Monitoring service
- Open cmd prompt (Run as Administrator) and Change path to the SQLSERVER Binn directory
- Run “unlodctr MSSQLSERVER” for SSAS use "unlodctr MSSQLServerOLAPService"
- Run “lodctr perf-MSSQLSERVERsqlctr.ini” (if named instance, use the relevant .ini file from the Binn) For SSAS use " lodctr perf-MSSQLServerOLAPServicemsmdctr.ini"
- Restart the Remote Registry service
- Restart the Performance Logs and Alerts service
- Restart SQL Sentry Monitoring service
If you continue to have issues even after reloading the SQL Server counters, particularly missing Windows counters, follow the below steps to troubleshoot and rebuild the entire performance counter library.
- Make sure that you’re able to see the missing counters in Perfmon (check locally and remotely from the server hosting the monitoring service)
- If they’re not there, and the SQL Sentry client mentions the Physical Disk counter specifically, check the following path in the Registry (regedit.exe) for the “Disable Performance Counter” value: HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/PerfDisk/PerformanceIf you are able to see and load the counters in Perfmon, a restart of the Remote Registry service may resolve the issue. If it doesn't, the counters could be corrupted and you may need to rebuild them using the following steps:
- If this value is present and is set to 1, change it to 0
- Restart the Remote Registry service on the target server
- Restart the SQL Sentry Monitoring service
- Open cmd prompt (Run as Administrator)
- Change path to: \windows\system32
- Run command: lodctr /R
- Once complete, restart the Remote Registry service and the SQL Sentry Monitoring Service