all bits considered data to information to knowledge

16Oct/120

Cannot connect to WMI provider: mofcomp to the rescue!

[problem]

Launching SQL Server Configuration Manager for SQL Server 2005 express edition fails with an error  "Cannot connect to WMI provider – Invalid class [0x80041010]"

[background story]

A SQL Server 2005 Express Edition has been installed on my Win2003 R2 server for quite awhile now. It was configured to use named pipes and Windows Authentication since initial intention was to prevent any outside access to it...

Well, times change - I needed a sandbox to install Informatica PowerCenter for a proof-of-concept. Informatica 9.5 PWC uses a relational database (Oracle, SQL Server or IBM DB2) to store its metadata, and, according to documentation, express editions of any of these RDBMS are sufficient for this to work (barely, not suitable for large scale production environment, for sure!)

While running Informatica 9 Pre-Installation System Check Tool (i9Pi) I have encountered a problem - the tool (and presumably Informatica PWC) is using JDBC to connect to the database, and therefore requires TCP/IP protocol to be enabled for the SQL server 2005 Express (an easy task by itself)  . But the  SQL Configuration Manager utilityfailed to launch with a bizarre message I've never seen before:

Cannot connect to WMI provider – Invalid class [0x80041010]

My initial thoughts were that my account under which I've logged onto the server lacks privileges to launch the application, so i re-logged in with an admin password - only to face exactly the same message!

[solution]

Apparently, not all files necessary for the management console have been installed/registered with WMI... I cannot say whether this is by design, or somehow my installation was corrupted. But using the Managed Object Format (MOF) compiler - supplied with Microsoft within the installation of the SQL server - I was able to remedy my situation by running the following command at the command prompt:

>mofcomp   sqlmgmproviderxpsp2up.mof

Using MOF compiler

In my case - SQL Server 2005 Express Edition - the file needed to be parsed and added to WMI repository was called [sqlmgmproviderxpsp2up.mof], for other editions (Standard, Enterrise etc.) it will be [sqlmgmprovider.mof]. Locations will also vary depending on the version and edition you've installed:

Microsoft SQL server\90\Shared - for SQL server 2005

Microsoft SQL server\100\Shared - for SQL server 2008 (yes, it can be affected, too!)

P.S. You need to start CMD with elevated privileges as the changes are made to the entire system

Hope this helps to save someone minutes (or hours) of confusion!

 

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.