This error has been there before in OpsMgr 2007 and also resolved, however it has been re-introduced in SCOM 2012 and is still an issue in SCOM R2 UR2.

If you have active alerts without any alert history or only a recent entry, then it is due to this bug.

image

Until a fix comes out the workaround is to update the store procedure that takes care of alert grooming. I recommend you raise a support case with Microsoft to get the workaround from Microsoft. But the workaround will be this one. Important – test this in your SCOM test environment first.

1. Log into the server that hosts the OperationsManager database,

2. Open Microsoft SQL Server Management Studio,

3. Expand Databases > OperationsManager > Programmability > Stored Procedures > dbo.p_AlertGrooming,

4. Right-click dbo.p_AlertGrooming and select Modify

5. Search for the comment that says

–groom alert history in batches

and comment the following lines

SET @RowCount = 1

WHILE (@RowCount > 0)

BEGIN

DELETE TOP (1000) dbo.AlertHistory

WHERE TimeAdded < @GroomingThresholdUTC

SELECT @Err = @@ERROR, @RowCount = @@ROWCOUNT

IF (@Err <> 0)

BEGIN

GOTO Error_Exit

END

END

Here’s the lines that’s commented out.

image

Now alert history will not be groomed on active alerts.

Lars