An odd error popped up the other day while configuring alerts on one of the development boxes:
Msg 14262, Level 16, State 1, Procedure sp_verify_performance_condition, Line 46 The specified object_name (‘SQLServer:General Statistics’) does not exist.
For some reason or another the installation of SQL Server had failed to correctly load the SQL Server performance counters.
Open a cmd window and navigate to the binn folder of the SQL Server installation folder. There should be a file there called sqlctr.ini. Remove the existing counters by running:
or for a named instance:
unlodctr MSSQL$'instance name'
Now reload the counters:
Restart the SQL Service.
If this didn’t work, you could have a corrupted sqlctr.ini file, copy one from a working SQL Server installation, replace the corrupt one and rerun the above steps.