Blog Post

SQL Server Support Blog
1 MIN READ

SQL Server Performance Counter are Missing

YueJ_7's avatar
YueJ_7
Icon for Microsoft rankMicrosoft
Mar 23, 2021

If you find the SQL Server related performance counter objects are missing, you can try below steps to get it back

 

For example, my instance name is STD2016, and now open the command window with Administrator

 

1. Unload the counters. 

  a. Open Command Prompt

  b. Change directory (cd) to the \Binn folder of your instance, by default, the folder path should be

  C:\Program Files\Microsoft SQL Server\MSSQLXX.INSTANCENAME\MSSQL\Binn

  c. And then run unlodctr command, if you are using the default instance, just use:

 

unlodctr MSSQLSERVER

 

For me,  it is unlodctr MSSQL$STD2016, the format is MSSQL$INSTANCENAME

 

2. Load the perfmon counters. 

  a. Under the \Binn folder you will see a file that begins with "perf-MSSQL$", the name format is perf-MSSQL$INSTANCENAMEsqlctr.ini.

  b. Run the following command to load the counters for a default SQL instance:

 

lodctr perf-MSSQLSERVERsqlctr.ini

 

In my case I was using a named instance:

 

lodctr perf-MSSQL$STD2016sqlctr.ini

 

3. Restart the remote registry key service

 

NET STOP "Remote Registry" & NET START "Remote Registry"

 

4. Close Performance Monitor and open it again, you will be able to see the counters:

 

 

Updated Apr 15, 2021
Version 4.0

2 Comments

  • samuel_300's avatar
    samuel_300
    Copper Contributor

    Dear Yue Ji, good afternoon.

    Thank you very much for your explanation.

    Following your explanation and some articles, I managed to apply the fixes to some of our clients.

    However, in a client of ours, there is no perf-MSSQL$INSTANCE_1sqlctr file

    How should I proceed to fix this problem?

    I thank.

     

     

  • samuel_300's avatar
    samuel_300
    Copper Contributor

    Dear Yue Ji, good afternoon.

    Thank you very much for your explanation.

    Following your explanation and some articles, I managed to apply the fixes to some of our clients.

    However, in a client of ours, there is no perf-MSSQL$INSTANCE_1sqlctr file

    How should I proceed to fix this problem?

    I thank.