Tuesday, 7 October 2008

Changing the data retention in the OpsMgr datawarehouse

Ok, imagine the scenario, you are doing a POC of OpsMgr 07 for an organisation and because they only want to evaluate 'fit' of all OpsMgr components within their environment they do not want to provide you lots of space for the data warehouse. Well, what can you do? If it was the Operations Manager database then it would be possible to change retention days in the Administration section of the console but this is not possible with the data warehouse. So you could:

(1) Change the default data retention by altering the MaintenanceSetting table in the data warehouse. the table is split into two sections; "config space” (management packs, rules they contain,overrides created, etc) and “instance space” (objects discovered,their properties and relationships, etc.) The columns of interest are:

Instance Space settings
  • LastInstanceGroomingDateTime - the last time grooming operations were performed.
  • InstanceGroomingFrequencyMinutes - frequency of the grooming processstart (default: 480)
  • (most important) InstanceMaxAgeDays - maximum age (since the day instancewas deleted) for the instance space objects (default: 400)
  • InstanceMaxRowsToGroom - maximum number of objects to delete in one run(default: 5000).
Config space settings
  • LastConfigGroomingDateTime - the last time grooming operations were performed
  • ConfigGroomingFrequencyMinutes - frequency of the grooming process start(default: 60
  • ManagementPackMaxAgeDays - maximum age for the management pack (since theday MP was uninstalled) (default: 400)
  • NonSealedManagementPackMaxVersionCount - maximum # of non-sealed MPversions to preserve (independent of the age) (default: 3)

OR alternatively you could use the Data Warehouse Retention Policy tool (DWDATARP.exe) available from the Microsoft Operations Manager 2007 product team - http://blogs.technet.com/momteam/archive/2008/05/14/data-warehouse-data-retention-policy-dwdatarp-exe.aspx.

To use:

  • To view current Data Retention settings run:
  • dwdatarp.exe –s “dw servername” –d “dw databasename”
    example: C:\dwdatarp>dwdatarp -s opsmgrsp1 -d OperationsManagerDW
  • To set Data Retention for a particular dataset run:
    dwdatarp.exe –s “dw servername” –d “dw databasename” – ds “dataset name” –a “aggregation name” –m “days”
    example: C:\dwdatarp>dwdatarp -s opsmgrsp1 -d OperationsManagerDWds “Performance data set” –a “Hourly aggregations” –m 399

Maybe with Operations Manager 2007 SP2 will see this functionality inbuilt within the Operations Manager 2007 console?

No comments: