Fixing Event ID 31553 On SCOM Management Server

On a SCOM management server I’ve noticed event ID 31553 logged a lot constantly and in detail the error looked like this:
– System

  – Provider

   [ Name]  Health Service Modules
  – EventID 31553

   [ Qualifiers]  49152
   Level 2
   Task 3
   Keywords 0x80000000000000
  – TimeCreated

   [ SystemTime]  2014-03-12T07:34:58.000000000Z
   EventRecordID 561363
   Channel Operations Manager

– EventData

   Data Warehouse Synchronization Service
   Sql execution failed. Error 2627, Level 14, State 1, Procedure ManagedEntityChange, Line 368, Message: Violation of UNIQUE KEY constraint ‘UN_ManagedEntityProperty_ManagedEntityRowIdFromDAteTime’. Cannot insert duplicate key in object ‘dbo.ManagedEntityProperty’. The duplicate key value is (21090, Jan 16 2014 8:13AM).


So I have some duplicate records and as soon as I saw the error I was guessing how I will fix it and I knew it will be nasty fix. In fact the resolution I will show you I do not recommend to do it in Production environment. In such situation contact Microsoft Support for resolution.

I’ve fired up SQL Management Studio, connected to OperationsManagerDW and I’ve executed the following query which I was able to construct from the error description:

Select *
  FROM [OperationsManagerDW].[dbo].[ManagedEntityProperty] where ManagedEntityRowId= 21090


I’ve got 4 results but which one of these 4 was the one that was causing problems? If you see in the description of the error there is a date. There is a date field (ManagedEntityRowIdFromDAteTime) for every result also. In my case ManagedEntityPropertyRowID 135401 was the problematic one. So in order to fix the error I’ve needed to delete that record with query:

  FROM [OperationsManagerDW].[dbo].[ManagedEntityProperty] where ManagedEntityPropertyRowId= 135401


After deleting that records I’ve received the same error several times again with different IDs. When I’ve deleted them also the error completely disappeared.

Once again I want to stress out that you should not try this on production environment. In case of such error better contact Microsoft Support.

4 thoughts on “Fixing Event ID 31553 On SCOM Management Server

  1. rlpcarvalho

    I had the exact same problem in my SCOM 2012 SP1 UR3 it was causing issues in MS synchronization with DW. When we oppened the xml you dlete it indicate a server name , I have uninstall the specific agent and the error just disappear and all MS start syncing well again.

  2. Pingback: Performance data "missing" in the OpsMgr warehouse and Health Service Modules event 31553 - IT Manageability - Cory Delamarter - Site Home - TechNet Blogs

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.