Huntland Services Ltd

Tel: +44 (0)1392-490518
Fax: +44 (0)1392-428003
Enquiries@huntland.co.uk

Dump Mom Company KnowledgeBase Articles

 

Back

Download The Script

Mom Company Knowledgebase articles are associated with Processing Rule Groups and individual Processing Rules.  The information is stored in two tables; ProcessingRule holds the name and identity of a rule or a group, while ProcessingRuleComment holds the actual Knowledge Base article.  In the latter table articles are stored as a continuous html stream, sometimes in multiple rows if the size is greater than 3500 bytes.

This script will create an Html file for each article using the name of the rule or group appended to the rule/group identity number.  This means you can trace back an article to the rule/group with which it is associated.   For example:

C:\temp\Could not read from file {8A086A54-7DC1-11D3-AB44-0090275A4C62}.html

The script can be run from the command prompt using cscript dumpMomKb.vbs, or interactively by double clicking on DumpMomKb.vbs.  The script assumes you already have sufficient authority to access the Mom Sql Server and OnePoint Database.

It takes as its input:

  1. The Name of the Mom SQL server - this is the server that has the OnePoint database.  Incidentally OnePoint is hardcoded so if you have a different database name change this in the script.
  2. Output Directory - this is the full path to the folder where the output files will be dumped.  Notice this folder must exist before the script is run.
  3. Rule or Group Name - this is the name of the rule/group as it is displayed in the Mom Admin console 'Processing Rule Group Node'.  If you want a range of rule/groups to be dumped use the valid SQL wild cards as in 'Microsoft Windows 2000%' which will dump any rule that begins with 'Microsoft Windows 2000' e.g. 'Microsoft Windows 2000 Active Directory', 'Microsoft Windows 2000 Operating System', etc.

The only other thing to be concerned with is how long this takes!!  ADODB commands have an inbuilt timeout value so that if the data has not been returned the script halts with an error.  Make the timeout too short and the script never completes.  To dump the entire Knowledge Base from my remote server with just the default MOM Management Packs installed (6,373 articles, approx 20MB) took 11 minutes.   The timeout value in the script is therefore set to 14 minutes but you can easily adjust this by editing the script where indicated.

 

Please accept this script as is.  Any feedback will be gratefully received at Debug@Huntland.co.uk