16

I installed the evaluation version of SQL Server 2008 R2 after removing SQL Server 2008 R2 Express. SQL Server Configuration manager was still accessible after the un-installation but now it is no longer accessible with this error:

Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 servers with SQL Server Configuration Manager. Invalid class [0x80041010]

The file sqlmgmproviderxpsp2up.mof is found in the folder C:\Program Files (x86)\Microsoft SQL Server\100\Shared on my PC. I tried to type in the command prompt:

C:\Program Files (x86)\Microsoft SQL Server\100\Shared>mofcomp "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"

but still get the access denied error. I am unable to find the answer for this issue, does anyone have any ideas?

1
  • 1
    This link describes it nicely. Cheers!
    – RBT
    Apr 10, 2016 at 4:28

11 Answers 11

22

I've got access denied error too. And my solution:

  1. Right click on cmd
  2. chose run as administrator
  3. then type in the command prompt:

    C:\Program Files (x86)> Microsoft SQL Server\100\Shared>mofcomp "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"

it worked for me.

1
  • This worked for me! Thank you! This answer should be accepted.
    – gph
    Oct 8, 2018 at 3:31
14

I run on win 7 32 bit.

  • open CMD and run :

    cd "C:\Program Files\Microsoft SQL Server\110\Shared"
    
  • Then Run :

    mofcomp sqlmgmproviderxpsp2up.mof
    

cmd command

If You run at win 64, the directory is different

Possible SQL version’s shared directory:

SQL 2008:  C:\Program Files (x86)\Microsoft SQL Server\90\Shared\
SQL 2008 R2:  C:\Program Files (x86)\Microsoft SQL Server\100\Shared\
SQL 2012:  C:\Program Files (x86)\Microsoft SQL Server\110\Shared\
SQL 2014:  C:\Program Files (x86)\Microsoft SQL Server\120\Shared\
SQL 2017:  C:\Program Files (x86)\Microsoft SQL Server\140\Shared\
3
  • 1
    msdn.microsoft.com/en-us/library/aa393251(v=vs.85).aspx Until you run the MOF compiler, Mofcomp.exe, a provider is not registered with WMI and the classes it created in the MOF file are not available in the WMI repository. The following procedure describes how to compile a MOF file. I guess that is for re-entry the object to WMI. Or related with WMI corruption. CMIIW katyscode.wordpress.com/2007/02/03/…
    – toha
    Mar 16, 2017 at 7:25
  • "C:\Program Files (x86)\Microsoft SQL Server\140\Shared> mofcomp sqlmgmproviderxpsp2up.mof" worked for me on SQL Server 2017. Thanks
    – bytedev
    Aug 10, 2018 at 10:23
  • 1
    Command prompt should be opened with administrative privileges else the command will fail.
    – RBT
    May 6, 2021 at 7:49
4

That's how port depicts your Sql version:-

 -80 = SQL Server 2000    
 -90 = SQL Server 2005   
 -100 = SQL Server 2008    
 -105 = SQL Server 2008 R2 
 -110 = SQL Server 2012    
 -120 = SQL Server 2014    
 -130 = SQL Server 2016   
  1. Open Command prompt with Admin rights.
  2. Generic command for all version:

mofcomp "%programfiles(x86)%\Microsoft SQL Server\[Number]\Shared\sqlmgmproviderxpsp2up.mof"

if you have SQL Server 2008 R2, please provide 105 instead of [Number].

Hope so it will help

2

Guys I Suggest you to go to your "Microsoft SQL Server" folder in "C:\Program Files (x86)" and then go to all folders of "Microsoft SQL Server" Microsoft SQL Server

and check for "Shared" folder and if you found "sqlmgmproviderxpsp2up.mof" this file in your "Shared" folder then you have to copy the folder directory URL and open cmd(as Admin) and write "cd(space)" and paste your directory URL and press enter after just write "mofcomp sqlmgmproviderxpsp2up.mof" hope this will work enjoy and sorry for bad English.

1
  • Thanks, this is very clear explanation. and works for me Sep 14, 2022 at 21:41
1

Error Image Can Not Connect To WMI Provider

These Are Steps Recorded By 'Steps Recorder' In Window 10 These Might Also Work In Windows 8

Step 1: User right click on "Start (list)"

Step 2: User left click on "Command Prompt (Admin) (menu item)"

Step 3: User left click on "Administrator: Command Prompt (window)" in "Administrator: Command Prompt"

Step 4: User keyboard input on "Administrator: Command Prompt (window)" in "Administrator: Command Prompt" [...]

Step 5: Type 'mofcomp '

Step 6: User right click on "Start (list)"

Step 7: User left click on "Run (menu item)"

Step 8: User left click on "Open (button)" in "Run"

Step 9: User left click on "C:\Program Files (x86)\Microsoft SQL Server (list item)"

