Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors

If you are installing SQL Server 2008 (or anything for that matter) and it won't let you continue for the following reason:

Rule "Performance counter registry hive consistency check" failed. The performance counter registry hive is corrupted.

What does this mean?

This may mean that the value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib under Last Counter and the last number value in Counter under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009 are not the same. The same also for Last Help and Help.

image

registry shot

 

In this example, 4720 is the number in both Last Counter and the last counter value. However, in my case my HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009 looks like this:

missing Counter and Help

 

 

How Do You Solve this Problem?

This fix only applies if HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009 has no values and you can not add any.

009 is the English Locale ID.  You may have this problem with another locale where you have no values and cannot add any either. The same fix will apply.  I am trying to install on a virtual differencing disk that I have run NewSID against. 

I found myself in the Microsoft Forums (see reference #5), but no one had figured out how to fix my particular problem. One person came close but wasn't quite there. So I started searching for how to fix my performance counter problem.  Isn't it awesome that things that you don't really care about sometimes become issues with things you do?!

I found the solution and I wanted to share. I found that I had disabled performance counters and to have the Counter and Help registry values, I only needed to fix that and reload all of my counters.

 

Steps to Resolve Performance Counter Issues

1. Back up your registry.

2. Enable Performance Counters: Check the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib to see if you have the key Disable Performance Counters and it is set to 1. If so set it to 0. This should now allow you to build your Counter and Help registry items following the rest of the instructions.  (NOTE: You will not find this in any link I have referenced. This is the piece every set of instructions was missing.)

image image

3. Then you may or may not need to rebuild your performance counters (see reference #1). Try to see your performance counters (step #4 below). If you can't see any or you just see numbers, you will need to rebuild your performance counters. If you have Windows 2003, you can run the command line and put in these two commands:

cd %systemroot%\system32

lodctr /R

4. You know this has worked when you open your performance counters (Control Panel -> Administrative Tools -> Performance) and try to add and actually see items for your computer:

image

5. Try your install again.

6. If that doesn't work, you need to perform an in-place upgrade of Windows (see reference #4). Then follow the instructions above to rebuild the performance counters. You will also need to re-install all service packs for Windows after you do this.  The good news is that you don't lose your applications at all.

7. Once you have completed this, try to install the application you were originally trying to install.  In my case this is the monolithic SQL Server 2008.

References

1. http://support.microsoft.com/kb/300956  - How to manually rebuild Performance Counter Library values

2. http://support.microsoft.com/kb/888017 - Expanding a file off of the installation disk.

3. http://support.microsoft.com/kb/315083 - A SQL Server Desktop Engine 2000 installation fails when it tries to register Performance Monitor counters

4.  http://support.microsoft.com/kb/816579/ - How to Perform an In-Place Upgrade of Windows Server 2003

5. http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3231101&SiteID=17 - Re: How to resolve "Performance counter registry hive consistency check" failed?

Other References:

http://channel9.msdn.com/forums/TechOff/59699-perfmon-counters-are-corrupted/

http://support.microsoft.com/kb/275659

http://www.agileprogrammer.com/oneagilecoder/archive/2005/05/30/3502.aspx - If you see numbers instead of names

http://blogs.msdn.com/astebner/archive/2004/08/13/214220.aspx - A fix that didn't work for me.

Other Notes

Also you realize that you need step 2 when you try to run the "lodctr /R" command and you get a bunch of errors in your event log with this one warning:

Event Type:    Warning
Event Source:    LoadPerf
Event ID:    3006
Description:
Unable to read the performance counter strings of the 009 language ID. The Win32 status returned by the call is the first DWORD in Data section.

Print | posted @ Sunday, August 10, 2008 5:21 PM

Comments on this entry:

Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Kevin P. Rice at 8/16/2008 4:56 AM

IMPORTANT for Vista users: Before going through ALL the steps, just open command prompt and try:

lodctr /R

THE CATCH that sunk me is that when opening Command Prompt you MUST right-click and "Run as Administrator"!!!!

If you don't, you will get "Error: Unable to rebuild performance counter setting from system backup store, error code is 5"

Remember: Run as administrator!!!
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Joe B at 8/28/2008 11:08 AM

I live with GLINT - I am an old shop hack and need to see my counters - dead now since trying to "upgrade" to winxp SP3 - I've tried their directions in the past, gave up, went to ERUNT to simply restore a registry from when it worked. Well, one thing, "lodctr /R" fails on winxp pro - it seems to require an argument. Geesh.. I guess I'll try another couple of times (takes forever with reboots and all) then give up, hope that SP3 didn't do too much damage, go back to a working registry and redo the last 5 days of "simply" putting in SP3 -- again.... ARG!!
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Kevin P. Rice at 8/28/2008 4:43 PM

Joe B-- Just a thought: Did you try "System Restore" to take your machine back to a prior "Restore Point"?
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Robz at 8/28/2008 7:31 PM

@Joe B: I had to go look up GLINT (http://www.scitechconcept.com/glint.html). That or ERUNT (http://www.larshederer.homepage.t-online.de/erunt/). Those look like some interesting tools I will have to check out!
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Robz at 8/28/2008 7:32 PM

@Kevin: Thanks for the original catch on Windows Vista!
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Gianni Lepri at 10/16/2008 7:06 AM

Bang on, thank you! My SQL 2003 server had just numbers on the counters list and lodctr /R
built them back in a couple of minutes.
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Steve at 12/20/2008 10:32 PM

Thanks, step 2 worked for me.
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Humayun Lone at 2/17/2009 3:28 PM

Thank you million times. You saved me from a lot of trouble.
Best regards.
H. Lone
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by anon at 3/6/2009 7:10 AM

Thanks a lot!!!!!!!!!!!
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Eric at 3/21/2009 3:23 PM

Thanks, my installation of Autodesk Inventor was getting hung up because of this one issue, but simply opening CMD and typing lodctr /R fixed everything. Amazing, absolutely amazing.
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Lea Verou at 4/13/2009 2:46 PM

Thank you sooooo much!!! :D
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Panneer at 4/30/2009 11:07 AM

Rule “Performance counter registry hive consistency” failed.
The performance counter registry hive is corrupted. To continue, you must repair the performance counter registry hive. For more information, see http://support.microsoft.com/kb/300956.

This issue can be easily fixed by type the following command in Command Prompt window.

lodctr /R:PerfStringBackup.INI

Its work for me on Xp.
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Robz at 4/30/2009 8:47 PM

Thank you Panneer. You will notice that the link you gave me was already in my post.

Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Someone at 7/26/2009 7:40 AM

Thank you a lot and it's worked for me..... what I did is just step 2 (changed 1 to 0) Thank you so much :-)
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Mark at 8/3/2009 6:57 PM

Good God! it worked.

Thank You!
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Alex at 10/11/2009 7:01 PM

while this pushed me in the right direction for me it did not work.

I work on an dutch XP SP3 machine and could not get the management studio working.
I used the REGMON tool to see what hive it looked for in the registry and discovered it missed the 013 folder under PERFLIB not 009.
All i did was copy the keys and values under 009 to 013 and it worked.
I log this hoping someone else will find this usefull
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Robz at 10/12/2009 4:12 AM

Alex: That's why I have this in the instructions:
"009 is the English Locale ID. You may have this problem with another locale where you have no values and cannot add any either. The same fix will apply"
Gravatar # re: Possible Performance Counter Corruption Or Performance Counters are Just Disabled | SQL Server 2008 Installation Errors
by Roidster at 11/25/2009 9:00 AM

THANKS

I had worked through every web fix I could find on this, (including http://support.microsoft.com/kb/300956) and they were all missing the small point that you noticed- the 'disable performance counters' being set to 1 in the registry! Changed to a '0', rand lodctr /R and then re-attempted SQL2008 setup and voila!

Many, Many Thanks
Comments have been closed on this topic.