none
SQL Server Configuration Manager: Cannot connect to WMI provider RRS feed

  • Question

  • I installed the latest version (v17.2) of SQL Server on a new PC, and when trying to access "SQL Server 2017 RC1 Configuration Manager" I'm receiving the following 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 namespace [0x8004100e]"

    I've tried the following steps to fix this issue and none of them have worked:

    • Updated permissions in Registry Editor [1]
    • Enabled inbound firewall rule [2]
    • Updated and restarted the WMI Service [3]

    Does anyone have any idea of how to resolve this issue? I'm just trying to create a local server for personal use. This has become a headache.

    Sources: 

    1. https://blog.sqlauthority.com/2017/05/20/sql-server-configuration-manager-cannot-connect-wmi-provider-not-permission-server-unreachable/
    2. https://social.msdn.microsoft.com/Forums/en-US/2d89a720-cf52-49fd-a0ca-b0e93fa3c18b/sql-server-configuration-manager-remote-access?forum=sqlkjmanageability
    3. https://support.microsoft.com/en-us/help/956013/error-message-when-you-open-sql-server-configuration-manager-in-sql-se

    • Edited by callen1 Saturday, August 19, 2017 3:12 AM version
    Saturday, August 19, 2017 3:11 AM

All replies

  • Note For this command to succeed, the Sqlmgmproviderxpsp2up.mof file must be present in the %programfiles(x86)%\Microsoft SQL Server\number\Shared folder.

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



    Microsoft SQL Server 2012 110
    Microsoft SQL Server 2008 R2 100
    Microsoft SQL Server 2008 100
    Microsoft SQL Server 2005 90
    Microsoft SQL Server 2017 140
    Microsoft SQL Server 2014 120


    After you run the Mofcomp tool, restart the WMI service for the changes to take effect. The service name is Windows management Instrumentation.




    • Proposed as answer by Shen Zheng Monday, September 4, 2017 2:35 AM
    • Edited by Times Decides Sunday, March 10, 2019 7:18 PM edit
    Saturday, August 19, 2017 7:30 AM
  • Hi callen1,

    Per my experience, the namespace is created during SQL Server installation. So have you installed SQL Server yet? Since it will not work until you installed a SQL Server instance. A workaround to this issue is to manually register it as Vishe suggests. To fix it, you can open an elevated command prompt then execute the command below:

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

    Note that for this command to succeed, the Sqlmgmproviderxpsp2up.mof file must be present in the C:\Program Files (x86)\Microsoft SQL Server\140\Shared folder.

    If you have any other questions, please let me know.

    Regards,

    Hannah


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Hannah Yu Wednesday, August 30, 2017 6:04 AM
    • Proposed as answer by Times Decides Saturday, September 30, 2017 6:20 PM
    Tuesday, August 22, 2017 5:41 AM
  • Hi callen1,

    Any update on your issue? If your problem has been solved, please mark the reply as answer so that other people can benefit from it. Thanks.

    If you have any other questions, please let me know.

    Regards,

    Hannah


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 29, 2017 8:35 AM
  • Hi Hannah!

    Im having the same issue. I have checked to make sure the folder exists and it does. However, when I run the command it says "The current directory is invalid". Please help. Thank you.

    Monday, October 16, 2017 5:56 PM
  • Hi Hannah,

    This happened to me, too, when trying to configure SQL2016. 

    I tried the "mofcomp" solution offered here, and that worked for me.  So, I voted for it.  I no longer get the error, "Cannot connect to WMI provider"

    The "number" to use is "130" for SQL2016.   Also, ensure you're pointing to "Program Files (x86)".

    Many thanks, 


    --petrejo








    • Edited by Pablo88008 Wednesday, November 1, 2017 4:43 PM
    Wednesday, November 1, 2017 3:59 PM
  • Hi petrejo,

    Glad to help and thanks for your sharing.

    Regards,

    Hannah


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 2, 2017 8:01 AM
  • Hi KWillis85,

    Make sure both the path and version number are correct before you run the command above.

    Regards,

    Hannah


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 2, 2017 8:08 AM
  • Hi Hannah

    I am having the same issue  Cannot connect to WMI provider but when i run the above command i am getting the below.

    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 

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

    Error number 0x80041003, Facility WMI

    Decription: Access denied

    Compiler returned error 0x80041003

    Any idea what could be causing this?

    Thanks

    Gerard

    • Proposed as answer by kamal Khayati Sunday, December 2, 2018 4:16 PM
    Saturday, November 4, 2017 9:43 PM
  • Hi GMCG87,

    >> Error number 0x80041003

    As described in WMI Error Constants, the error number above means that current user does not have permission to perform the action. Try to grant Admin permission on the user then.

    Regards,

    Hannah


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 7, 2017 9:17 AM
  • This solved my issue which was identical to the original stated problem.

    NOTE: The CMD should be run as an administrator.

    Friday, December 22, 2017 2:36 AM
  • Hello hannah, 

    I can see Sqlmgmproviderxpsp2up.mof file present in the C:\Program Files (x86)\Microsoft SQL Server\140\Shared folder. But when i am trying to execute the command below:

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

    It gives me below error:


    (An error occurred while processing item 1 defined on lines 4-7 in file c:\program files (x86)Microsoft SQL Server\140\Shared\sqlmgmproviderxpsp2up.mof;

    Error number: 0x80041003, Facility: WMI)

    Thursday, January 11, 2018 8:32 PM
  • The above command worked for me as well. The "number" to use is "140" for SQL2017. 

    Thank you for your help guys.

    Apollo

    • Proposed as answer by Times Decides Monday, July 8, 2019 4:31 AM
    Friday, January 12, 2018 2:27 AM
  • When I run this command, (and I've checked and double-checked that it is accurate), I get the following error in Command Prompt:
    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:\Program Files (x86)\Microsoft SQL Server\140\Shared\sqlmgmproviderxpsp2up.mof:
    Error Number: 0x80041003, Facility: WMI
    Description: Access denied
    Compiler returned error 0x80041003

    So, what do I do now?

    Friday, January 12, 2018 8:05 PM
  • Make sure you running the Command Prompt application as Run as Administrator.  I received the same error message as you. When I repeated the process with my command prompt run as administrator, it worked and I as able to open SQL Server Configuration Manager.

    I ran the following from the command prompt to fix my issue

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

    Tuesday, January 23, 2018 11:59 AM
  • C:\WINDOWS\system32>mofcomp "%programfiles(x86)%\Microsoft SQL Server\number\Shared\sqlmgmproviderxpsp2up.mof"
    Microsoft (R) MOF Compiler Version 10.0.16299.15
    Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.

    File 'C:\Program Files (x86)\Microsoft SQL Server\number\Shared\sqlmgmproviderxpsp2up.mof' not found!

    whats that mean?

    Saturday, February 24, 2018 4:49 PM
  • Hi Hannah, Thanks for your technical input on the WMI error.

    **The Command below soft the wmi error relating to configuration manager** as suggested by Hannah as a workaround on the issue.

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

    I run the CMD as administrator then ran the command, after which I opened the configuration manager as an administrator. and problem solve. 

    Thanks Hannah.

    I appreciate,

    Berti Efret. (sql DBA)


    • Edited by Berti Efret Monday, March 19, 2018 2:25 AM typo
    Monday, March 19, 2018 2:24 AM
  • <g class="gr_ gr_6 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="6" id="6">mofcomp</g> <g class="gr_ gr_31 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="31" id="31">not recognize</g> as <g class="gr_ gr_36 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="36" id="36">internal and external command</g>
    Tuesday, March 20, 2018 4:50 PM
  • <g class="gr_ gr_6 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="6" id="6">mofcomp</g> not recognize as internal and external command
    Tuesday, March 20, 2018 4:51 PM
  • Thanks and this worked for me 

    rootleet

    Sunday, April 1, 2018 5:00 PM
  • It fixes the problem. You must run the command prompt as an administrator.
    Thursday, May 24, 2018 3:02 AM
  • Hi, I tried this and got the following error:

    Microsoft (R) MOF Compiler Version 10.0.17134.1
    Copyright (c) Microsoft Corp. 1997-2006. 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:
    Error Number: 0x80070522, Facility: Win32
    Description: A required privilege is not held by the client.
    Compiler returned error 0x80070522

    I am running the CMD as an Administrator.   Is there something else I am missing  ?

    Friday, September 7, 2018 3:46 AM
  • I am running SQL Server Management Studio 17, i tried and alhamdulillah it worked for me.Thank you
    • Proposed as answer by Times Decides Monday, July 8, 2019 4:30 AM
    Saturday, September 8, 2018 6:41 PM
  • Answered.
    Friday, November 16, 2018 1:46 PM
  • Hello
    I responded with this method
    Windows Me: Windows 7
    MySQL: Microsoft SQL Server 2008 R2

    1- NOTE: The CMD should be run as an administrator

    2- Cmd -> mofcomp "% programfiles (x86)% \ Microsoft SQL
    Server \ number \ Shared \ sqlmgmproviderxpsp2up.mof "

    3- The value of the number depends on the version of SQL Server: number

    Example :

    SQL 2008 : mofcomp "%programfiles(x86)%\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"
    SQL 2012 : mofcomp "%programfiles(x86)%\Microsoft SQL Server\110\Shared\sqlmgmproviderxpsp2up.mof"
    SQL 2014 : mofcomp "%programfiles(x86)%\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof"
    SQL 2017 : mofcomp "%programfiles(x86)%\Microsoft SQL Server\140\Shared\sqlmgmproviderxpsp2up.mof"

    Sunday, December 2, 2018 4:16 PM
  • hi,

    Worked for me too.

    SimonK

    Sunday, December 16, 2018 5:20 AM
  • I am having the same issue as TawhidRifat and it doesn't appear to have been answered.

    When I run the mofcomp command in cmd prompt running as admin, with the appropriate version number 140 for 2017, I get a a similar error as follows:
    Microsoft (R) MOF Compiler Version 6.2.9200.16384
    Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
    Parsing MOF file: C:\Program Files (x86)\Microsoft SQL Server\140\Shared\sqlmgmproviderxpsp2up.mof
    MOF file has been successfully parsed
    Storing data in the repository...
    An error occurred while processing item 4 defined on lines 22 - 29 in file C:\Program Files (x86)\Microsoft SQL Server\140\Shared\sqlmgmproviderxpsp2up.mof:
    Error Number: 0x8004107a, Facility: WMI
    Description: Veto put
    Compiler returned error 0x8004107a

    lines 22-29 inside sqlmgmproviderxpsp2up.mof are as follows:

    Instance of __Win32Provider as $InstProv
    {
      Name = "RegProv";
      ClsId = "{fe9af5c0-d3b6-11ce-a5b6-00aa00680c3f}";
      ImpersonationLevel = 1;
      PerUserInitialization = TRUE;
      HostingModel = "NetworkServiceHost";
    };

    Any advice or known fix for this issue?


    Thursday, May 23, 2019 8:02 PM
  • thanks it help forme after run cmd as administrator Thanks!
    Sunday, July 7, 2019 6:05 PM