none
Database error. MPInfra_p_ManagementPackInstall failed RRS feed

  • Frage

  • Hi Forum,

    anyone out there having an idea how to proceed here? Got this with all MPs, but can repro creating a new one:

    1. Created a new MP
    2. Created a group in this MP
    3. Export MP
    4. do nothing!
    5. Import MP
    6. Get failures:

    In console during import:

    test could not be imported.

    If any management packs in the Import list are dependent on this management pack, the installation of the dependent management packs will fail.

    Database error. MPInfra_p_ManagementPackInstall failed with exception:
    [MP ID: 0feea776-a669-9aea-8612-bd216199d977][MP Version: 1.0.0.0][MP PKT: ]  Database error. MPInfra_p_ManagementPackInstall failed with exception:
    Invalid column name 'DisplayName'.
    Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 2, current count = 0.

    Event 33333:
    Data Access Layer rejected retry on SqlError:
     Request: MPInfra_p_ManagementPackInstall -- (ManagementPackXML=<ManagementPack xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ContentReadable="t...), (ManagementPackXMLUpdateFragment=), (RunTimeXML=<ManagementPack xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ContentReadable="t...), (MPKeyToken=), (VersionDependentId=eeb68572-c6c4-4bc5-bacf-bbda892c3209), (RETURN_VALUE=0)
     Class: 16
     Number: 207
     Message: Invalid column name 'DisplayName'.


    Event 33333:
    Data Access Layer rejected retry on SqlError:
     Request: MPInfra_p_ManagementPackInstall -- (ManagementPackXML=<ManagementPack xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ContentReadable="t...), (ManagementPackXMLUpdateFragment=), (RunTimeXML=<ManagementPack xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ContentReadable="t...), (MPKeyToken=), (VersionDependentId=eeb68572-c6c4-4bc5-bacf-bbda892c3209), (RETURN_VALUE=0)
     Class: 16
     Number: 266
     Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 2, current count = 0.


    Event 26319:
    An exception was thrown while processing TryImportManagementPackWithResources for session ID uuid:06b11b8a-a778-400d-b846-5a380c0e128d;id=599.
     Exception message: Datenbankfehler: MPInfra_p_ManagementPackInstall fehlgeschlagen mit Ausnahmefehler:
    [MP-ID: 0feea776-a669-9aea-8612-bd216199d977][MP-Version: 1.0.0.0][MP-PKT: ]  Datenbankfehler: MPInfra_p_ManagementPackInstall fehlgeschlagen mit Ausnahmefehler:
    Invalid column name 'DisplayName'.
    Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 2, current count = 0.
     Full Exception: : Datenbankfehler: MPInfra_p_ManagementPackInstall fehlgeschlagen mit Ausnahmefehler:
    [MP-ID: 0feea776-a669-9aea-8612-bd216199d977][MP-Version: 1.0.0.0][MP-PKT: ]  Datenbankfehler: MPInfra_p_ManagementPackInstall fehlgeschlagen mit Ausnahmefehler:
    Invalid column name 'DisplayName'.
    Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 2, current count = 0.

    If I rename the ID of the group in the XML I can import it again but not again after that. If I add a class, I can leave it. So there is something with the group(s).

    If I run the stored procedure dbo.p_MPImportXML in SSMS (captured using Profiler) I get this one (sometims different line number):

    Msg 207, Level 16, State 1, Line 1
    Invalid column name 'DisplayName'.
    Msg 266, Level 16, State 2, Procedure p_ManagementPackFinishInstall, Line 0 [Batch Start Line 0]
    Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.

    Not sure what lead into this (probably failed comit)...

    Any idea/help appreciated.

    Thanks,
    Patrick


    Please remember to click 'Mark as Answer' on the post that helped you.

    Patrick Seidl (System Center and Private Cloud)
    s2 - seidl solutions
    Blog: http://www.systemcenterrocks.com

    Montag, 25. November 2019 14:22

