none
SCOM 2012 SQL Server 2008 R2 Instances not discovered

    Question

  • Hallo zusammen,

    ich habe in meinem SCOM 2012 drei Server mit SQL Servern. Einer mit W2K8 R2 Ent und SQL Server 2008 R2 (hier läuft alles gut) und zwei neue mit W2K12 Datacenter und SQL Server 2012 SP1 und SQL Server 2008 R2 SP2. Die zuletzt genannten Maschinen sind als Windows Cluster mit Always On konfiguriert.

    Zuerst habe ich hier jeweils die 2 2012er Instanzen installiert. Danach kam die 2008er Instanz.

    Anschließend erschien um SQL Konfig Manager die Meldung "The server threw an exception [0x80010105]".

    Das konnte ich durch diese Anleitung beheben http://support.microsoft.com/kb/2849344 .

    Mit der Installation des SCOM 2012 Agents wurden dann die SQL 2012 Instanzen gefunden, aber nicht die 2008er.

    Im Eventlog des Operations Manager kommt diese Meldung

    DiscoverSQL2008DBEngineDiscovery.vbs : The Query 'select * from SqlService where SQLServiceType ='1'' did not return any valid instances.  Please check to see if this is a valid WMI Query.. The server threw an exception.

    Kann jemand helfen?


    Thursday, September 05, 2013 10:14 AM

