How to Resolve: Cannot Connect to WMI Provider (SQL Server Configuration Manager)

How to Resolve: Cannot Connect to WMI Provider (SQL Server Configuration Manager)

How to Resolve: Cannot Connect to WMI Provider (SQL Server Configuration Manager)

In some cases where you might try to launch SQL Server Configuration Manager, you might get the error message: 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]

 

Is SQL Server Configuration Manager Really Needed?

Easy answer: of course it is!

Even though you can still control SQL Server services via Windows Services (services.msc), in order to have full control, you still need SQL Server Configuration Manager.

For example, if you want to set up SQL Server in order to use SSL certificate you need SQL Server Configuration Manager.

Moreover, if you want to change the network settings for your SQL Server services, again, you will need SQL Server Configuration Manager.

There are more examples that can justify the usefulness of SQL Server Configuration Manager but, I’m pretty sure you got the picture 🙂

 

Why I Got this Error Message?

If you performed several installations and uninstallations of SQL Server components on the machine, then under certain circumstances thi might cause the abovementioned issue with SQL Server Configuration Manager.

 

How to Get SQL Server Configuration to Work Again

As per Microsoft’s official support documentation, you can easily fix this issue.

So, in order to fix the issue, you can open an elevated command prompt (Run as Administrator) and execute the below command, after of course you replace “number” with the version of SQL Server in terms of number.

mofcomp "%programfiles(x86)%\Microsoft SQL Server\number\Shared\sqlmgmproviderxpsp2up.mof"

 

In order to find the right version number, please check the below table:

SQL Server Version Version Number
2017 140
2016 130
2014 120
2012 110
2008/R2 100
2005 90

 

So, if for example, you want to fix the SQL Server 2016 Configuration Manager, you would run the below command in an elevated command prompt (Run as Administrator):

mofcomp "%programfiles(x86)%\Microsoft SQL Server\130\Shared\sqlmgmproviderxpsp2up.mof"

 

Cannot Connect to WMI Provider (SQL Server Configuration Manager) - Article on SQLNetHub

 

An Alternative Way to Launch SQL Server Configuration Manager

Last but not least, there is an alternative approach to start SQL Server Configuration Manager. Again, from the command line, you can run the corresponding command for each SQL Server version as provided in the below table:

SQL Server Version Command
2017 SQLSERVERMANAGER14.msc
2016 SQLSERVERMANAGER13.msc
2014 SQLSERVERMANAGER12.msc
2012 SQLSERVERMANAGER11.msc
2008/R2 SQLSERVERMANAGER10.msc
2005 SQLSERVERMANAGER9.msc

 

Read Also

Feel free to check our other relevant articles on SQL Server troubleshooting:

 

Featured Database Productivity Tools

Snippets Generator: Create and modify T-SQL snippets for use in SQL Management Studio, fast, easy and efficiently.

Snippets Generator - SQL Snippets Creation Tool

Learn more

 

Dynamic SQL Generator: Convert static T-SQL code to dynamic and vice versa, easily and fast.

Dynamic SQL Generator: Easily convert static SQL Server T-SQL scripts to dynamic and vice versa.

Learn more

 

Subscribe to our newsletter and stay up to date!

Check out our latest software releases!

Check out Artemakis’s eBooks!

 

Rate this article: 1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Loading...

Reference: SQLNetHub.com (https://www.sqlnethub.com)

© SQLNetHub

Artemakis Artemiou
Artemakis Artemiou is a Senior SQL Server and Software Architect, Author, and a 9 Times Microsoft Data Platform MVP (2009-2018). He has over 15 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and TechHowTos.com. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Artemakis's official website can be found at aartemiou.com.