Learn more about SQL Server tools

mssqltips logo
giveaway
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

 

SQL Server Configuration Manager Cannot Connect to WMI Provider


By:   |   Read Comments (15)   |   Related Tips: More > Install and Uninstall


ALERT: Share your SQL Server knowledge and become a MSSQLTips author


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


Last Update:


signup button

next tip button



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.

View all my tips
Related Resources





Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Notify for updates 


SQL tips:

*Enter Code refresh code     



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

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

 

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

Thanks,

Ashish


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

 

 

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

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

What if .mof file is not found.


Friday, September 05, 2014 - 6:05:17 AM - kapil Back To Top

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

It works.  Thank you ......


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

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

Worked for me, Thank you!


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

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 07, 2013 - 12:17:03 PM - tp Back To Top

Worked for me. Thanks for the tip!


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

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

Hi

 

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

 


Thursday, May 03, 2012 - 10:46:28 AM - Manvendra Back To Top

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


Wednesday, May 02, 2012 - 2:00:31 PM - Punit Back To Top

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


Learn more about SQL Server tools