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.
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:
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.)
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:
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.