How to Resolve the ‘Cannot connect to WMI provider’ Error in SQL Configuration Manager
Cause
This problem occurs because the WMI provider is removed when you uninstall an instance of SQL Server. The 32-bit instance and the 64-bit instance of SQL Server share the same WMI configuration file. This file is located in the %programfiles(x86)% folder.
Workaround
To work around this problem, open a command prompt, type the following command, and then press ENTER:
mofcomp “%programfiles(x86)%\Microsoft SQL Server\number\Shared\sqlmgmproviderxpsp2up.mof”
Note For this command to succeed, the Sqlmgmproviderxpsp2up.mof file must be present in the %programfiles(x86)%\Microsoft SQL Server\number\Shared folder.
Example : mofcomp “%programfiles(x86)%\Microsoft SQL Server\140\Shared\sqlmgmproviderxpsp2up.mof”
The value of number depends on the version of SQL Server:nnn
Microsoft SQL Server 2012 | 110 |
Microsoft SQL Server 2008 R2 | 100 |
Microsoft SQL Server 2008 | 100 |
Microsoft SQL Server 2005 | 90 |
After you run the Mofcomp tool, restart the WMI service for the changes to take effect. The service name is Windows management Instrumentation.