How to rebuild performance counters on Windows Vista/Server2008/7/Server2008R2

安装SQL Server 2008时出现:

Err: performance counter registry hive is consistent

下面是英文解决方法

Windows Vista
Windows Server 2008 Service Pack 1
Windows Server 2008 Service Pack 2
Windows 7
Windows Server 2008 R2

When some or all your counters show up as numbers

or

When your counters do not show up

or
Event Type: Error 
Event Source: Perflib 
Event ID: 1008 and others

In Windows 2000, Windows XP and Windows Server 2003, if you wanted to rebuild the base O.S. performance counters you had to go thru:
300956 How to manually rebuild Performance Counter Library values 
http://support.microsoft.com/?id=300956

or use a tool such as exctrlst.exe to try disabling to see what counter had issues.
Windows 2000 Resource Kit Tool : Extensible Performance Counter List (exctrlst.exe)
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7ff99683-b7ec-4da6-92ab-793193604ba4

In Windows Vista/Server 2008 and higher, a very easy command to get your base O.S. performance counters working:

Click on Start, CMD (evelated as an Administrator)
Type "C:" without the quotation marks and Enter.
Type "CD\windows\system32" without the quotation marks and Enter.
Type "LodCtr.exe /S:Backup_Original.INI" without the quotation marks and Enter.
Note: This let's you backup the performance counters before we rebuild.
Type "LodCtr.exe /R:PerfStringBackup.INI" without the quotation marks and Enter.
Open up Perfmon and check to see if your counters are showing up properly.

========================================================

当然,我按照上面步骤做了之后,依然不行,后来想想,应该是语言版本问题,尝试如下方法:

在注册表中找到下面项目:

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

0804表示简体中文。其下为空。建立多字符串类型的Counter和Help字段。

009表示英文,其下有Counter和Help字段。

将HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009 中的Counter和Help的内容复制到0804的Counter和Help中。

同时,确保HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib下的LastCounter的值与0804的Counter中的最大值一样。

以及HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib下的LastHelp的值与0804的Help中的最大值一样。

完成,即可通过SQL Server检查。

你可能感兴趣的:(performance)