Helpdesk associates assets to contacts (any number) and also to incidents (one per incident). Occasionally, it may become necessary to remove these associations for a variety of reasons. Contacts have no out of the box method to remove their asset associations, unfortunately. Incidents, however, can be edited to remove their asset association. The following instructions show how to do this, along with providing workarounds in SQL.
Please Note: Symantec Technical Support is unable to assist the customer in performing or troubleshooting the SQL workarounds. These are provided "AS IS" as a courtesy. If issues arise from their use, the only supported solution is to then revert the changes back or if necessary, restore the affected tables or even the Helpdesk database. Warning: It is strongly recommended to back up any tables to change or even the Altiris_Incidents database before running any scripts that make changes. These should also be first performed in a development/test environment to help ensure that the changes are working as expected before running these on a production server.
Remove asset associations to contacts using a SQL workaround
- In Microsoft SQL Server Management Studio, run the following script to display contacts and their assigned assets:
-- Show which contacts have assigned assets.
SELECT c.name 'Contact', c.id 'Contact ID', mo.name 'Asset', mo.id 'Asset ID'
FROM contact_mo_join cmj
JOIN contact c
ON cmj.contact_id = c.id
JOIN managed_object mo
ON cmj.managed_object_id = mo.id
- Run the following script to remove asset associations to the specified contact:
-- Remove assignment of an asset for a specific contact.
WHERE contact_id = 'x' -- Change "x" to the contact ID to remove asset associations from. If the next line is left disabled, this will remove all asset associations to this contact.
--AND managed_object_id = 'y' -- Enable this line and then change "y" to a specific asset ID. This will only remove asset associations to the specified contact ID and this asset ID then.
-- If ALL asset associations to ALL contacts are desired to be removed, run the following script line after enabling it, which can be used instead of the above script to remove all associations:
-- TRUNCATE TABLE contact_mo_join
Note: If the contact association to the asset is being made by the Notification Server, the next time Helpdesk performs a sync (once every hour by default), the association will return. This would then need to be changed directly in CMDB by doing the following:
Remove asset associations in incidents using the Helpdesk user interface
- In a Helpdesk worker or admin console, click in the Incidents search box.
- Type the number of the incident to edit.
- Click on the Search button.
- Click on the Edit button.
- Click on the "Select an asset" button to remove the asset.
- Click to select "Remove current asset".
- Click on the OK button.
- Repeat Steps 1 through 7 for each incident to remove asset associations from. Note: The Incidents > Edit Multiple Incidents feature may be able to be used to bulk edit incidents to remove assets as well. Otherwise if not, this must be done one at a time using these steps.
Remove/change asset associations in incidents using a SQL workaround
- In Microsoft SQL Server Management Studio, run the following script to display incidents and their assigned assets:
-- Show which incidents have assigned assets.
SELECT wov.workitem_number 'Incident No.', mo.name 'Asset', mo.id 'Asset ID'
FROM workitem_only_view wov
JOIN managed_object mo
ON wov.workitem_managed_object_id = mo.id
WHERE wov.workitem_managed_object_id > 1
AND wov.workitem_is_last = 1
- Run the following script to remove/change asset associations to the specified incident:
-- Change assignment of an asset for all/specific incidents or remove the assignment.
SET workitem_managed_object_id = 'x' -- Change "x" to be the asset ID to change to. Set this to "1" to remove assignment.
WHERE workitem_managed_object_id = 'y' -- Change "y" to be the asset ID to change from.
-- AND workitem_number = 'z' -- Enable this line and then change "z" to a specific incident number if this script is to only change one incident, not all.
AND workitem_is_last = 1
How do Helpdesk associations between Contacts and Assets interact with the Notification Server?
Rate this Article