SQL Server Developer Center > SQL Server Forums > SQL Server Setup & Upgrade > How to resolve "Performance counter registry hive consistency check" failed?
Ask a questionAsk a question
 

AnswerHow to resolve "Performance counter registry hive consistency check" failed?

  • Wednesday, November 21, 2007 4:52 AMChrisTorng Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I want to install SQL Server 2008 November CTP Developer Enu. When "System Configuration Check" it shows:

    Rule "Performance counter registry hive consistency check" failed.

    The performance counter registry hive is corrupted.

     

    And cannot continue installing. How to solve this problem?

Answers

  • Wednesday, April 16, 2008 5:08 PMAaron [MCP] Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    If you were like me and had no values in "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Perflib\009", and was unable to add any.  You might try the knowledge base below, it worked for me.  Now running SQL Server 2008 November CTP on Windows XP SP2.  Hope this helps.

     

    How to manually rebuild Performance Counter Library values

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

All Replies

  • Friday, November 23, 2007 10:55 AMdgdba Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Me too...I Install nov 2008 on Win XP SP2....

     

    How to resolve,MS answer me!

  • Wednesday, January 16, 2008 5:20 PMKane Liu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Me, too...

     

    Who can help us to resolve this trouble? I tried to install it at Windows Server 2008 RC 1 (CHN), and I already (& only) have Visual Studio 2008 Beta2 (CHN) installed.

  • Thursday, February 07, 2008 11:41 PMScott Ma Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    TEMP WORKAROUND:

     

    Ok, I have the same issue after I have to do a system restore and was trying to reinstall SQL Server 2008 Nov CTP. I guess the perflib counter was a bit mess up. I read a couple of post and the offical Microsoft answer is reinstalled your OS. But for people like you and me, we're installing CTP to play with the new features, the last thing I wanted to do is to spend next 2 days to reinstall the whole stack. So, this is a temp workaround, just enough to let you install the Katmai.

     

    1) The installation tried to look at this registry key. It does a calculation on Last Counter and Last Help. So, use tools like Regmon to figure out which key it is trying to read. Here is a number of possibility based on your OS version.

     

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\4040

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\7C40

     

    2) Once you figure out which key it is (my key for XP is 009). Open the text value of

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009\Counter and scroll to the second last line. You will see a number like this, write down the number. This is the Last Counter number the system uses

    e.g.:

    11838
    Cumulative Guest Run Time

    3) do the same for

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009\Help and write down the number. This is the Last Help number the system uses

     

    e.g.:

    11839
    The guest run time represents the number of microseconds the .....

     

     

    4) Now go to

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\Last Counter

     

    Put the number from (2) as the new value of Last Counter

     

    5)

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\Last Help

     

    Put the number from (3) as the new value of Last Help

     

     

    Now, you should be able to pass the SQL Server 2008 Installation. Got your perfmon counter messed up is a sign that something else is corrupted.

     

     

    Scott Ma

  • Tuesday, April 08, 2008 11:23 AMinnai Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thank you so much, i was looking for long time what they meen "max value" for theses keys.

  • Thursday, April 10, 2008 12:38 AMEvok-pt Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Win VISTA: Doesnt work and i've done exactly the things you sugest. What else can i do?!?!

     

    best regards

  • Wednesday, April 16, 2008 5:08 PMAaron [MCP] Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    If you were like me and had no values in "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Perflib\009", and was unable to add any.  You might try the knowledge base below, it worked for me.  Now running SQL Server 2008 November CTP on Windows XP SP2.  Hope this helps.

     

    How to manually rebuild Performance Counter Library values

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

  • Thursday, April 24, 2008 12:08 AMRafael Candido Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    Check out this arcticle:
    https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=312847
    It's quite helpful.

    Or, try this:
    Put this at any Console application:
    string.Format("{0,3}", CultureInfo.InstalledUICulture.Parent.LCID.ToString("X")).Replace(" ", "0");

    Watch the result. At mine it was "016".

    Then you go to the registry at this key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib

    and create another one with the name you got from the string.Format result. In my case:
    "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\016"

    and copy the info that is on any other key in this Perflib to this key you just created. Run the instalation again. Done!

    • Proposed As Answer byAbaddon Saturday, April 25, 2009 8:36 PM
    •  
  • Sunday, August 10, 2008 10:31 PMRobz Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thanks Aaron. You got me pointed in the correct direction.

    However there was something else I had to do that was not referenced anywhere.

     

    http://ferventcoder.com/archive/2008/08/10/possible-performance-counter-corruption-or-performance-counters-are-just-disabled.aspx

     

    I just found a solution I don't know if anyone else has seen yet. It has to do with having Performance Counters Disabled and many of the symptoms are the same.

     

    Basically if you try to load Performance counters (Control Panel -> Administrative Tools -> Performance) and you can not see any, it may mean you are having the same issues I was.

     

  • Wednesday, August 27, 2008 5:06 AMHuaMin Chen Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I've also got the failure of "performance counter registry hive consistency check".

    I've checked that I DO have the same value for Perflib.Last counter in comparison with the last value in Perflib.009.counter. Both are 8108. The former actually is '1fac' (but in decimal it's 8108). I also have the same value which is 8109 for both Perflib.Last Help and the last value in Perflib.009.Help. Both are 8109.

     

    Can any disabled services cause the problem? Any advice?

  • Friday, September 12, 2008 3:08 AMJaimir GuerreroMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I had the same problem with my VISTA ULTIMATE SP1 Spanish, and i resolved this problem with this https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=312847 instructions.

  • Sunday, September 14, 2008 8:43 PMClacby Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    For those using Vista Business (I have Spanish SP1 Version), below what worked for me:

    - I followed KB note 300956 already mentioned in this post. I have an OEM version of Vista and as I could not find the Perfc009.da_ and Perfh009.da_ in the recovery disk provided with the machine, I copied the files from an XP Pro machine.

    - I also copied the Counter and Help Registry entries from:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Perflib\009

     

    to:

     

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Perflib\00A (this entry was empty).

     

    Hope this help!

     

  • Sunday, September 21, 2008 8:57 PMalbert pokorny Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks a lot, Scott. It works! But I had to solve another problem before I used your solution. I found my keys in the path 009 somehow damaged. I couldn't see any "normal" number. Just non-readable text, it looked like ASCII code. So after an hour of thinking I tried to open my wife's notebook to see, how it looked in its registry. It was readable and I could see the normal number!

    I got an idea to copy it into my registry. I was affraid but I tried it! I re-ran setup rules in the installation of MSSQL Server and it works!!! So If you see text which looks like ASCII code, do not afraid to copy both registry items from another computer. And then follow the Scott's solution.

    But I'm still affraid of restarting Windows. I hope that Windows won't crash tomorrow when the system realises that I have cheated the registry!



    Thanks,
    Albert
  • Tuesday, November 11, 2008 8:38 PMNeoDio1 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Hello all, could you please take a look at my thread?

    http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=4104080&SiteID=17

     

    I've tried all possible solutions on this thread, on the microsoft help and support pages, and on other forums also linked on this thread.

     

    I still can't solve my problem and I've already reinstalled windows vista home premium x86 seven times, I'm really desperate since I really need MSSQL 2008 for work and I'm getting delayed.

     

    Thanks.

  • Friday, November 21, 2008 12:38 PMMårten Holm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    This is still a problem with the release version of SQL 2008. I use a Swedish version of XP. I tired the solutions described in this thread and I found my 009 key in registry but nothing was wrong with the counters.

    I then tried something else that I found in a blog somewhere that it had something to do with culture settings.

    This is how I solved my problem
    I created a simple console application in visual studio that did this

    Code Snippet

    string str2 = string.Format("{0,3}", CultureInfo.InstalledUICulture.Parent.LCID.ToString("X")).Replace(" ", "0");

    Console.Write(str2);

     

     

    It returned the value 01D on my computer

     

    I then opened the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib 

    and created a new key with the name 01D and then copied the information from

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009

    to my new key

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\01D

    After that the installation check was ok

    The problem seems to be that it checks the culture settings and use that when it wants to find the registry key and somehow the registry keys for this are not in sync with the culture settings and therefore the key is missing 

  • Thursday, April 02, 2009 4:50 PMRoberto Carlos Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi Marten, can you supply the app that you used, i new to this, and im facing the same problems to install sql 2008.

    thanks in advance
  • Wednesday, June 03, 2009 8:37 PMWade Salley Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    After spending an afternoon on this, I found that the referenced KB file is for Windows Server.  I was using XP, and perhaps some of the posters that the KB didn't fix their issue, might be running XP as well.

    I was unable to add values into my 009 folder like some of the above posters.  I exported both the 009 and perflib from my desktop to my laptop(the pc I was installing on).

    I first tried the 009 and then "re-run" and it still failed, after running the perflib.reg, it passed.

    After continuing through the screens, it did a version check of Visual Studio 2008(you have to have SP1 installed), and it failed.  A colleague had this issue as well, and he did some checking and found that the install is checking the wrong file.

    From this blog:  referenced blog

    You need to change this value:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VS\Servicing\9.0

    I changed mine to 9.0a, and then changed it back once installed.

    Hope this helps.
    • Edited byWade Salley Wednesday, June 03, 2009 8:38 PMforgot to complete a sentence
    • Edited byWade Salley Wednesday, June 03, 2009 8:39 PM
    •