none
DPM could not enumerate SQL Server instances using Windows Management Instrumentation RRS feed

  • Question

  • Hi

    I have a problem with a SQL 2008 Server in DPM.
    When I create a new Protection Group and browse the SQL Server I receive the Error "DPM could not enumerate SQL Server instances using Windows Management Instrumentation on the protected computer SRV-SQL-001.test.local (ID: 965)"

    On the SQL Server in the DPMRACurr.Errlog File are the following entries:

     WARNING Failed: Hr: = [0x8004100e] : unable to connect to the wmi namespace: root\Microsoft\SqlServer\ComputerManagement
    wmiqueryhelper.cpp(158) [000000000344EFB8]  WARNING Failed: Hr: = [0x80041010] : unable to execute the WQL query: SELECT * FROM ServerSettings
    sqlmirroringhelper.cpp(159) [000000000344F558]  WARNING Failed: Hr: = [0x80041010] : F: lVal : wmiQueryHelper.ExecuteWQLQuery(ssWMIQuery)
    sqlmirroringhelper.cpp(75) [000000000344F558]  WARNING Failed: Hr: = [0x80041010] : u: lVal : GetInstanceNamesFromWMI(ssWMINamespace, arrLocalInstanceNames)
    neapplicationnamespace.cpp(1582) [0000000000393890]  WARNING Failed: Hr: = [0x80041010] Failed to query SQL instancess from WMI

    The WMI Namespace root\Microsoft\SqlServer\ComputerManagement does not exist on the SQl Server. But I think this in normal because the correct namespace for SQL 2008 should be root\Microsoft\SqlServer\ComputerManagement10

    It seems like the DPM Agent recognizes the SQL 2008 Server as a SQL 2005.

    Because of this error the autoprotection of new Databases doesn't work. How can I fix this error?

    Thx

    J0fe

    Wednesday, October 27, 2010 7:57 AM

Answers

  • I've found the solution.
    After reinstalling the sqlmgmproviderxpsp2up.mof file the WMI class was available and the error was gone.

    The following command will reinstall the mof file:
    mofcomp C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof

    J0fe

    • Marked as answer by J0F3MVP Tuesday, November 2, 2010 7:59 PM
    Tuesday, November 2, 2010 7:59 PM

All replies

  • Has anyone a Idea ?

    How detect the DPM Agent the SQL Server Version ?

    Thx

    Tuesday, November 2, 2010 7:49 AM
  • Hi J0fe

    Is your SQL server an upgraded version from 2005 to 2008? What operating system is the SQL server running on?

     

    BR

    Robert Hedblom



    Check out my DPM blog @ http://robertanddpm.blogspot.com

    Tuesday, November 2, 2010 8:36 AM
    Moderator
  • Hi Robert

    No, the server is not an upgraded version. Version 2008 was installed from the beginning.

    The SQL Server is running on a Windows 2008 R2 Server.

    Thx

    J0fe

    Tuesday, November 2, 2010 2:44 PM
  • I've some more information:

    I changed the TraceLogLevel of the DPM Agent on the SQL Server to TRACE_EVERYTHING and now I figured out that the WMI namespace was not the problem.
    The Agent connects also to the root\Microsoft\SqlServer\ComputerManagement10 namespace but finally there is no "ServerSettings" class. That’s because the WMI Query fails.

    So it seems that the WMI namespace of the SQL Server is somehow corrupt...

    J0fe

    Snippet from the logfile:

    (86) [0000000003D7EE58]  VERBOSE ==>CWMIQueryHelper::ConnectToNamespace
    1AA8 2140 11/02 15:36:51.181 22 wmiqueryhelper.cpp(93) [0000000003D7EE58]  VERBOSE Connecting to WMI namespace root\Microsoft\SqlServer\ComputerManagement
    1AA8 2140 11/02 15:36:51.271 22 wmiqueryhelper.cpp(105) [0000000003D7EE58]  WARNING Failed: Hr: = [0x8004100e] : unable to connect to the wmi namespace: root\Microsoft\SqlServer\ComputerManagement
    1AA8 2140 11/02 15:36:51.271 22 wmiqueryhelper.cpp(86) [0000000003D7EE58]  VERBOSE <--CWMIQueryHelper::ConnectToNamespace
    1AA8 2140 11/02 15:36:51.271 61 sqlmirroringhelper.cpp(185) [0000000003D7F3F8]  VERBOSE ignoring wmi namespace does not exist error
    1AA8 2140 11/02 15:36:51.271 22 wmiqueryhelper.cpp(47) [0000000003D7EE58]  VERBOSE ==>CWMIQueryHelper::Initialize
    1AA8 2140 11/02 15:36:51.271 22 wmiqueryhelper.cpp(47) [0000000003D7EE58]  VERBOSE <--CWMIQueryHelper::Initialize
    1AA8 2140 11/02 15:36:51.271 22 wmiqueryhelper.cpp(86) [0000000003D7EE58]  VERBOSE ==>CWMIQueryHelper::ConnectToNamespace
    1AA8 2140 11/02 15:36:51.271 22 wmiqueryhelper.cpp(93) [0000000003D7EE58]  VERBOSE Connecting to WMI namespace root\Microsoft\SqlServer\ComputerManagement10
    1AA8 2140 11/02 15:36:51.277 22 wmiqueryhelper.cpp(86) [0000000003D7EE58]  VERBOSE <--CWMIQueryHelper::ConnectToNamespace
    1AA8 2140 11/02 15:36:51.277 22 wmiqueryhelper.cpp(144) [0000000003D7EE58]  VERBOSE ==>CWMIQueryHelper::ExecuteWQLQuery
    1AA8 2140 11/02 15:36:51.277 22 wmiqueryhelper.cpp(149) [0000000003D7EE58]  VERBOSE Executing the WQL query SELECT * FROM ServerSettings
    1AA8 2140 11/02 15:36:51.288 22 wmiqueryhelper.cpp(158) [0000000003D7EE58]  WARNING Failed: Hr: = [0x80041010] : unable to execute the WQL query: SELECT * FROM ServerSettings

    Tuesday, November 2, 2010 5:58 PM
  • I've found the solution.
    After reinstalling the sqlmgmproviderxpsp2up.mof file the WMI class was available and the error was gone.

    The following command will reinstall the mof file:
    mofcomp C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof

    J0fe

    • Marked as answer by J0F3MVP Tuesday, November 2, 2010 7:59 PM
    Tuesday, November 2, 2010 7:59 PM
  • Does anyone know what causes this? I keep having to do it.

    CarolChi

    Thursday, February 14, 2013 4:20 PM
  • Joe,

    sorry I am new to DPM did you isntal that on the target server or on the DPM server?

    Wednesday, January 8, 2014 5:49 PM
  • On the target SQL Server
    Thursday, January 9, 2014 6:25 AM
  • I know this thread is old but to resolve this issue, on your SQL server you would want to run:

    mofcomp "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"

    Then on your DPM server from the DPM Management Shell run:

    Autoprotectinstances.ps1

    Friday, July 28, 2017 1:40 PM
  • Yes, it' basically the same which I wrote already above (ain Nov 2010) ;-)
    Tuesday, August 1, 2017 10:03 AM
  • One of the unanswered questions is "why" does this file keep needing to be re-installed?

    I have to do this almost monthly with no explanation anywhere....


    Randall

    Friday, May 11, 2018 3:22 PM