HI guys, I get the following error when trying to use ANY of the SQL sensors:

Class(es) not found: "Win32_PerfRawData_MSSQLSERVER_SQLServerGeneralStatistics"

The same server has 25 other sensors all running fine (many of which are WMI), and I have used the SQL sensors successfully on other servers.

Any ideas?


Article Comments

Hello,

that might be a problem on the target hosts WMI, please see if you can fix it with any of the tips from our "WMI Repair"-article: WMI Repair List and please try the suggestions in this post.

best regards.


May, 2011 - Permalink

Thanks, I have already checked that list but this issue is not related to a WMI problem as many other sensors that are using WMI on the same box are working just fine.

I am only seeing this error with the SQL sensors on this one box.


May, 2011 - Permalink

It still possible that only the WMI Classes for the SQL-Server are missing or not correctly set up, which the error-message kind of suggests "Class(es) not found: "


May, 2011 - Permalink

I am having the exact same issue. Is there is a quick fix to get the WMI classes for SQL working? I know the proper services are running and I tried to execute the following command within the SQL server:

mofcomp "c:\Program Files (x86)\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof"
Microsoft (R) MOF Compiler Version 6.0.6000.16386
Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
Parsing MOF file: c:\Program Files (x86)\Microsoft SQL Server\90\Shared\sqlmgmpr
oviderxpsp2up.mof
MOF file has been successfully parsed
Storing data in the repository...

Need help, very annoying.

Thanks! Done!


Jun, 2011 - Permalink

Same issue here. SQL WMI counters working fine from PRTG Probe Server using PerfMon under the same credentials, but throws this error when used within PRTG.

Any suggestions?


Jul, 2011 - Permalink

Same problem here! Cannot monitor my SQL Database!


Jul, 2011 - Permalink

Our research shows some inconsistencies of how Microsoft is naming the classes depending on SQL Server Edition, Windows Version, Instancing. We're still investigating this matter.

However, if you want to help us in this case, please use Microsofts WBEMTest tool and try to find the classes concerning the MSSQLserver you want to monitor.

If successful please send your findings including a short description of your SQL Server System (SQL Server Edition, Windows Version, Instancing, Service Pack Levels etc.) to support@paessler.com - we appreciate any input.

Kind regards,

- Volker


Jul, 2011 - Permalink

I finally had time to dig into this a bit and the fix (for me) was quite simple...

The SQL instance naming scheme we use has underscores in it, apparently Windows removes the underscore when assigning the WMI class but PRTG doesn't.

My SQL server\instance look like this: ProdSQLSvr01\SQL_Instance_DB The WMI class needed to be manually set for: Win32_PerfRawData_MSSQLSQLINSTANCEDB_MSSQLSQLINSTANCEDB

Once I did this magic happened and it started working.


Aug, 2013 - Permalink

A recent .NET update has broken this sensor for us. It was working until this update was applied to the system running SQL Server. Has anyone else experienced this?


Sep, 2016 - Permalink

The 'recompile MOFs option' worked for me after a .NET update on the SQL server. Open a command prompt window (Run as Administrator) and change directory (cd) to %windir%\System32\wbem on 32bit Windows or %windir%\SysWOW64\wbem on 64bit Windows Enter the following commands: FOR /f %s in ('dir /b /s *.dll') do regsvr32 /s %s Net stop /y winmgmt FOR /f %s in ('dir /b *.mof *.mfl') do mofcomp %s Net start winmgmt


Sep, 2016 - Permalink

Hi Mark,

Great, thanks for sharing! Cheers!


Sep, 2016 - Permalink