Deleting and Merging computer records fails - Unable to delete computer from the console - Object reference not set to an instance of an object

book

Article ID: 159243

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

Unable to delete a computer from the console. 

 Unable to delete computer: NullReferenceException:  Object reference not set to an instance of an object.

Cause

 Virtual dataclass entry listed for the computer in ResouceUpdateSummary.

Use this SQL SELECT Statement to see if this problem does exist in your database:

 

SELECT a.Name, c.Name, rs.* 
FROM ResourceUpdateSummary rs 
join 
    (
        SELECT guid, Name 
        FROM DataClass 
        WHERE IsVirtual = 1
    )a on a.Guid = rs.InventoryClassGuid
join vRM_Computer_Item c on c.Guid = rs.ResourceGuid

 

If it does then please follow the solution listed below.

 

 

Resolution

NOTE: Before running queries directly against your database, make sure to have a current database backup. ResourceUpdateSummary is a very important table in the SMP and incorrectly editing it or removing records can cause serious problems.

To remove the incorrect references from ResourceUpdateSummary use the SQL DELETE statement below.

DELETE FROM ResourceUpdateSummary WHERE InventoryClassGuid in (SELECT guid FROM DataClass WHERE IsVirtual = 1)

 

Applies To

 

 ITMS 7.1 SP2 MP1