On one of the Servers hosting SQL Server, the Performance Objects for SQL Server were missing in perfmon. Here is what was done to fix it.
Open Command Prompt and type
cd c:\windows\system32 lodctr /S:C:\PerfCounterBackup.ini
The “lodctr /S” is to backup the existing performance counter, in case of a disaster. After that entered the below command to load the SQL Performance Objects from the sqlctr.ini
lodctr /R:C:\Program Files\Microsoft SQL Server\MSSQL\Binn\sqlctr.ini
If for any reasons, the objects loaded above needs to be unloaded, the following command needs to be issued.
The MSSQLServer is the driver parameter in the unloctr command. If the Performance objects for a named instance needs to be unloaded, then the command will be