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.
Comments
Anonymous
December 13, 2007
PingBack from http://msdnrss.thecoderblogs.com/2007/12/13/scom-2007-operational-and-datawarehouse-grooming/Anonymous
January 11, 2008
- How does reindexing work in opsmgr? Is it a SQL job? Which one? Is it a rule in the SQL management
Anonymous
May 30, 2009
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.Anonymous
May 30, 2009
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.aspxAnonymous
June 03, 2009
I came across this post on Steve Rachui's Manageability blog - ConfigMgr/OpsMgr : “ A while backAnonymous
June 03, 2009
I came across this post on Steve Rachui's Manageability blog - ConfigMgr/OpsMgr : “ A while backAnonymous
July 21, 2009
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?Anonymous
July 21, 2009
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.Anonymous
July 21, 2009
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.Anonymous
July 28, 2009
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?Anonymous
July 30, 2009
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.Anonymous
July 30, 2009
The comment has been removedAnonymous
September 27, 2010
Exec standarddatasetgroom <datasetid> is not working.. Can you please help me ?Anonymous
November 08, 2010
Archana, Did u use "datasetid" or you find that id on your db?Anonymous
May 24, 2012
Hi, You may also check how to send SMS from SCOM 2007 with Ozeki NG SMS Gateway BRAnonymous
May 18, 2015
For some kind of record, such as event, the date is not exactly the date you define, the records are seperated by many tables with suffix enent_XXXXXXXXXXXXXX. there is a field named enddatetime defines when the table can be deleted.