Sql server wmi provider error

This article shows how to resolve the error message "Cannot Connect to WMI Provider" when trying to launch SQL Server Configuration Manager.

In some cases where you might try to launch SQL Server Configuration Manager, you might get the 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]

Is SQL Server Configuration Manager Really Needed?

Easy answer: of course it is!

Even though you can still control SQL Server services via Windows Services (services.msc), in order to have full control, you still need SQL Server Configuration Manager.

For example, if you want to set up SQL Server in order to use SSL certificate you need SQL Server Configuration Manager.

Moreover, if you want to change the network settings for your SQL Server services, again, you will need SQL Server Configuration Manager.

There are more examples that can justify the usefulness of SQL Server Configuration Manager but, I’m pretty sure you got the picture 🙂


Learn more tips like this! Enroll to our Online Course!

Check our online course titled “Essential SQL Server Administration Tips” (special limited-time discount included in link).

Learn essential hands-on SQL Server Administration tips on SQL Server maintenance, security, performance, integration, error handling and more. Many live demonstrations and downloadable resources included!

Essential SQL Server Administration Tips - Online Course with Live Demonstrations and Hands-on Guides

(Lifetime Access/ Live Demos / Downloadable Resources and more!)

Enroll from $14.99


Why I Got this Error Message?

If you performed several installations and uninstallations of SQL Server components on the machine, then under certain circumstances thi might cause the abovementioned issue with SQL Server Configuration Manager.

How to Get SQL Server Configuration to Work Again

As per Microsoft’s official support documentation, you can easily fix this issue.

So, in order to fix the issue, you can open an elevated command prompt (Run as Administrator) and execute the below command, after of course you replace “number” with the version of SQL Server in terms of number.

mofcomp "%programfiles(x86)%Microsoft SQL ServernumberSharedsqlmgmproviderxpsp2up.mof"

In order to find the right version number, please check the below table:

SQL Server Version Version Number
2022 160
2019 150
2017 140
2016 130
2014 120
2012 110
2008/R2 100
2005 90

So, if for example, you want to fix the SQL Server 2016 Configuration Manager, you would run the below command in an elevated command prompt (Run as Administrator):

mofcomp "%programfiles(x86)%Microsoft SQL Server130Sharedsqlmgmproviderxpsp2up.mof"

Cannot Connect to WMI Provider (SQL Server Configuration Manager) - Article on SQLNetHub

An Alternative Way to Launch SQL Server Configuration Manager

Last but not least, there is an alternative approach to start SQL Server Configuration Manager. Again, from the command line, you can run the corresponding command for each SQL Server version as provided in the below table:

SQL Server Version Command
2022 SQLSERVERMANAGER16.msc
2019 SQLSERVERMANAGER15.msc
2017 SQLSERVERMANAGER14.msc
2016 SQLSERVERMANAGER13.msc
2014 SQLSERVERMANAGER12.msc
2012 SQLSERVERMANAGER11.msc
2008/R2 SQLSERVERMANAGER10.msc
2005 SQLSERVERMANAGER9.msc

Featured Online Courses:

  • SQL Server 2022: What’s New – New and Enhanced Features [New]
  • Data Management for Beginners – Main Principles
  • Introduction to Azure Database for MySQL
  • Working with Python on Windows and SQL Server Databases
  • Boost SQL Server Database Performance with In-Memory OLTP
  • Introduction to Azure SQL Database for Beginners
  • Essential SQL Server Administration Tips
  • SQL Server Fundamentals – SQL Database for Beginners
  • Essential SQL Server Development Tips for SQL Developers
  • Introduction to Computer Programming for Beginners
  • .NET Programming for Beginners – Windows Forms with C#
  • SQL Server 2019: What’s New – New and Enhanced Features
  • Entity Framework: Getting Started – Complete Beginners Guide
  • A Guide on How to Start and Monetize a Successful Blog
  • Data Management for Beginners – Main Principles

Read Also

