This week I encountered a nontrivial issue while installing SQL Server 2008 on Windows Vista Czech version with the user interface switched to English. At the beginning of the installation I got the error:

Rule "Performance counter registry hive consistency" failed

Rule Name: PerfMonCounterNotCorruptedCheck
Rule Description: Checks if existing performance counter registry hive is consistent.
Message: 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.

It took me long time to recognize and solve the issue. First of all, I started googling for a solution and got an impression that I am not alone. Some of proposed solutions were quite promising (like this one), but no one helped in my case. And then, being about to give up, I came along a bug description that finally explained to me what is going wrong.

In order to check the performance counter registry hive consistency, the installer compares four values from next registry keys:

  1. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\Last Counter" with the last value from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\{LCID}\Counter"
  2. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\Last Help" with the last value from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\{LCID}\Help"

where {LCID} is the system locale. For English version, it is "009", and for Czech one — "005".

As I have the Czech version of Windows Vista, but with English interface, the registry node "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\005" (corresponding to the Czech locale) was empty. I think it is a system issue, but not SQL Server's one.

In order to fix the issue, I had to manually copy the Counter and Help nodes from "...\Perflib\009" under "...\Perflib\005", and syncronize the "Last Counter" and "Last Help" keys with just copied ones. You can read more on this topic in this article.

If your original version of Windows is not Czech, you can use the Process Monitor to identify a registry key the installer tries to open.

Please, don't forget to make a copy of the system registry before you start to make any changes there. Just in case ;)