Figuring out Management Pack Dependencies

Figuring out Management Pack Dependencies

  • Comments 5
  • Likes

I hope none of you ever have to do this but it does come up occasionally and it’s good to know how to do this just in case….

Sometimes when you go to remove a management pack in the console you will discover that you can’t because there are some other management packs that depend on it.  You’ll see an error message like this:

image

You can look up which management packs depend on that management pack by opening the Properties dialog for that management pack:

image

If you really don’t care about what is in those management packs you can just delete them but chances are there are things in there that you care about but there are also potentially a few things in there which have a dependency on the MP you are trying to delete.  It would be really nice if we had a button right here that you could click on that said “Show me all the templates, notification templates, queues, groups, etc. in this MP that depend on the MP I am trying to delete”.    First of all that is way too long of a name for a button! Smile  It’s also not something that is easy to figure out in the database in some cases. 

It’s actually not too bad to figure it out with a little exploring in the Service Manager database if you know what you are doing though.

First, start by finding the GUID of the MP that you are trying to delete using a query like this:

SELECT MPName, ManagementPackID FROM ManagementPack WHERE MPName like ‘%<something…>%’

image

Now take the GUID of the MP that you are trying to delete and run a query like this:

SELECT ManagementPackIdReffedBy FROM ManagementPackReferences WHERE ManagementPackIdSource = ‘<the GUID you got from the first query>’

image

Then for each of the GUIDs that you get back run this query:

SELECT CONVERT (XML, MPXML) FROM ManagementPack WHERE ManagementPackId = ‘<the GUID from the previous query>’

image

Then click the hyperlink that results:

image

Then you can look for the alias that is used to reference the management pack you are trying to delete:

image

Then look for the alias throughout the management pack using CTRL + F (find).  Search for the Alias + ! like this:

image

You’ll find cases like this one:

image

Now search for the ID until you find the DisplayString element like this:

image

image

Now you know to look for ‘Company Web Application event workflow’ and you can delete that item from the UI so there is no longer a dependency between the MPs!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Hi Travis,

    I have imported SLA Incident Management Pack provided by codeplex (scsmincidentsla.codeplex.com) and wanted to delete those MPs, but I could not remove SLA Managemet Library (sealed) MP because now two built in Incident MPs depend on it and I can't find how is it related to those two. I have delete all Templates, subscriptions and rest that I have created according to SLA Management.

    Any suggestion about this?

    PS

    By the way, SLA Incident Management v0.2 doesn't work for my SCSM SP1 (ProcessIncident workflow doesn't occur) or I missed something(?). Any help with this?

  • @Ljubodrag

    You followed the instructions above but were not able to figure out the dependencies?

    Re: ProcessIncident workflow..  did you place the .dll file in C:\Program Files\Microsoft System Center\Service Manager 2010?  Have you tried these instructions to troubleshoot the workflow?

    blogs.technet.com/.../troubleshooting-workflows-in-service-manager.aspx

  • Thank you Travis,

    I did follow the instructions, but still cant find dependencies.

    Here are the steps:

    ---------------------------------------------

    "First, start by finding the GUID of the MP that you are trying to delete using a query like this:

    SELECT MPName, ManagementPackID FROM ManagementPack WHERE MPName like ‘%<something…>%’"

    I typed:

    select * from ManagementPack where MPName like '%SLA%'

      ManagementPackId

    1. 07130817-E334-480B-B780-0737A61AF822

    2. 04798DC1-7E86-5FD1-B9C9-35AE1B55C781

    3. 4E7302A9-8049-DD97-954D-CE310F2B7255

      MPName

    1. ResponseTimeSLA.Config

    2. Microsoft.Demo.IncidentSLAManagement.Library

    3. ResponseTimeSLA.Library

    ------------------------------------------------

    "Now take the GUID of the MP that you are trying to delete and run a query like this:

    SELECT ManagementPackIdReffedBy FROM ManagementPackReferences WHERE ManagementPackIdSource = ‘<the GUID you got from the first query>’"

    I run the query:

    select ManagementPackIdReffedBy from ManagementPackReferences where ManagementPackIdSource = '04798DC1-7E86-5FD1-B9C9-35AE1B55C781'

    Results:

    ManagementPackIdReffedBy

    EB564D31-BAC9-32B6-F5CD-DA3DC4515A36

    B1207CE1-D1EE-CD35-65EA-F8B10BEBAC7D

    ------------------------------------------------

    "Then for each of the GUIDs that you get back run this query:

    SELECT CONVERT (XML, MPXML) FROM ManagementPack WHERE ManagementPackId = ‘<the GUID from the previous query>’"

    I run the query:

    select CONVERT (XML, MPXML) FROM ManagementPack where managementpackid = 'EB564D31-BAC9-32B6-F5CD-DA3DC4515A36'

    or managementpackid = 'B1207CE1-D1EE-CD35-65EA-F8B10BEBAC7D'

    Results:

    Two MPs that MP I want to delete is refered by.

    -------------------------------------------------

    "Then you can look for the alias that is used to reference the management pack you are trying to delete:"

    Alial to reference the MP I want to delete is: CustomMicrosoft_Demo_IncidentSLAManagement_Library

    -------------------------------------------------

    "Then look for the alias throughout the management pack using CTRL + F (find).  Search for the Alias + !..."

    I tried to find the "CustomMicrosoft_Demo_IncidentSLAManagement_Library!" in both MPs but was unsuccessfull.

    -------------------------------------------------

    I don't know if I missed something or misunderstood?

  • @Ljubodrag T.

    Looks like you did everything right.  If you want you can send me the XML from this query and I can take a look:

    select CONVERT (XML, MPXML) FROM ManagementPack where managementpackid = 'EB564D31-BAC9-32B6-F5CD-DA3DC4515A36'

    or managementpackid = 'B1207CE1-D1EE-CD35-65EA-F8B10BEBAC7D'

    email : twright@ThatBigSoftwareCompany.com

  • Thanks Travis, I have sent you an email with the xml files.