Data Warehouse Synchronization Fails with duplicate key (Event Id 31553)


I had this issue with Reporting on newly created Distributed Applications. They just wouldn’t appear in the availability Report. So my guess was that they weren’t sync’d to the Data Warehouse.

When looking into the Operations Manager EventLog I saw the followinf error:


Notice the sentence “The duplicate key value is (1814, Oct 29 2013 3:23PM)”

I my case I used query:

 

SELECT [ManagedEntityPropertyRowId]
,[ManagedEntityRowId]
,[PropertyXml]
,[DeltaXml]
,[FromDateTime]
,[ToDateTime]
,[DWCreatedDateTime]
,[DWLastModifiedDateTime]
FROM [OperationsManagerDW].[dbo].[ManagedEntityProperty]
WHERE FromDateTime like ‘Oct 29 2013 3:23PM

This gave me back the following Result (Notice that the ManagedEntityRowId corresponds with the eventlog 1814 😉


Next step was to find the object:

SELECT [ManagedEntityRowId]
,[ManagedEntityGuid]
,[FullName]
,[Path]
,[Name]
,[DisplayName]
,[ManagedEntityDefaultName]
,[DWCreatedDateTime]
FROM [OperationsManagerDW].[dbo].[ManagedEntity]
where ManagedEntityRowId = ‘1814’

The result shows the object that is causing the problem!

Resolution:

I think I could have just deleted the Record from the database…But that’s unsupported.

So what I did was…

– I disabled the discovery for the object in the OperationsManager Console
– I used the powershell Cmdlet Remove-SCOMDisabledClassInstance

And all was resolved, I can now Report on my Distributed Applications Availability.

 

Samuel.

 

Advertisements

One Response to Data Warehouse Synchronization Fails with duplicate key (Event Id 31553)

  1. Jonathan says:

    Excellent, thank you for this post which resolved my issue and saved me logging a call with MS Support.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s