Wednesday, March 10, 2010

Solution for "Impossible to log SQL 2008 performance counters under Windows 2008 64 bit?"

Alex Pinsker: Impossible to log SQL 2008 performance counters under Windows 2008 64 bit?


Here is solution, found by our DBA:
1. Open regedit.exe
2. Find the key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER\Performance"
3. Find the value named "Performance counters disabled"
4. Ensure, that its value is NOT "4" or "1". If it is - enforce it to "0"
5. Notice file name in value of "PerfIniFile" key and copy it to clipboard
6. Close the regedit
7. Open cmd and go to Binn folder of Sql Server installation. Usually in "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn"
8. Run the following commands:
8.1 unlodctr mssqlserver
8.2 lodctr [clipboard filename from (5.) above]
8.2.1 lodctr [clipboard filename from (.5) above]
(this only needs for sure, that counters are installed - there will be a message notifying on that)
8.3 lodctr /T:mssqlserver
9. Restart the server
10. Use perfmon to ensure, that counters for Sql Server reappeared

2 comments:

Anonymous said...

Thank you!! So many wrong solutions out there. Finally found this one and it worked.

Alex Pinsker said...

Yes, it was a tricky one, happy it was useful 4 u.