SQL Server Config manager error: Cannot connect to WMI provider


I cant open my SQL server configuration manager 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 SQL Server Configuration Manager. 

I have searched online material and ran the mofcomp command as recommended: mofcomp “C:\Program Files (x86)\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof”

I am now getting this error message:

MOF file has been successfully parsed
Storing data in the repository…
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:
Compiler returned error 0x80070005Error Number: 0x80070005, Facility: Win32
Description: Access is denied.

Can you please help me out, been 2 weeks sited with this problem

asked on Stack Overflow Jun 26, 2017 by Immortal

4 Answers


Run Cmd as Administrator and execute this commands:

first go to SQL folder according to your sql version:

SQL 2008: 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\ ----> Mine is 2017

C:\WINDOWS\system32>cd "C:\Program Files (x86)\Microsoft SQL Server\140\Shared"


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


The problem occurs because the Windows Management Instrumentation (WMI) provider configuration file for manage SQL Server services is missing.so,mofcomp command repair or recreate it.

Here is more explanation: https://docs.microsoft.com/en-us/windows/desktop/wmisdk/mofcomp

answered on Stack Overflow Aug 4, 2018 by Fereydoon Barikzehy • edited Jun 26, 2019 by Fereydoon Barikzehy

Run the @Fereydoon Barkzehy codes with Administrative Access

Sample -

  cd C:\Program Files (x86)\Microsoft SQL Server\110\Shared
  cd C:\Program Files (x86)\Microsoft SQL Server\140\Shared
  mofcomp sqlmgmproviderxpsp2up.mof

depends on where the file "sqlmgmproviderxpsp2up.mof" is present

Youtube video

answered on Stack Overflow Mar 16, 2019 by Arun Prasad E S • edited Mar 18, 2019 by Arun Prasad E S

The best solution for me was to uninstall the instance and reinstall a fresh instance. This worked 100%.

answered on Stack Overflow Jul 3, 2017 by Immortal • edited Mar 18, 2019 by Arun Prasad E S

doing a fresh OS installation also worked for me as well. but this is a pain. Sometimes you can run the:

“C:\Program Files (x86)\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof”

Sometimes it helps and sometimes it doesn't help, all you need to do is doing a fresh OS installation and then SQL installation.

answered on Stack Overflow Jul 6, 2017 by (unknown user) • edited Mar 18, 2019 by Arun Prasad E S

User contributions licensed under CC BY-SA 3.0