We just set up PRTG to evaluate it. Added a SQL Server and after enabling WMI firewall rules, the auto-discovery worked fine and added a few sensors.

However, when we try to manually add the WMI Microsoft SQL Server 2016 sensor, we get the error:

8004100E: The namespace specified could not be found

Version is PRTG Network Monitor 22.3.79.2108 x64 running on Windows Server 2019 Datacenter


Article Comments

Hello,

each SQL server version uses a different WMI namespace. The question would be if the SQL Server 2019 does work, or not.


Sep, 2022 - Permalink

Hi, I have tried 2014, 2016 and 2019 sensors, they all throw the same error. The actual SQL version on the server is 2016.


Sep, 2022 - Permalink

Hello,

for checking, please use the WMI Tester, and set the namespace to root\Microsoft\SqlServer\ComputerManagement13

Then, use the tab "Advanced" to paste this custom query:

SELECT ServiceName, DisplayName FROM SQLService WHERE SQLServiceType = 1

Do you get a result table or an error?


Sep, 2022 - Permalink

Hi, I just completed this test and get the exact same error as mentioned above


Sep, 2022 - Permalink

Hello,

in that case, the sensor cannot work, and the issue cannot be fixed through PRTG.

Please check if you can repair the WMI instances.


Sep, 2022 - Permalink

So I used the following command to see the actual namespaces containing *SqlServer*:

Get-WMIObject -Namespace root -ClassName *SqlServer* -list -recurse -EA 0

Turns out, the namespace we have on this server is ComputerManagement14, not 13 as mentioned above:

root\Microsoft\SqlServer\ComputerManagement14

Using that namespace in the utility, it works. So can the sensor be forced to use that namespace instead?


Sep, 2022 - Permalink

So it turns out it was SQL 2017 on that server, and that sensor does work.

We have a SQL 2014 Server and that sensor still doesn't work, but we the error:

"The specified class is not valid"


Sep, 2022 - Permalink

Hello,

for this please copy the ServiceName property, then change the namespace back to root\cimv2 and run:

SELECT Name, UserConnections, LoginsPersec, Timestamp_Perftime , Frequency_PerfTime, LogoutsPersec FROM Win32_PerfRawData_ServiceName_SqlServerGeneralStatistics

"ServiceName" has to be replaced with the actual name.

Does that work?


Sep, 2022 - Permalink