Unable to access sql server configuration manager

假装没事ソ 提交于 2019-12-03 07:15:00

问题


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:


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.




回答2:


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
    

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:


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




回答4:


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"




回答5:


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.




回答6:


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




回答7:


  • 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




回答8:


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:




回答9:


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

Alternatively

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




回答10:


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




回答11:


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\



来源:https://stackoverflow.com/questions/10462050/unable-to-access-sql-server-configuration-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!