Export .mpb from sql RRS feed

  • Question

  • Dear all,

    Is it possible to export the .mpb files from ServiceManager Database?

    Friday, March 21, 2014 10:18 AM


  • So what, specifically, do you want to get out? 

    MPB is a Management Pack Bundle, which is exactly what it sounds like; a bundle of management packs and the resources they depend on. You can get sealed and unsealed MPs from the database by going to the administration tab, management packs view, right click and choose export. selecting multiple MPs will export a MPB bundle, but it's constructed by the console by bundling all of those MPs you selected. 

    If you're looking to get packages that were originally imported by a third party product, not really. MPBs are temporary packages, they're not stored in the database anywhere. This won't work for the out of the box MPs either, some of those basic MPs are so basic that they have to be built directly  in the database by the installer. you might need to contact the vendor if you need copies of these. 

    If you want to get copies of the sealed and unsealed management packs out of the database so you can review them, then MPBs won't help you, because they're binary and not human readable. 

    If you're looking to make backups, or look through the out of the box MPs for examples of how to do things, then consider the automation scripts that use the SMLets PowerShell modules and task scheduler to export all unsealed MPs periodically. there are quite a few out there on the net, and i've written 2 or 3 different versions for different clients myself. 

    Also consider the "SuperQuery" (as me and my colleges have taken to calling it). Originally outlined by Travis, it is a VERY expensive query that allows you to basically do a full text search on the whole MP XML Store. This will let you examine the XML behind all management packs that are in your database. IT'S VERY EXPENSIVE, so use sparingly, and don't use it in production. 

    Use ServiceManager
    select MPName, CONVERT(xml,MPXML) as MPXML from ManagementPack  
    where MPXML like '%Incident Support Group%' 
    Order by MPName

    If there's another use case that I've missed, let me know, and maybe we can find the right solution. 

    Friday, March 21, 2014 2:54 PM