A new Flexera Community experience is coming on November 25th. Click here for more information.
If the SQL Server WMI provider cannot be accessed when the FlexNet inventory agent gathers inventory from a computer then a "SQL Server (Unknown component)" application may be the only SQL Server-related application that gets recognized as installed, and no application that identifies the installed SQL Server edition is recognized.
There can be a range of causes why the SQL Server WMI provider cannot be accessed, including the provider not being installed, or some problem in the WMI subsystem.
A Windows PowerShell command like the following can be executed (with local administrator rights) to attempt to perform similar WMI queries to those used by the FlexNet inventory agent during inventory gathering to identify the SQL Server edition.
Get-WmiObject -Namespace 'root\Microsoft\SqlServer' __NAMESPACE |
? { $_.Name -match 'ComputerManagement' } |
%{
$ns = "$($_.__NAMESPACE)\$($_.Name)"
Write-Host "Querying namespace $ns"
Get-WmiObject -Namespace $ns -Class SqlServiceAdvancedProperty -Filter "SqlServiceType = 1 AND PropertyName = 'SKUNAME'" |
Select PSComputerName, ServiceName, PropertyName, PropertyStrValue
Write-Host ""
}
Successful output from this script looks like the following:
Alternatively, the wbemtest tool can also be used to test the ability to query information from the SQL Server WMI provider:
SQL Server version | $namespace |
---|---|
2005 & earlier | root\Microsoft\SqlServer\ComputerManagement |
2008 | root\Microsoft\SqlServer\ComputerManagement10 |
2012 | root\Microsoft\SqlServer\ComputerManagement11 |
2014 | root\Microsoft\SqlServer\ComputerManagement12 |
2016 | root\Microsoft\SqlServer\ComputerManagement13 |
2017 | root\Microsoft\SqlServer\ComputerManagement14 |
2019 | root\Microsoft\SqlServer\ComputerManagement15 |
If any of the above steps fail, the FlexNet inventory agent is unlikely to be able to gather sufficient details to be able to recognize the installed edition of SQL Server.
The following page provides helpful guidance for remediating problems with the SQL Server WMI provider: Error message when you open SQL Server Configuration Manager in SQL Server: Cannot connect to WMI provider. You do not have permission or the server is unreachable
As described on that page, executing a "mofcomp" command similar to the following may be able to be used to configure the WMI provider:
SQL Server version | Command |
---|---|
2005 & earlier | mofcomp "%programfiles(x86)%\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof" |
2008 | mofcomp "%programfiles(x86)%\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof" |
2012 | mofcomp "%programfiles(x86)%\Microsoft SQL Server\110\Shared\sqlmgmproviderxpsp2up.mof" |
2014 | mofcomp "%programfiles(x86)%\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof" |
2016 | mofcomp "%programfiles(x86)%\Microsoft SQL Server\130\Shared\sqlmgmproviderxpsp2up.mof" |
2017 | mofcomp "%programfiles(x86)%\Microsoft SQL Server\140\Shared\sqlmgmproviderxpsp2up.mof" |
2019 | mofcomp "%programfiles(x86)%\Microsoft SQL Server\150\Shared\sqlmgmproviderxpsp2up.mof" |
For example:
It's possible to verify the Edition value stored in the SKUNAME property in WMI as well by running the following query after connecting to the namespace in wbemtest:
select * from SqlServiceAdvancedProperty where SQLServiceType = 1 AND PropertyName = 'SKUNAME'
If there are no problems accessing the SQL Server WMI provider, another possible reason why a SQL Server (Unknown component) application is recognized is that the ARL does not contain a rule to recognize your specific SQL Server details. Flexera Support will be able to help identify this situation if you share an inventory NDI file from an affected computer.
on Feb 12, 2019 11:42 PM - edited on Apr 12, 2022 07:51 PM by ChrisG
Does this fix work for SQL server 2017? If so what is the path for step4?
I need this solution too, please!