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 ;)

Comments

Grigory wrote 1/14/2011 at 1:27 PM Thank you, thank you, thank you !
safor wrote 1/14/2011 at 2:59 PM You are welcome, Grigory!
Anders wrote 3/8/2011 at 10:26 PM I repeat: Thank You, Thank You, Thank You!
Kulle wrote 5/11/2011 at 6:34 PM Thank you so much. I spend several hours with this problem before I found your solution.
Yauhen wrote 5/11/2011 at 10:57 PM I am glad this information was helpful for you, Kulle.
philipp wrote 7/13/2011 at 4:19 PM Thanks again. This was it! I thought, I would have a normal English version of W7 after I changed all the language settings... seams not to be the case.
Yauhen wrote 7/14/2011 at 9:31 AM you're welcome, philipp.
tm wrote 9/19/2011 at 11:31 AM Thanks, i was searching solution for this about an hour.
Btw Finnish version for the key is 00B.
Yauhen wrote 9/19/2011 at 3:10 PM good to know. thanks.
Mashhur wrote 1/5/2012 at 9:03 AM Thank you mate, I did everything what is written here. But I can't copy values from Counter and Help to my 005. It says it can't copy data, becoz it is being used by the system or other programs. I surfed all the web to solve this problem but it doesn't help me unfortunately.
Yauhen wrote 1/5/2012 at 10:15 PM Mashhur, you may try checking/editing permissions on those registry keys.

Run the regedit.exe with administrator privileges, right click the registry key and select Permissions, check that your account has the access.

I would also try to start the operation system in the safe mode and edit the registry.

Good luck!
Ognjen wrote 2/27/2012 at 2:04 PM Thank you Yauhen.
Serbian (Latin) version for the key is 7C1A.
Yauhen wrote 2/27/2012 at 5:04 PM Good to know, Ognjen. I am glad you found the post useful.
AJ wrote 3/22/2012 at 12:13 AM Thanks. I had to copy Counter and Help from CurrentLanguage to 009. That did the trick.
Thanks.
Cristo wrote 4/27/2012 at 3:06 PM Hi everyone, I have the same problem when I try install SQLserver 2008. When I try change the registry entries, I don´t have permissions. I have already tryed run regedit as admin and started windows in safe mode and yet W7 dont let me change the files.

Any sugestions ???
Cristo wrote 4/27/2012 at 3:58 PM Problem solved. I followed this topic and did only step 1 and 2 (copyed the 009 file to 016 (my case) and add it(016) to the Perflib)...

good luck
Cristo wrote 4/27/2012 at 4:00 PM www.ninjacoding.net/.../...sistency-check-sql.aspx

link here
Yauhen wrote 4/28/2012 at 8:00 AM Cristo, thank you for sharing the link and I am glad to know you solved your problem.
Utku Ozan CANKAYA wrote 5/4/2012 at 2:40 PM Your solution solved all my problem which I have been suffering for the whole day without any progress. Thank you very much for your ffort.

P.S. For Turkish it is "01F"
Mohamed wrote 5/30/2012 at 10:57 AM Thank you very much. I had the issue right now, installing SQL 2008 R2 on SBS 2011 Dutch verion.

Copied the regkeys for the Dutch version (code 013) en re-run the pre install check en now it is oke.

Thx for sharing!
Yauhen wrote 5/30/2012 at 1:06 PM You are welcome, Mohamed!

What's strange that the issue is marked as "Closed as Fixed" on the Microsoft Connect site, but still people encounter it. Probably you have an old distributive.
Sergey wrote 5/31/2012 at 1:38 PM Thank you so much!!! The only one solution that helps!
Chtor wrote 7/31/2012 at 12:52 PM Work for me on Windows 7 CZ with SQL Server 208 R2.

Great post! Save me a lot of time.
Pavel wrote 11/15/2012 at 10:05 AM Super, konečně pořádná rada, která funguje.

Díky!
tiag0 wrote 1/29/2013 at 11:06 PM THANK YOU!

I could kiss you right now.

PS: Spanish international is 00A