Step 10: User left click on "OK (button)" in "Run"

Step 11: User left click on "Search Box (edit)" in "Microsoft SQL Server"

Step 12: User left click on "Sqlmgmproviderxpsp2up.mof (text)"

Step 13: User left click on "Name (edit)" in "Sqlmgmproviderxpsp2up.mof - Search Results in Microsoft SQL Server"

Step 14: User left click on "Home (tab item)" in "Sqlmgmproviderxpsp2up.mof - Search Results in Microsoft SQL Server"

Step 15: User left click on "Copy path (button)" in "Sqlmgmproviderxpsp2up.mof - Search Results in Microsoft SQL Server"

Step 16: User left click on "Administrator: Command Prompt (list item)"

Step 17: User right click on "Administrator: Command Prompt (window)" in "Administrator: Command Prompt"

Step 18: User left click on "Paste (menu item)"

Step 19: User keyboard input on "Administrator: Command Prompt (window)" in "Administrator: Command Prompt" [Enter]

Step 20: User left click on "Close (button)" in "Administrator: Command Prompt"

Working Image SQL Server Configuration Manager

0

I got this error too and just for a laugh I decided to run my command line window in administrator mode.

Funnily enough, it worked! Not knowing what your user privilege setup looks like I can't really say that this is a definitive fix for it though

0
  • Open CMD.exe as Admin
  • Type this code mofcomp "%programfiles(x86)%\Microsoft SQL Server\140\Shared\sqlmgmproviderxpsp2up.mof" and press Enter
  • Start your SQL Srever Configuration Manager

140 is the name of one of my SQL Server 2017 Folders. Replace it before using this code

0

I was unable to find the Shared folder on last version 17, I went into 140 but there was not Shared.

So I made a search on disk C: ant it turned to be on Program Files (x86)

So be aware of the installation path you choose to run this.

After run the command this will be the windows you will see:

command response enter image description here

enter image description here

0

If you are seeing this error

File 'sqlmgmproviderxpsp2up.mof' not found!

Then go to

C:\Program Files (x86)\Microsoft SQL Server

and check which folder has 'sqlmgmproviderxpsp2up.mof' file

In my case I have installed sql server 2017 so the file was inside 'sqlmgmproviderxpsp2up.mof' this folder

C:\Program Files (x86)\Microsoft SQL Server\140\Shared

Finally

C:\Program Files (x86)\Microsoft SQL Server\140\Shared

then

mofcomp sqlmgmproviderxpsp2up.mof

enter image description here

Alternatively

Go to run command type services.msc find Service Agent right click and Start

enter image description here

1
  • no one folder has "sqlmgmproviderxpsp2up.mof" file. file not found anythere Jun 4, 2020 at 6:20
0

Probably easiest is to completely remove all traces of SQL Server and start over. Save yourself some time by doing it this way:

https://sqlblog.org/2010/10/25/fun-with-software-uninstalling-sql-server-2008-r2-evaluation-edition

This thread on super user might help with the WMI problem (though that just might be a permissions issue or you've stopped the wmi service):

https://superuser.com/questions/190960/repair-wmi-on-windows-7

2
  • Thanks @Aaron for offering me some answers. I have been working on many tutorials from MDSN pages to learn SSIS, SSAS and SSRS after installing the Evaluation version and have not been checking the configuration manager. Not sure some trouble shootings during the tutorials when I encountered issues has affected this because it works perfectly after the installation. I may try your 2nd recommended option first. May 5, 2012 at 15:19
  • Sorry, it wasn't something I had verified myself. I'll suggest again though that troubleshooting this is probably a lot more complex than just uninstalling and reinstalling. May 8, 2012 at 9:50
-1

I had MS SQL Server Management Studio 2014 installed and received above mentioned error.Below are the steps i followed which fixed the issue for me

1) Run CMD as ADMIN

2) cd C:\Windows\SysWOW64\wbem

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

4) Above command executed successful as below

Microsoft (R) MOF Compiler Version 6.3.9600.16406 Copyright (c) Microsoft Corp. 1997-2006. All rights reserved. Parsing MOF file: C:\Program Files (x86)\Microsoft SQL Server\120\Shared\sqlmgmp roviderxpsp2up.mof MOF file has been successfully parsed Storing data in the repository... Done!

NOTE:

The value of number depends on the version of SQL Server:nnn

SQL 2008: C:\Program Files (x86)\Microsoft SQL Server\90\Shared\

SQL 2008 R2: C:\Program Files (x86)\Microsoft SQL Server\100\Shared\

SQL 2012: C:\Program Files (x86)\Microsoft SQL Server\110\Shared\

SQL 2014: C:\Program Files (x86)\Microsoft SQL Server\120\Shared\

1
  • This seems to be exactly what has already been said here
    – Liam
    Mar 16, 2017 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.