"You cannot connect to the WMI provider. You do not have the permission or the server cannot access it. ", Wmi cannot be accessed
I recently learned about PowerDesigner and encountered a small problem when I created the PDM model. I thought I was about to reinstall SQLServer. Baidu had a bit of trouble and solved the problem easily. The problem is that when creating a data source, the connection test is always unsuccessful. I just want to open the Configuration Manager to check if something went wrong. As a result, the following pop-up window is displayed:
Error prompt:
When you start the SQL Server 2005 Configuration Manager, the following error occurs:
Cannot connect to the WMI provider. You do not have permission or the server cannot access ......
Invalid class [0x80041010]
Error cause:
This error occurs when you access Baidu. The file name is sqlmgmproviderxpsp2up. mof. Check whether the file exists. If so, run the cmd command to update it. WMI (Windows Management Instrumentation) is a core Windows Management technology. You can use WMI to manage local and remote computers. I think the reason why I cannot open the Configuration Manager is to modify the file.
Solution:
Run the "command prompt" as an administrator (under the attachment) and then run the following command
1) cd/d C: \ Program Files \ Microsoft SQL Server \ 90 \ Shared
2) mofcomp "C: \ Program Files \ Microsoft SQL Server \ 90 \ Shared \ sqlmgmproviderxpsp2up. mof"
If the following information is displayed, the operation is successful.
MOF file has been successfully parsed
Storing data in the repository...
Done!
I was very excited when I found the solution, and I was not sleepy at all. I copied and pasted it to the Cmd window. According to this command, I have different results: Not Found! In short, it's not Done! It seems that you cannot worry about it .. ↓
Next, I checked the meanings of the two cmd commands.
The first one: cd/d indicates that the current directory name is displayed or the current directory is changed.
Second, mofcomp indicates compiling the MOF file into a CIM class.
Hosted object format (MOF) files are an easy way to create and register providers, event categories, and events. After you create a class instance and class definition in the MOF file, you can compile the file. Compile the MOF file to register all the class definitions and instances in the CIM repository. Then, the provider, event category, and event information can be used by WMI and Visual Studio Analyzer. Create an instance of the provider, event category, and event class in the MOF file, and define the custom object to be analyzed. Then, compile the file. Compile the MOF file and submit it to the MOF compiler (Mofcomp.exe). The Compiler analyzes the file and adds the defined classes and instances to the CIM library.
After talking about this, the root cause of the problem is that the path is wrong. I typed the command again based on my own path, and it succeeded. ↓
Summary:
I have learned so much about it through a small question. Solve the problem. Cmd commands are widely used. It is necessary to study them in the future ~ There is also a problem. If you find the answer, you can't operate it blindly. Instead, you should first take a look. Maybe I knew it was a path problem for the first time.