Feel free to check our other relevant articles on SQL Server troubleshooting:

  • Error converting data type varchar to numeric
  • The Database Engine system data directory in the registry is not valid
  • Error converting data type varchar to float
  • An error occurred in a SQL Server Service Broker/Database Mirroring transport connection endpoint (9642) – How to Resolve
  • There is not enough space on the disk. (mscorlib)
  • A network-related or instance-specific error occurred while establishing a connection to SQL Server
  • SQLServerAgent could not be started (reason: Unable to connect to server ‘(local)’; SQLServerAgent cannot start)
  • ORDER BY items must appear in the select list if SELECT DISTINCT is specified
  • There is no SQL Server Failover Cluster Available to Join
  • There is insufficient system memory in resource pool ‘internal’ to run this query.
  • The SELECT permission was denied on the object ‘extended_properties’, database ‘mssqlsystemresource’, schema ‘sys’.
  • The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value
  • SQL Server replication requires the actual server name to make a connection to the server – How to Resolve it
  • Issue Adding Node to a SQL Server Failover Cluster – Greyed Out Service Account – How to Resolve
  • initerrlog: could not open error log file. Operating system error=3 … – How to Resolve It
  • Resolve SQL Server CTE Error – Incorrect syntax near ‘)’.
  • SQL Server is Terminating Because of Fatal Exception 80000003 – How to Troubleshoot
  • An existing History Table cannot be specified with LEDGER=ON – How to Resolve
  • … all SQL Server troubleshooting articles

Featured Database Productivity Tools

Snippets Generator: Create and modify T-SQL snippets for use in SQL Management Studio, fast, easy and efficiently.

Snippets Generator - SQL Snippets Creation Tool

Learn more

Dynamic SQL Generator: Convert static T-SQL code to dynamic and vice versa, easily and fast.

Dynamic SQL Generator: Easily convert static SQL Server T-SQL scripts to dynamic and vice versa.

Learn more

Subscribe to our newsletter and stay up to date!

Check out our latest software releases!

Check our eBooks!

Rate this article: 1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)

Loading…

Reference: SQLNetHub.com (https://www.sqlnethub.com)

© SQLNetHub

Artemakis Artemiou

Artemakis Artemiou is a Senior SQL Server Architect, Author, a 9 Times Microsoft Data Platform MVP (2009-2018). He has over 20 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and {essentialDevTips.com}. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Moreover, Artemakis teaches on Udemy, you can check his courses here.

Views: 14,633

If you get the ‘Cannot connect to WMI provider’ error, it can be due to the removal of WMI provider due to the installation of SQL Server or the permissions of a key in the Windows Registry. Users have reported that when they install SQL Server v17.2 or later on their system, they are presented with an error ‘Cannot connect to WMI provider. You do not have permission or the server is unreachable’ message upon trying to open the configuration manager of the server.

Cannot Connect to WMI Provider

The issue seems to persist even after repairing the installation. Some users even tried to uninstall the server and install it again yet they weren’t able to get rid of the error. Fortunately, in this article, we will show you how to circumvent the said error message.

What causes the ‘Cannot Connect to WMI Provider’ Error on Windows 10?

Well, if you receive the said error message upon trying to access the Configuration Manager of the server, it can be due to the following factors —

  • Windows Registry permissions: In some scenarios, the issue occurs if only the administrator account has full permissions over a Windows Registry key and the Network Service account is restricted.
  • Removal of WMI Provider: There are also certain cases where the WMI provider is removed due to the installation of an SQL server instance. Such cases can cause the error to occur as well.

Before we begin, please make sure that you are using an administrator account as the solutions provided down below will require administrative privileges. If you are logged in as an administrator, you can jump into the solutions down below without any further delay.

Solution 1: Using Mofcomp Tool

As we have mentioned above, sometimes the WMI or Windows Management Instrumentation provider is removed by the installation of an SQL Server instance. WMI provider is a system process that allows the applications on your system to request and fetch information from other applications on the system. You can fix your issue by running the Mofcomp tool. Here’s how to do it:

  1. Press Windows Key + X and select Command Prompt (Admin) from the list to open an elevated command prompt.
  2. Once the administrator command prompt opens up, copy and paste the following command and then hit Enter:
    mofcomp "%programfiles(x86)%Microsoft SQL ServernumberSharedsqlmgmproviderxpsp2up.mof

    Using the Mofcomp Tool
  3. Please make sure that you replace ‘number’ with your SQL Server version.
  4. Once done, press Windows Key + R to open Run.
  5. Type in ‘services.msc’ and press Enter.
  6. Search for the Windows Management Instrumentation service.
  7. Right-click on it and select Restart.
    Restarting the WMI Service
  8. Check if it fixes your issue.

Solution 2: Changing Windows Registry Key Permissions

The last workaround that you can apply to fix the issue would be to add the Network Service account to the full control permissions list of a particular Windows Registry Key. To do this, follow the instructions down below:

  1. Press Windows Key + R to open the Run dialog box.
  2. Type in ‘regedit’ and then hit Enter.
  3. Afterward, paste the following path in the address bar: ComputerHKEY_CLASSES_ROOTCLSID{73E709EA-5D93-4B2E-BBB0-99B7938DA9E4}
  4. Right-click on {73E709EA-5D93-4B2E-BBB0-99B7938DA9E4} and select Permissions.
    Changing Permissions
  5. Click Add and then type in Network Service under ‘Enter the object names to select’.
  6. Afterward, click Check Names and then hit OK.
    Adding Network Service Account
  7. Highlight Network Service and make sure the Full Control box is checked.
    Network Service Account Permissions
  8. Click Apply and then hit OK.
  9. Restart your system and see if it fixes the issue.

Photo of Kevin Arrows

Kevin Arrows

Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Back to top button

Problem:

I ran into a strange error today. I attempted to launch SQL Server Configuration Manger on a server deployed in Azure, and I was greeted with an error dialog that implied either the server was unreachable or that I didn’t have rights. The error read, “Cannot connect to WMI provider. You Do not have permission or the server is unreachable. Note that you can only manage SQL Server 2055 and later servers with SQL Server Configuration Manager. Invalid namespace [0x8004100e].” After a bit of digging, I found a solution, and possibly even a root cause.

Error_mes_01.PNG

Background:

I thought the error was especially strange as the server was deployed using a Microsoft template from the Azure Marketplace. I deployed the SQL Server 2016 SP2 Developer on Windows Server 2016 template. There was a great deal of doubt that a Microsoft provided template would be defective in some way.

Fix:

I needed to run the SQL Server 2016 version of SQL Configuration Manager instead of the SQL Server 2017 version. As it turns out, there are multiple versions on the server.

A glance of the menu shows multiple application groups on the machine with SQL Server components.

Start_menu_02.PNG

Expanding the view shows the version of Configuration Manager to execute.

Start_menu_03.PNG

Root Cause:

At some point not too long ago (I believe it was with SQL Server 2017), Microsoft decoupled SQL Server Management Studio from the SQL Server install. This allows for newer versions of SSMS to be released at a faster cadence. The SQL Server 2016 Template in Azure comes with this newer version of SSMS. When SSMS is installed, it also comes with a lot of other utilities, including SQL Server Configuration Manger. This results in two versions of the SQL Configuration Manager installed on the same machine. Each one uses files in a directory names after the version number of SQL Server it supports. Based on some reading of various other blog posts for troubleshooting the error, my guess is that the .mof file needed for the 2017 version wasn’t compiled and therefore doesn’t successfully run.

These multiple versions can create confusion on the part of administrators. Personally, it forced me to worked differently. I normally click on the search on the toolbar, then start typing the name of the app I wish to use. In this case, I need to be extra cautious as I could accidentally launch the wrong version. This isn’t a make or break, but it’s something I now need to be aware of when working on this server.

So there it is. The answer was a simple one. In this case, it was user error. While I like that nothing complicated was involved in he fix, I also feel a little silly for not catching it right away. Simply running the version that matched my install would fix the problem.

Содержание

  • 1 Что вызывает ошибку «Не удается подключиться к поставщику WMI» в Windows 10?
    • 1.1 Решение 1. Использование инструмента Mofcomp
    • 1.2 Решение 2. Изменение разрешений раздела реестра Windows

Если вы получите ‘Не удается подключиться к провайдеру WMI’, Это может быть связано с удалением поставщика WMI из-за установки SQL Server или разрешений ключа в реестре Windows. Пользователи сообщают, что когда они устанавливают SQL Server v17.2 или новее в своей системе, они получают сообщение об ошибке ‘Не удается подключиться к провайдеру WMI. У вас нет разрешения или сервер недоступен’Сообщение при попытке открыть диспетчер конфигурации сервера.

Не удается подключиться к провайдеру WMI

Проблема, кажется, сохраняется даже после ремонта установки. Некоторые пользователи даже пытались удалить сервер и установить его снова, но не смогли избавиться от ошибки. К счастью, в этой статье мы покажем вам, как обойти указанное сообщение об ошибке.

Что вызывает ошибку «Не удается подключиться к поставщику WMI» в Windows 10?

Хорошо, если вы получаете указанное сообщение об ошибке при попытке доступа к Configuration Manager сервера, это может быть связано со следующими факторами:

  • Разрешения реестра Windows. В некоторых случаях проблема возникает, если только учетная запись администратора имеет полные разрешения для раздела реестра Windows и учетная запись сетевой службы ограничена.
  • Удаление поставщика WMI. В некоторых случаях поставщик WMI удаляется из-за установки экземпляра сервера SQL. Такие случаи также могут привести к возникновению ошибки.

Прежде чем мы начнем, убедитесь, что вы используете учетную запись администратора, поскольку приведенные ниже решения потребуют прав администратора. Если вы вошли в систему как администратор, вы можете без промедления перейти к приведенным ниже решениям.

Решение 1. Использование инструмента Mofcomp

Как мы упоминали выше, иногда поставщик инструментария управления WMI или Windows удаляется при установке экземпляра SQL Server. Поставщик WMI — это системный процесс, который позволяет приложениям в вашей системе запрашивать и извлекать информацию из других приложений в системе. Вы можете решить эту проблему, запустив инструмент Mofcomp. Вот как это сделать:

  1. Нажмите Windows Key + X и выберите Командная строка (администратор) из списка, чтобы открыть командную строку с повышенными правами.
  2. Когда откроется командная строка администратора, скопируйте и вставьте следующую команду, а затем нажмите Enter:
    mofcomp "% programfiles (x86)%  Microsoft SQL Server  number  Shared  sqlmgmproviderxpsp2up.mof

    Использование инструмента Mofcomp

  3. Пожалуйста, убедитесь, что вы замените ‘числоС вашей версией SQL Server.
  4. Когда закончите, нажмите Windows Key + R открыть Бежать.
  5. Введите ‘services.mscИ нажмите Войти.
  6. Поиск для Инструментарий управления Windows оказание услуг.
  7. Щелкните правой кнопкой мыши и выберите Запустить снова.
    Перезапуск службы WMI
  8. Проверьте, решает ли это вашу проблему.

Решение 2. Изменение разрешений раздела реестра Windows

Последний обходной путь, который можно применить для исправления проблемы, — добавить учетную запись сетевой службы в список разрешений полного контроля конкретного раздела реестра Windows. Для этого следуйте инструкциям ниже:

  1. Нажмите Windows Key + R открыть Бежать диалоговое окно.
  2. Введите ‘смерзаться’, А затем нажмите Войти.
  3. Затем вставьте следующий путь в адресную строку: Компьютер HKEY_CLASSES_ROOT CLSID {73E709EA-5D93-4B2E-BBB0-99B7938DA9E4}
  4. Щелкните правой кнопкой мыши на {73E709EA-5D93-4B2E-BBB0-99B7938DA9E4} и выберите права доступа.
    Изменение разрешений
  5. Нажмите добавлять а затем введите Сетевой сервис под ‘Введите имена объектов для выбора».
  6. После этого нажмите Проверьте имена а затем ударил Хорошо.
    Добавление учетной записи сетевой службы
  7. основной момент Сетевой сервис и убедитесь, что Полный контроль флажок установлен.
    Разрешения учетной записи сетевой службы
  8. Нажмите Применять а затем ударил Хорошо.
  9. Перезагрузите систему и посмотрите, исправит ли она проблему.

Понравилась статья? Поделить с друзьями:
  • Sql server setup has encountered the following error
  • Sql server raise error
  • Sql server management error 26
  • Sql server login failed for user microsoft sql server error 18456
  • Sql server linked server error 18456