Non-existing computers shown as included in Filters for ITMS

book

Article ID: 172545

calendar_today

Updated On:

Products

IT Management Suite

Cause

Improper delete of computer resources can leave behind the manual assignments in filters. How this happens is unknown.

Resolution

Run the following query to clear these out.

DELETE FROM ResourceGuid FROM CollectionMembership
WHERE ResourceGuid NOT IN (SELECT Guid FROM vItem)
AND ResourceGuid NOT IN (SELECT Guid FROM RM_ResourceSoftware_Release)
AND ResourceGuid IN (SELECT ResourceGuid FROM CollectionIncludeResource)
 
DELETE FROM CollectionIncludeResource
WHERE ResourceGuid NOT IN (SELECT Guid FROM vItem)
AND ResourceGuid NOT IN (SELECT Guid FROM RM_ResourceSoftware_Release)

 
  1. It is recommended to backup your database before you perform this action as a precaution.
  2. Take the above query and paste it into SQL Enteprise Manager Query window.
  3. Run the query.