Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
493 views
in Technique[技术] by (71.8m points)

SQL Server Config manager error: Cannot connect to WMI provider

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

question from:https://stackoverflow.com/questions/44753745/sql-server-config-manager-error-cannot-connect-to-wmi-provider

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 Server100Shared
SQL 2012: C:Program Files (x86)Microsoft SQL Server110Shared
SQL 2014: C:Program Files (x86)Microsoft SQL Server120Shared
SQL 2017: C:Program Files (x86)Microsoft SQL Server140Shared -------> My version is 2017

Find more versions here

C:WINDOWSsystem32>cd "C:Program Files (x86)Microsoft SQL Server140Shared"

Then:

C:Program Files (x86)Microsoft SQL Server140Shared>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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...