How to resolve the SQL error “cannot connect to WMI provider”

当你试图打开SQL Server Configuation Manager时发现如下错误:

“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 class [0x8004100]

不要惊慌,这是因为你的SQL实例的WMI provider被意外移除了。不管是32位的SQL实例还是64位有SQL实例都引用相同的WMI设置(这个设置在:“%programfile(x86)%\Microsoft SQL Server\[version]\Shared\sqlmgmproviderxpsp2up.mof”)

所以只要进入“%programfile(x86)%\Microsoft SQL Server\[version]\Shared目录,然后执行

mofcomp sqlmgmproviderxpsp2up.mof
View Code

然后重启SQL Server Configuration Manager就可以了。

[version]与SQL Server对应关系如下:
SQL Server 版本                     | [Version]
----------------------------------|----------
Microsoft SQL Server 2012      | 110
Microsoft SQL Server 2008 R2 | 100
Microsoft SQL Server 2008      | 100
Microsoft SQL Server 2005      | 90

你可能感兴趣的:(Provider)