Quantcast
Channel: Operations Manager - General forum
Viewing all articles
Browse latest Browse all 11941

Clean old entries in Datawarehouse

$
0
0

Hi,

yesterday we had some trouble when moving OperationsManager and OperationsManagerDW to a new SQl Server.
This lead to some internet search...at the end it worked.

During internet search I fell over following blog article:
http://blogs.technet.com/b/mihai/archive/2012/05/11/cleaning-up-old-data-from-the-data-warehouse-database-in-om-2007-r2.aspx

As we are permamently suffering from suboptimal performance in the console we executed the analysis script from that blog:
------------------------
DECLARE
    @MaxDataAgeDays INT,
    @DataSetName NVARCHAR(150)
SET @DataSetName = 'Event'
SELECT @MaxDataAgeDays = MAX(MaxDataAgeDays)
FROM StandardDatasetAggregation
WHERE DatasetId = (
    SELECT DatasetId
    FROM StandardDataset
    WHERE SchemaName = @DataSetName
)
SELECT COUNT(*)
FROM EventCategory
WHERE LastReceivedDateTime < DATEADD(DAY, -@MaxDataAgeDays, GETUTCDATE())
SELECT COUNT(*)
FROM EventChannel
WHERE LastReceivedDateTime < DATEADD(DAY, -@MaxDataAgeDays, GETUTCDATE())
SELECT COUNT(*)
FROM EventLoggingComputer
WHERE LastReceivedDateTime < DATEADD(DAY, -@MaxDataAgeDays, GETUTCDATE())
SELECT COUNT(*)
FROM EventPublisher
WHERE LastReceivedDateTime < DATEADD(DAY, -@MaxDataAgeDays, GETUTCDATE())
SELECT COUNT(*)
FROM EventUserName
WHERE LastReceivedDateTime < DATEADD(DAY, -@MaxDataAgeDays, GETUTCDATE())
SELECT COUNT(*)
FROM ManagedEntityProperty
WHERE ToDateTime < DATEADD(DAY, -@MaxDataAgeDays, GETUTCDATE())
SELECT COUNT(*)
FROM RelationshipProperty
WHERE ToDateTime < DATEADD(DAY, -@MaxDataAgeDays, GETUTCDATE())
-----------------------------
The Result is seven lines (one for each SELECT Statement):

0

8

0

0

1674067

283944

In the quoted blog Mihai mentions: "Now if you get any results here it means that you are experiencing the issue. So you might want to clean these up manually to help OM a little :D

So execute this SQL Query on the Data Warehouse database to clean the old entries "

Should we execute that script ?

Our ManagementGroup was upgraded from SCOM 2007 R2 to SCOM 2012 SP1.

Are these SQL-Scripts still valid for SCOM 2012 SP1 ?

Has somebody else used these scripts ?
 
Thanks for your time
sebastian


Viewing all articles
Browse latest Browse all 11941

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>