SQL SERVER – Rule “Windows Management Instrumentation (WMI) Service” failed

A hotel back-office bell board of small numbered brackets, one bracket empty where a bell has been taken out.

When I visit my client site for doing performance tuning consulting, I sometimes get trapped with some unrelated issue. Here is one of the situation where they were upgrading from SQL 2008 R2 to SQL 2014 on a two node cluster. During upgrade two rules were failing. In this blog post we will learn about how to fix when rule “Windows Management Instrumentation (WMI) Service” fails.

Failing Rule 1

Rule “Windows Management Instrumentation (WMI) service” failed.
The WMI service is not running on the cluster node.

Failing Rule 2

Rule “Not clustered or the cluster service is up and online.” failed.
The machine is clustered, but the cluster is not online or cannot be accessed from one of its nodes. To continue determine why the cluster is not online and rerun setup instead of rerunning the rule since the rule can no longer detect a cluster environment correctly.

As per MSDN documentation, I found Detail.txt file and here was the stack when error occurred

(06) 2016-11-19 19:59:09 Slp: Error while retrieving the cluster WMI namespace on machine NODE03; Error is as follows System.Management.ManagementException: Invalid class
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObject.Initialize(Boolean getObject)
at System.Management.ManagementBaseObject.get_Properties()
at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
at Microsoft.SqlServer.Configuration.WMIInterop.Cluster.get_Name()
at Microsoft.SqlServer.Configuration.Cluster.Rules.WMIServiceFacet.ClusterWmiCheck()

I tried following test for WMI based on my internet search:

  • Start > Run > WBEMTest
  • The “Windows Management Instrumentation Tester” will launch
  • Select Connect
  • Namespace: Root\MSCluster
  • Select Connect

If we see more options available, it means you are connected and WMI is working. In my case, I received below error

Number: 0x80041010
Facility: WMI
Description: Invalid Class

WORKAROUND/SOLUTION

Since there was invalid class for cluster this means that cluster namespace missing in WMI. So, we need to compile the .mof file for cluster. Here is the magical command which fixed all above errors.

Mofcomp.exe ClusWMI.mof

A single bell push on a wall with its faceplate off and the wire behind it disconnected.

Once above command had run it added the namespace back.

Did you see same error and found different solution? Please share with other readers.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

SQL Error Messages, SQL Server, Starting SQL, WMI
Previous Post
SQL SERVER – Msg 19062, Level 16, State 1. Could Not Create a Trace File. Error = 0x80070005
Next Post
How to Remove Database Mail History and Stop msdb Growing

Related Posts

2 Comments. Leave new

  • RESTORE DATABaSE RecoverTestDatabase_COPY
    FROM DISK = ‘C:Program Files (x86)Microsoft SQL ServerMSSQL12.SQL2014MSSQLDATA:RecoverTestDatabase_FULL.bak’
    WITH
    MOVE ‘RecoverTestDatabase’ TO ‘C:Program Files (x86)Microsoft SQL ServerMSSQL12.SQL2014MSSQLDATA:RecoverTestDatabase.mdf’
    ,MOVE ‘RecoverTestDatabase_log’ TO ‘C:Program Files (x86)Microsoft SQL ServerMSSQL12.SQL2014MSSQLDATA:RecoverTestDatabase_log.mdf’
    ,REPLACE
    ,NORECOVERY;
    GO…

    My error is :

    Msg 3201, Level 16, State 2, Line 70
    Cannot open backup device ‘C:Program Files (x86)Microsoft SQL ServerMSSQL12.SQL2014MSSQLDATA:RecoverTestDatabase_FULL.bak’. Operating system error 2(The system cannot find the file specified.).
    Msg 3013, Level 16, State 1, Line 70
    RESTORE DATABASE is terminating abnormally.

    Reply
  • How to compile the .mof file for cluster?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.