Help: SQL Server

Sharing my knowlege about SQL Server Troubleshooting Skills

  • Blog Stats

    • 2,105,567 hits
  • Select GETDATE()

    May 2024
    M T W T F S S
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  

Posts Tagged ‘Cannot connect to WMI provider’

Solution : SQL Server Configuration Manager – Cannot connect to WMI provider – Provider load failure [0x80041013]

Posted by blakhani on February 3, 2015


One of my friend had something wrong with SQL Server installation. He did multiple things like repair, registry cleanup etc. I helped him in cleaning up stuff and reinstalling SQL Server. Things were looking good but there was one pending issue.

As soon as he was trying to launch SQL Server Configuration Manager, he was seeing below error.

—————————
SQL Server Configuration 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.
Provider load failure [0x80041013]
—————————
OK  
—————————

 

Another variation of same error is The specified module could not be found. [0x8007007e] – This clearly indicates that some dll is not registered.

He found this KB http://support.microsoft.com/kb/980142 but he was on SQL 2008 SP3 so this was not applicable. Since there was many things done by him, I was almost sure that this is due to either missing DLL or some WMI provider related files. Below were the steps performed to fix the issue.

  • We need to make sure that we have sqlmgmproviderxpsp2up.mof file present and complied. Refer my earlier blog for using mofcomp to compile the mof files.
  • Make sure we have sqlmgmprovider.dll file in “shared” folder. The location of folder would be dependent on SQL version. On my machine it is located under “C:\Program Files\Microsoft SQL Server\100\Shared” The folder 100 is for SQL 2008. Refer below table for version and name mapping.  

Microsoft SQL Server 2014

120

Microsoft SQL Server 2012

110

Microsoft SQL Server 2008 R2

100

Microsoft SQL Server 2008

100

Microsoft SQL Server 2005

90

  • If file is present in the folder, please register the DLL using command (regsvr32.exe "C:\Program Files\Microsoft SQL Server\110\Shared\sqlmgmprovider.dll")
  • Make sure we have file “svrenumapi.dll” in the same folder. If file exists, register it using regsrv32.exe as pointed earlier. In SQL 2014 the file is called as svrenumapi12.dll
  • Make sure that file framedyn.dll exists in “C:\WINDOWS\system32” folder. If not, pick it from C:\WINDOWS\system32\wbem folder and keep it to system32.
  • Check your environment variables. the PATH variable has C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

If none of the above is working then you should download Process Monitor and capture data while launching SQL Server Configuration Manager. Look for “Name not found” and that might give you some hint. Comment below if you found any other solution

Posted in Error, SQL Server | Tagged: , , , , , | 3 Comments »

Solution: Unable to launch SQL Server Configuration Manager – Invalid class [0x80041010]

Posted by blakhani on September 4, 2014


While launching SQL Server Configuration Manager on one of my machine, I got below error

image

Here is the text of the error message:

—————————
SQL Server Configuration 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 [0x80041010]
—————————
OK  
—————————

There might be various reason for this error. In this case our actual problem is “Invalid class” which I have highlighted above. I have looked further and found that below is the solution for me. Same solution also works for Invalid namespace [0x8004100e] error also. 

image

C:\WINDOWS\system32>mofcomp "C:\Program Files (x86)\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof"
Microsoft (R) MOF Compiler Version 6.3.9600.16384
Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
Parsing MOF file: C:\Program Files (x86)\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof
MOF file has been successfully parsed
Storing data in the repository…
Done!

MofComp is a command line utility to compile MOF (Managed Object Format) files and store the data in WMI repository. The MOF Compiler is available in the %Windir%\System32\wbem directory. So if you are getting “‘mofcomp’ is not recognized as an internal or external command then try changing current directory from command prompt to %Windir%\System32\wbem

Also note that in mof file on my machine is under 120 folder. Depends on SQL version installed, you may have it in different folder. The value of that number depends on the version of SQL Server.

Microsoft SQL Server 2014

120

Microsoft SQL Server 2012

110

Microsoft SQL Server 2008 R2

100

Microsoft SQL Server 2008

100

Microsoft SQL Server 2005

90

 

Hope this helps.

  • Cheers,
  • Balmukund Lakhani
  • Twitter @blakhani
  • Author: SQL Server 2012 AlwaysOnPaperback, Kindle
  • Posted in Error, Troubleshooting | Tagged: , , , | 31 Comments »