All replies

  • Hi,

    Versuch mal via WMI Code Creator zu überprüfen was WMI zurückgibt.

    Download: (WMI Code Creator)

    Oder zu verwendest folgenden Code als VB Script:

    strComputer = "." 
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Microsoft\SqlServer\ComputerManagement10") 
    Set colItems = objWMIService.ExecQuery( _
        "SELECT * FROM SqlService WHERE SQLServiceType = 1",,48) 
    For Each objItem in colItems 
        Wscript.Echo "-----------------------------------"
        Wscript.Echo "SqlService instance"
        Wscript.Echo "-----------------------------------"
        Wscript.Echo "ServiceName: " & objItem.ServiceName
        Wscript.Echo "SQLServiceType: " & objItem.SQLServiceType
    Next

    Damit solltest du alle SQL Server 2008 Instanzen bekommen.

    Cheers

    Christoph

    Friday, September 06, 2013 6:56 PM
  • Hi,

    Maybe you can change the local language to English so that you can get more help.

    Thanks.


    Alex Zhao
    TechNet Community Support

    Saturday, September 07, 2013 12:36 PM
    Moderator
  • Hi Christoph,

    ich habe Dein Script mit cscript in einer Kommandozeile ausgeführt. Aber es kommt der gleiche Fehler

    Prompt cscript.exe D:\Scripts\sqltest.vbs
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.

    D:\Scripts\sqltest.vbs(5, 1) (null): The server threw an exception.

    So langsam glaube ich die Lösung unter  http://support.microsoft.com/kb/2849344 ist noch nicht ausgereift.

    Gruß Andreas

    Tuesday, September 10, 2013 6:54 AM
  • Hallo Christoph,

    ich habe Dein Script folgendermaßen abgewandelt:

    strComputer = "." 
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Microsoft\SqlServer\ComputerManagement11") 
    Set colItems = objWMIService.ExecQuery( _
        "SELECT * FROM SqlService WHERE SQLServiceType = 1",,48) 
    For Each objItem in colItems 
        Wscript.Echo "-----------------------------------"
        Wscript.Echo "SqlService instance"
        Wscript.Echo "-----------------------------------"
        Wscript.Echo "ServiceName: " & objItem.ServiceName
        Wscript.Echo "SQLServiceType: " & objItem.SQLServiceType
    Next

    also \root\Microsoft\SqlServer\ComputerManagement10 durch \root\Microsoft\SqlServer\ComputerManagement11 getauscht.

    Wenn ich das nun ausführe, bekomme ich als Ergebnis alle installierten SQL Instanzen.

    Hilft das zur Eingrenzung des Fehlers? mofcomp "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof" habe ich auch schon ausgeführt.

    Tuesday, September 10, 2013 10:39 AM
  • Hi Andreas,

    I will write now in english as it is maybe good for other people to know it also.

    I took a look at the Discovery Script in the SQL 2008 Discovery Management Pack and i found what i expected:

    Const SQL_WMI_NAMESPACE = "ComputerManagement10"

    and

    TargetComputer & "\root\Microsoft\SqlServer\" & SQL_WMI_NAMESPACE, "select * from SqlService where SQLServiceType ='1'")

    If we have to look  in "ComputerManagement11" on Windows Server 2012 the discovery script could not work there from my point of view at the moment.

    Cheers







    Tuesday, September 10, 2013 4:13 PM
  • Hi there,

    nearly the same problem here:

    1. Server: W2K8R2, SCOM 2012, MSSQL 2008R2
    2. Server: W2K8R2, MSSQL 2008R2, MSSQL 2012

    Only the IntegrationServices (2008 and 2012) are shown in SCOM.
    (Both installed with standard installation procedure, no manual changes to configuration files,
    there are 2 SSIS services running on one maschine.)

    Analysis-/Reporting-/Database-Services in SCOM only shown for the instanzes
    based on the MSSQL 2012 installation.

    Known issue?

    Wednesday, September 11, 2013 6:59 PM
  • Hi,

    I combine my experiences in english.

    In my case the file DiscoverSQL2008DBEngineDiscovery.vbs wasn't in the agent directory. After some research, I came to this site http://sharepointadminwiki.wordpress.com/2013/03/06/scom-2012-sp1-error-failed-to-run-a-process-or-script-during-sql-2008-discovery/ It is such the same szenario. But, when I export the script from the xml, the script does not work. I got some errors. The first error is in line 28 near this  

    If oError.Number <>

    Perhaps someone can do the same steps.

    So I decided to took the script DiscoverSQL2008DBEngineDiscovery.vbs from my old SCOM 2007 R2 environment and copied it in the agent directory. After restart the System Center Management Service I got the error "The Server threw an exception". Is it right, that this script is deleted in the agent folder?

    In my test cluster I deployed SCOM 2012 agents to it. In this case there are 2 SQL 2012 instances and 1 sql 2008 R2 instances too. In this environment everything ist fine. All instances were discovered without any additional work.

    So, what is the right way? Update the DiscoverSQL2008DBEngineDiscovery.vbs like Christoph wrote and update the WMI scope to "ComputerManagement11" or take some time with the exported script.

    Thursday, September 12, 2013 7:14 AM
  • Hi,

    Is the Cluster in the Test Environment also Windows Server 2012 or Windows Server 2008 R2?

    Cheers

    Thursday, September 12, 2013 6:51 PM
  • Hi Christoph,

    it is on W2K12.

    Friday, September 13, 2013 6:34 AM
  • Ok that is strange :). Do we have there also only the "ComputerManagement11" or also a "ComputerManagement10" ?
    Friday, September 13, 2013 6:46 AM
  • Yes that ist really strange! I query to Namespace

    "root\Microsoft\SqlServer\ComputerManagement10" with wbemtest.exe and

    "select * from SqlService where SQLServiceType ='1'" I get my SQL Server 2008 R2 Named Instance back.

    When I query to "root\Microsoft\SqlServer\ComputerManagement11" I get all my 3 Instances.

    Friday, September 13, 2013 7:07 AM
  • Hmm,

    mofcomp C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof is already done right? Normally that should fix it and create the correct ComputerManagement10 WMI space.

    Friday, September 13, 2013 7:40 AM
  • Yes I have done this many times.

    Additionally I unregesitred the msclus.dll on one testcluster note and reboot it to get to my initial point.

    But I have no luck. The namespaces are queried succesfully and in  the SQL Server Config Manager is still all fine.

    Any other ideas?

    Friday, September 13, 2013 8:33 AM
  • I have no idea at the moment sorry :(

    Friday, September 13, 2013 9:26 AM