SQL Server Configuration Manager Cannot Connect to WMI Provider

By:   |   Updated: 2011-06-08   |   Comments (19)   |   Related: > Install and Uninstall


Problem

I am getting this 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 the SQL Server Configuration Manager. Invalid namespace[0x80041010]" when trying to launch SQL Server Configuration Manager. I have been uninstalling some SQL Server instances on my machine. Could this have contributed to the issue? Check out this tip to learn more.

Solution

I have seen this 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 the SQL Server Configuration Manager. Invalid namespace[0x80041010]") 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.

Here is a screen shot of the error:

sql server configuration manager error message

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.

The WMI (Windows Management Instrumentation) provider is a published layer that is used with the SQL Server Configuration Manager snap-in for Microsoft Management Console (MMC) and the Microsoft SQL Server Configuration Manager. It provides a unified way for interfacing with the API calls that manage the registry operations requested by SQL Server Configuration Manager and provides enhanced control and manipulation over the selected SQL Server services. 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.

Next Steps


sql server categories

sql server webinars

subscribe to mssqltips

sql server tutorials

sql server white papers

next tip



About the author
MSSQLTips author Manvendra Singh Manvendra Singh has over 5 years of experience with SQL Server and has focused on Database Mirroring, Replication, Log Shipping, etc.

This author pledges the content of this article is based on professional experience and not AI generated.

View all my tips


Article Last Updated: 2011-06-08

Comments For This Article




Tuesday, May 17, 2022 - 12:10:00 PM - Narendar reddy Back To Top (90095)
Issue resolved Thank You!

Monday, December 17, 2018 - 12:59:35 AM - Ketan Patel Back To Top (78507)

Thanks, This helped me. 


Sunday, November 12, 2017 - 5:57:08 AM - Paul Back To Top (69611)

 When I run the above in the command prompt as administrator I get the folliwng error message.

An error occurred while processing item 10 defined on lines 73 - 79 in file C:\Program Files (x86)\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof

 

Any suggestions on how I can sort this out.... all help appreciated

 


Thursday, September 28, 2017 - 9:43:42 PM - Ron Back To Top (66700)

 I got that error even though we uninstalled nothing.  The machine might have crashed, though.

 


Monday, July 31, 2017 - 4:26:10 PM - RJW Back To Top (63646)

for benefit of others, the path on my machine was

 

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

 

note I also had to run CMD in administrator mode

 


Monday, January 23, 2017 - 6:14:40 AM - Ashish Back To Top (45487)

 

 Worked for me Also....Thanks a lot.

Thanks,

Ashish


Saturday, December 10, 2016 - 4:18:01 PM - AHMED Back To Top (44943)

 

 

CANNOT CONNECT TO WMI PROVIDER YOU DO NOT HAVE PERMISSION OR THE SERVES IS [0x80041010]


Thursday, October 23, 2014 - 4:50:26 AM - spice80 Back To Top (35041)

Worked like a charm. Thanks for sharing this tip. And for the explanation, why this error occurs. Cheers :)


Wednesday, September 10, 2014 - 7:51:53 AM - SanjeevBaranwal Back To Top (34469)

What if .mof file is not found.


Friday, September 5, 2014 - 6:05:17 AM - kapil Back To Top (34394)

I just installed SQL server 2008R2. I am a beginner. I 

want to connect to report server, and by opening Report Server Configuration Tool , I tried to input the serevr name as  SQL Server Express. that is name of Sql server in my PC, But unable to do it.  as the error comes 

 

" Unable to connect to the Report Server SQL Server Express  "

 

Please help

 


Thursday, March 20, 2014 - 5:14:36 AM - Sourav Jagati Back To Top (29820)

It works.  Thank you ......


Saturday, March 16, 2013 - 6:04:56 AM - vinay Back To Top (22826)

Hello ...my sql server 2008 is getting installed but with error,and i cannot connect to the databaase engine...

This is 5th time i did installed and uninstalled sql2008...

And to my notice i found that in "Sql Server Configuration Manager" The "Server services" shows

only "server Browser" -State = stopped; start mode = other;

rest of the options like Sql server Agent,sql server ,etc..arenot displayed...

I think it has been deleted mistakely by me .....& thus Errors are displayed..

 

Can These Deleted options be Restored,How I could get Database Engine Working !

Please reply!


Thursday, February 14, 2013 - 9:01:26 AM - Regis Back To Top (22120)

Worked for me, Thank you!


Thursday, January 10, 2013 - 10:21:10 AM - mkorthuis Back To Top (21374)

I am getting the same error and running the mofcomp.exe command fixes the issue for a day.  the next day I go back to this server and the same error occurs.  My question is what would cause the error to continually come back and force me to run the mofcomp command repeatedly?


Monday, January 7, 2013 - 12:17:03 PM - tp Back To Top (21301)

Worked for me. Thanks for the tip!


Wednesday, October 17, 2012 - 8:12:14 AM - Graywolf Back To Top (19955)

Hello I get the following error when I attempt this procedure. Does anyone have a recommendation.

D:\Program Files\Microsoft SQL Server\100\Shared>mofcomp sqlmgmproviderxpsp2up.m
of
Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.5512
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: sqlmgmproviderxpsp2up.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while opening the namespace for object 1 defined on lines 4 -
7:
0X80041002 Class, instance, or property '' was not found.
Compiler returned error 0x80041002
D:\Program Files\Microsoft SQL Server\100\Shared>mofcomp.exe sqlmgmproviderxpsp2
up.mof
Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.5512
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: sqlmgmproviderxpsp2up.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while opening the namespace for object 1 defined on lines 4 -
7:
0X80041002 Class, instance, or property '' was not found.
Compiler returned error 0x80041002


Monday, July 16, 2012 - 12:21:13 PM - indrajeet sharma Back To Top (18544)

Hi

 

Please run command promt as administrator then access is denied error will remove

 


Thursday, May 3, 2012 - 10:46:28 AM - Manvendra Back To Top (17254)

Make sure you have full access to tht location..As error stated its access denied for the user which your are using.


Wednesday, May 2, 2012 - 2:00:31 PM - Punit Back To Top (17237)

Hi I am getting the below message when i try to execute the command . please give me solution for this.

 

C:\Program Files (x86)\Microsoft SQL Server\100\Shared>mofcomp "C:\Program Files
 (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"
Microsoft (R) MOF Compiler Version 6.1.7600.16385
Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
Parsing MOF file: C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmp
roviderxpsp2up.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while processing item 1 defined on lines 4 - 7 in file C:\Prog
ram Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof:
Error Number: 0x80041003, Facility: WMI
Description: Access denied
Compiler returned error 0x80041003















get free sql tips
agree to terms