15 September 2008

Collections cannot be deleted because Notification Server believes they are being referenced by an item


Collections cannot be deleted because the Notification Server believes that they are being referenced by at least one item; however, when the dependency page is opened there are no items listed.


Cause

The collections were being referenced by orphaned polices. These items were not being displayed in the dependency page, as they were not visible within the Altiris Console even though they did not have the hidden attribute assigned to them.


Resolution

  1. Enter the collection guid into following query, as it will find all ParentItemGuid's associated with that collection.
    SELECT ParentItemGuid FROM ItemReference WHERE ChildItemGuid = 'CollectionGuid'
  2. Enter all ParentItemGuid's (normally just two) into the following query, as this will tell you their names and descriptions. One should be a folder and the other a policy.
    SELECT [Guid],[Name],[Description] FROM Item WHERE [Guid] IN ('parentitemguid',parentitemguid')
  3. Grab the GUID of the policy and use it with the findtreeitem.exe (attached) as this will tell you where in the console that item can be found. These orphan items will most likely not be visible in the console when you check, confirming that you can delete them.
  4. Enter policy GUID into delete script creation query and run it.
  5. Copy the created delete script to new window and run it.
  6. Run the creation query again. If it returns a "delete from" row, then perform step 5 again, and then step 6. If no "delete from" row is displayed, the item has been deleted and you should be able to delete the collection now.

No comments: