Welcome to MSDN Blogs Sign in | Join | Help

SCOM 2007 - operational and datawarehouse grooming

The mechanism for grooming the operational database in SCOM has changed compared to MOM 2005.  In MOM 2005 we had a SQL job to handle the grooming – in SCOM 2007 we have a SCOM rule.  The rule has a set schedule to run daily at midnight – and there is no built in override to allow this schedule to be changed.   In some situations, it's helpful to manually force grooming.  This can be done by manually executing the p_partitioningandgrooming stored procedure.  This will call a series of other procedures which will grab your groom settings (retention threshold values) from the database and proceed with the groom. 

The mechanism for grooming the datawarehouse is a bit more involved.  First, there is no way to set the data retention period for the warehouse in the UI.  These retention periods are stored in the MaxDataAgeDays column in the StandardDatasetAggregation table of the warehouse.  You can set these however you like.  From there, grooming (and aggregation actually) happens every time data is inserted into the warehouse.  To be sure though, you can also trigger it to happen manually by running the following stored procedure from the data warehouse. 

Exec standarddatasetgroom <datasetid> 

The dataset ID’s represent the type of data to be acted on.  You can grab the datasetid from the dataset table which is also in the datawarehouse.  If you open this table you will note there are 5 dataset types – event, client monitoring, performance, alert and state. 

When SCOM actually does the aggregation and groom job it calls the standarddatasetmaintenance stored proc which will result in the standarddatasetgroom procedure getting called.  For grooming, we don’t care about aggregation so we can just call the groom job directly.

Published Thursday, December 13, 2007 11:24 PM by steverac
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# MSDN Blog Postings &raquo; SCOM 2007 - operational and datawarehouse grooming

Friday, January 11, 2008 10:37 AM by Steve Rachui's Manageability blog - SMS/MOM

# A few opsmgr questions of interest - Question 7

1. How does reindexing work in opsmgr? Is it a SQL job? Which one? Is it a rule in the SQL management

Sunday, May 31, 2009 2:50 AM by steverac

# re: SCOM 2007 - operational and datawarehouse grooming

This was a while back but just noticed it.  Reindexing is handled by an internal OpsMgr job that runs on the RMS at 2:30 AM daily.  This is not configuraable.  Unlike MOM 2005, there s no sql job listed in the SQL console - just an Opsmgr rule that fires the appropriate stored procedure.  The reindex job doesn't reindex everything but it cleans up most data.

# OpsMgr DB Grooming – How it works

A while back I wrote up a blog post on how grooming works for the OpsMgr DB and the warehouse http://blogs.msdn.com/steverac/archive/2007/12/13/scom-2007-operational-and-datawarehouse-grooming.aspx

Wednesday, June 03, 2009 10:45 AM by Cliff Hobbs - FAQShop.com and Microsoft MVP ConfigMgr/ SMS

# [OpsMgr] DB Grooming – How it works

I came across this post on Steve Rachui&#39;s Manageability blog - ConfigMgr/OpsMgr : “ A while back

Wednesday, June 03, 2009 11:43 AM by Cliff Hobbs at myITforum.com

# [OpsMgr] DB Grooming – How it works

I came across this post on Steve Rachui&#39;s Manageability blog - ConfigMgr/OpsMgr : “ A while back

Wednesday, July 22, 2009 1:49 AM by Ravigupta1

# re: SCOM 2007 - operational and datawarehouse grooming

Is there any way to check how much data is groomed (i.e. no or rows) from OpsDB/Data Warehouse DB and in which grooming job?

Wednesday, July 22, 2009 1:58 AM by steverac

# re: SCOM 2007 - operational and datawarehouse grooming

The tables you likely care about are in the operational database containing event and perf data.  Those tables aren't 'deleted' per se - they are truncated as a whole, per day.  The only way to see the amount delete would be to take a row count on the specific table before the groom job runs.  The other steps of the groom processes will actually delete so if you were to run them manually (not generally recommended or needed) then you could see the rows deleted.

Wednesday, July 22, 2009 3:04 AM by Ravigupta1

# re: SCOM 2007 - operational and datawarehouse grooming

Thanks for the prompt response!

I have set Data retention for the Data Warehouse DB (in database) for 90 days. earlier it was default. it is been 5-6 days when i changed the retention days still i have data earlier that 90 days. Please suggest where to check in DB for any possible error.

Regards.

Wednesday, July 29, 2009 2:11 AM by steverac

# re: SCOM 2007 - operational and datawarehouse grooming

Earlier than 90 days?  Seems to me that is what you want, right?  You set grooming to retain data for only 90 days but your data hasn't reached 90 days old yet?  Am I missing something?

Friday, July 31, 2009 12:59 AM by Ravigupta1

# re: SCOM 2007 - operational and datawarehouse grooming

yes, you are right.

I have changed the DW retention period from default (400 days) to 90 days (for all type of data). But still the data is not yet groomed. we have data in DW Db which is more than 90 days old. Infact, i was checking the Alerts data and not a single alert is groomed out.

Friday, July 31, 2009 1:40 AM by steverac

# re: SCOM 2007 - operational and datawarehouse grooming

OK, so with these settings changes grooming should happen automatically and adjust to the 90 day threshold.  You can run grooming manually against the datawarehouse as a troubleshootng step to see if an errors are logged.  Note in my blog above where I indicate that you can run

Exec standarddatasetgroom <datasetid>

which is a stored procedure on the data warehouse DB.  Just make sure you insert the correct datasetid, pulled from the standarddatasetaggregation table.  You can also watch the execution of this in profiler to see what is happening and can go so far as to break down the stored procedure if needed.  If you need help wih doing so (which I would recommend) you can open a call with support.  Also, before making any manual changes against the DB's, make sure you have a good backup.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker