Fix "Unable to connect to the WMI provider, you do not have permissions or the server cannot access it." “

Source: Internet
Author: User

  

Recently in learning PowerDesigner, in the creation of PDM model, encountered a little bit of a problem, this thought to reload SQL Server, Baidu a bit, the problem is easy to solve. The background of the problem is that when creating a data source, always testing the connection is unsuccessful, I want to open Configuration Manager to see if something is wrong. As a result, the following pop-up window appears: ↓↓↓





error message:

When you start SQL Server 2005 Configuration Manager, the following prompt error occurs
Unable to connect to the WMI provider. You do not have permission or the server cannot access ...
Invalid class [0x80041010]


cause of error:

Baidu on the Internet a bit the cause of this error is a file problem, the file named Sqlmgmproviderxpsp2up.mof, check if there is a file, if it exists, go with the cmd command to update. WMI (Windows Management Instrumentation, Windows Management Instrumentation) is a core Windows management technology that allows users to manage both local and remote computers using WMI. I think the reason why the Configuration Manager is not open is to modify the file.


Workaround:

Run the command prompt as an administrator (below the attachment), and then execute the following command after entering

1) cd/d C:\Program Files\Microsoft SQL Server\90\shared

2) mofcomp "C:\Program Files\Microsoft SQL Server\90\shared\sqlmgmproviderxpsp2up.mof"

The operation is successful when you see the following information


MOF file has been successfully parsed
Storing data in the repository ...
done!


Found the solution, I am quite excited ah, not sleepy at all, just copy and paste directly into the cmd window. Following this command, I came up with a different result: not found! in short, not done! I can't seem to be in a hurry. ↓↓↓





Next, I looked up the meaning of these two cmd commands.

The first one: cd/d means: Displays the current directory name or changes the current directory.

The second: Mofcomp means: Compile the MOF file as a CIM class.

Managed Object Format (MOF) files are an easy way to create and register providers, event categories, and events. After you create a class instance and a class definition in the MOF file, you can compile the file. Compiling the MOF file will register all class definitions and instances in the CIM repository. The provider, event category, and event information can then be used by WMI and Visual Studio Analyzer. After you create an instance of the provider, event category, and event class in the MOF file, and define the custom object that you want to parse, you can compile the file. When the MOF file is compiled, it is submitted to the MOF compiler (Mofcomp.exe), which parses the file and adds the defined classes and instances to the public Information Model (CIM) library.


Said so much, in fact, the root of the problem is that the path is wrong, I follow their own path and knocked over the command, on the success. ↓↓↓




Summary:


Through a small problem, learned so much knowledge, long insight. Encounter problems and solve problems. CMD command is very versatile, after the need for research and research ~ There is a problem, if you find the answer, can not blindly go to the operation, but first understand, probably walk again, maybe I first know is the path of the problem.



Fix "Unable to connect to the WMI provider, you do not have permissions or the server cannot access it." “

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.