Cannot connect to WMI (Windows Management Instrumentation) Provider

“Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 and later servers with the SQL Server Configuration Manager. Invalid namespace[0x80041010]”

sql server configuration manager error message


when you install a 32-bit version of Microsoft SQL Server 2008 on 64-bit machine and you install an 64-bit version of SQL Server 2008 on the same machine. If you uninstall any instances you will receive the error message when you open SQL Server Configuration Manager.

==> When we Install 32-bit version and 64-bit version of SQL Server on 64-bit operating system and if we uninstall any instances we will receive this WMI error when open SQL Server Configuration Manager.

==> This problem occurs because the WMI provider is removed when you uninstall an instance of SQL Server 2008. The 32-bit instance and the 64-bit instance of SQL Server 2008 share the same WMI configuration file.

This file is located in the %programfiles(x86)% folder.

How to Fix :

The SQL Server WMI Provider is a DLL and a MOF file, which are compiled automatically by SQL Server Setup.

Microsoft SQL Server provides the WMI Provider for Configuration Management. This lets you use Windows Management Instrumentation (WMI) to manage SQL Server services, SQL Server client and server network settings, and server aliases. SQL Server services, network settings, and aliases are represented by WMI objects in the root\Microsoft\SqlServer\ComputerManagement10 namespace of the computer. After a connection is established with the WMI provider on the specified computer, the services, network settings, and aliases can be queried using WQL or a scripting language.

To fix this problem, type the following in a Command Prompt window and then press ENTER:

mofcomp “%programfiles(x86)%\Microsoft\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof”

cmd window to fix error message in sql 2005 and later servers

Note: For this command to succeed, the sqlmgmproviderxpsp2up.mof file must be present in the %programfiles(x86)%\Microsoft\Microsoft SQL Server\100\Shared folder. If you do not see this file in above location then you can search this for this file on that server and then you can refer the new location in the command above.