SQL Server Config manager error: Cannot connect to WMI provider

31

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. 
Invalid

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

sql-server
asked on Stack Overflow Jun 26, 2017 by Immortal

6 Answers

58

Run Cmd as Administrator and execute these commands:

First go to SQL Shared 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\ -------> My version is 2017

Find more versions here

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

Then:

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

Update:

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 Feb 5, 2020 by Fereydoon Barikzehy
3

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
0

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
0

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
0

By trial and error i finally found this working solution:

1) I searched all sqlmgmproviderxpsp2up.mof files under C:\Program Files (x86)\Microsoft SQL Server

2) running CMD as administrator i did for each result found above: i) change directory to go to the directory ii) run mofcomp sqlmgmproviderxpsp2up.mof

3) reboot

then it works

answered on Stack Overflow Oct 7, 2019 by LaBracca
0

What worked for me was to download the SQLEXPR_x64_Enu, run the Setup.exe and use the Repair option.

answered on Stack Overflow Apr 16, 2020 by Nitish Bannur

User contributions licensed under CC BY-SA 3.0