Some things get lost during the upgrade of a product and Microsoft seems to have missed this thing, which was already fixed for SCOM 2007 R2.
There is a bug in SCOM 2012 again which grooms out the alert history for older – but still open – alerts. So you will see an empty history for those alerts.
This blog post describes the issue in 2007 R2 and the backgrounds for it: http://blopon.blogspot.hu/2008/03/alert-history-groming-bug.html.
I have submitted a request for hotfix to Microsoft and wait for the feedback now. Microsoft support confirmed that the fix for this bug was not migrated to Operations Manager 2012 so the problem is back again.
I will update this blog post as soon as I hear from Microsoft and post the details.
Update:
I received feedback from Microsoft. The stored procedure dbo.p_AlertGrooming needs to be modified.
So open up SQL Server Management Studio and connect to your Operations Manager database instance.
You will find the stored procedure in Programmability. Right click it and select Modify.
Search for the string “groom alert history in batches” and comment out the following lines.
—- groom alert history in batches
–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
Then execute the stored procedure, this saves the modification.
That’s it. From now on the alert history should not be groomed out of the open alerts.
I don’t know if and when Microsoft will add that officially into their product but you can use this procedure until then.