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

Computer SCOM.contoso.com

Security

– EventData

   SCOM_MG
Microsoft.SystemCenter.DataWarehouse.Synchronization.ManagedEntity
Data Warehouse Synchronization Service
{9BCC93E5-1B69-8EC5-1FEA-4895AD06C466}
SqlException
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

image

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:

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

image

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.

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

  1. Nice post! This error is happening in my environment but when I search for the ID only 1 ID is found..

    ‘SqlException’: 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 (31797, Mar 18 2013 2:00PM).

    The ID 31797 belongs to a valid machine, I’m thinking in remove this machine temporaly from SCOM. Do you have any other idea?

    Thanks!

    1. Hi
      as the SQL table mentioned above has a couple of columns for IDs make sure you are finding the right one. As you can see from the blog post I use one ID and the date to find the unique ID for that table and I delete based on that ID because it is unique. Other users reported that you can get rid of the error if you change the date for the record in conflict or uninstalling the SCOM agent of the server that is causing this. Usually it can be found i the XML files that are for that record.
      You can see the comments here:
      http://www.systemcentercentral.com/fixing-event-id-31553-on-scom-management-server/#comments

      Hope this helps.

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 )

Facebook photo

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

Connecting to %s

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