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
This article helps you work around the problem that occurs when you open SQL Server Configuration Manager.
Original product version: SQL Server
Original KB number: 956013
You may receive one of the following error messages when you open SQL Server Configuration Manager:
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 SQL Server Configuration Manager.
Invalid namespace [0x8004100e]
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 SQL Server Configuration Manager.
Invalid class [0x80041010]
SQL Server Configuration Manager use Window Management Instrumentation (WMI) to view and change some server settings. When connecting to servers, SQL Server Configuration Manager uses WMI to obtain the status of the SQL Server (MSSQLSERVER) and SQL Server Agent services. This problem occurs because the WMI provider is removed when you uninstall an instance of SQL Server.
This file is located in the
You can use one of the following options to solve the problem.
Option 1: Recompile SQL WMI provider using mofcomp (Managed Object Format (MOF) compiler)
Use the following procedure:
The MOF file (sqlmgmproviderxpsp2up.mof) for your SQL instance is found in "%programfiles(x86)%\Microsoft SQL Server\nnn\Shared” folder. Determine the location of the mofcomp file for your version using the following table as a reference:
Version nn Microsoft SQL Server 2019 150 Microsoft SQL Server 2017 140 Microsoft SQL Server 2016 130 Microsoft SQL Server 2014 120 Microsoft SQL Server 2012 100 Microsoft SQL Server 2008 R2 100 Microsoft SQL Server 2008 100 Microsoft SQL Server 2005 90
Open an elevated command prompt, and change the directory to the folder location from Step1.
Then type the following command, and then press ENTER:
For this command to succeed, the Sqlmgmproviderxpsp2up.mof file must be present in the
%programfiles(x86)%\Microsoft SQL Server\nnn\Sharedfolder.
After you run the mofcomp tool, restart the WMI service for the changes to take effect. The service name is Windows management Instrumentation.
Option 2: Repair your SQL Server installation. For further information review Repair a Failed SQL Server Installation
This option is only required if the sqlmgmproviderxpsp2up.mof is missing from the
%programfiles(x86)%\Microsoft SQL Server\nnn\Shared location.