Alle Antworten

  • Hi Patrick,

    the issue seems to be with the SQL query run by SCOM upon MP Import, respevtively group creation. Do you use the same group name always to test/reproduce this behaviour? What happens if you chose another, random name?

    What does the group query return in SQL:

    --Get list of groups
    select distinct DisplayName,ManagedEntityRowId from vManagedEntity
    inner join vRelationship on vManagedEntity.ManagedEntityRowId=vRelationship.SourceManagedEntityRowId
    inner join vRelationshipType on vRelationship.RelationshipTypeRowId=vRelationshipType.RelationshipTypeRowId
    inner join vRelationshipManagementGroup on vRelationshipManagementGroup.RelationshipRowId=vRelationship.RelationshipRowId
    where (vRelationshipType.RelationshipTypeSystemName='Microsoft.SystemCenter.ComputerGroupContainsComputer'
    or vRelationshipType.RelationshipTypeSystemName like '%InstanceGroup%')
    and vRelationshipManagementGroup.ToDateTime is null
    order by DisplayName asc

    Do you see some orphaned (or strange) entries? Wat about their DisplayName?

    Regards,


    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov


    Montag, 25. November 2019 14:50
    Moderator
  • Salü Stoyan,

    fully agree on that.

    When I use the same name (not Display Name, that one does not matter, of course) it does not work.

    Once I randomly change the name it works. After that, I can rename back to the original one and it works again once.

    Nothing there what would ring a bell...

    Thx, Patrick


    Please remember to click 'Mark as Answer' on the post that helped you.

    Patrick Seidl (System Center and Private Cloud)
    s2 - seidl solutions
    Blog: http://www.systemcenterrocks.com

    Montag, 25. November 2019 15:03
  • Can't repro.  Works fine here.  

    What version of SCOM?  Might be language related?


    Kevin Holman https://kevinholman.com/

    Dienstag, 26. November 2019 17:58
    Moderator
  • Kevin, hi.

    I expected that. Nothing Special there and I have it for every MP, even if I export an unsealed one and import it straight again.

    It is 2016 UR8.

    Probably language… but have no clue where this might come from (and how it goes away again ;-) ).

    Cheers,
    Patrick


    Please remember to click 'Mark as Answer' on the post that helped you.

    Patrick Seidl (System Center and Private Cloud)
    s2 - seidl solutions
    Blog: http://www.systemcenterrocks.com

    Mittwoch, 27. November 2019 08:56
  • At this point I think would try a SQL trace to get a clearer idea of what exactly the query is trying to do...
    Mittwoch, 27. November 2019 09:35
  • Agree. Did already to a certain level.

    Found already that part (copied from above):

    If I run the stored procedure dbo.p_MPImportXML in SSMS (captured using Profiler) I get this one (sometims different line number):

    Msg 207, Level 16, State 1, Line 1
    Invalid column name 'DisplayName'.
    Msg 266, Level 16, State 2, Procedure p_ManagementPackFinishInstall, Line 0 [Batch Start Line 0]
    Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.

    What confuses me are the different line numbers when I do the import in SSMS directly. And based on my feeling, the number shown is not the actual line number in the statement. Plus, often there are variables what makes it hard to execute just parts of the procedure.

    Thanks again,
    Patrick


    Please remember to click 'Mark as Answer' on the post that helped you.

    Patrick Seidl (System Center and Private Cloud)
    s2 - seidl solutions
    Blog: http://www.systemcenterrocks.com

    Mittwoch, 27. November 2019 09:46
  • Kevin, hi.

    Looks like UR8 SQL is broken… 

    update_rollup_mom_db.sql drops and (re-) creates the p_ManagementPackFinishInstall stored procedure. 

    Here it uses MT.DisplayName in lines 3219-3224 and based on the MG here I see column DisplayName_55270A70_... for MT_UINameSpace<GUID>$Group tables (probably classes in general).

    Once I replace the wrong entry in the UR8 SQL, run it (so it replaces the wrong SP) I can successfully import MPs again.

    I will leave a comment on your blog post either, kindly asking for feedback on that:

    https://kevinholman.com/2019/09/28/ur8-for-scom-2016-step-by-step/

    Thanks for your time (all of you),

    cheers,

    Patrick


    Please remember to click 'Mark as Answer' on the post that helped you.

    Patrick Seidl (System Center and Private Cloud)
    s2 - seidl solutions
    Blog: http://www.systemcenterrocks.com

    Montag, 9. Dezember 2019 12:22
  • i'm seeing this same behavior after upgrading from ur6 to ur8, but only when i import the "system center core library" mp. i'm able to import other MPs. 

    can we elaborate on this

    "Once I replace the wrong entry in the UR8 SQL, run it (so it replaces the wrong SP) I can successfully import MPs again."

    Montag, 16. Dezember 2019 21:34
  • John, hi.

    Have you tried updating a MP containing a custom group?

    Just try to repro the steps in my initial posting.

    Best,
    Patrick


    Please remember to click 'Mark as Answer' on the post that helped you.

    Patrick Seidl (System Center and Private Cloud)
    s2 - seidl solutions
    Blog: http://www.systemcenterrocks.com

    Mittwoch, 18. Dezember 2019 10:37