United Kingdom Endpoint Management User Group

 View Only

How can tokens be deleted in DS 7.x? 

Jan 24, 2014 04:54 PM

The “Settings > Deployment > Tokens” page allows tokens to be created, but it unfortunately does not allow them to be deleted.  How can this be achieved?

 

The following process of running queries against the Symantec_CMDB database and then running a scheduled task will allow tokens to be deleted:

Step 1: 
--/ List tokens found in the Item table
SELECT i.[Guid],i.[Name] AS Token,i.[Description],c.[Type] FROM Item i
JOIN ItemClass ic ON ic.[Guid] = i.[Guid]
JOIN Class c ON c.[Guid] = ic.ClassGuid
WHERE c.[Guid] IN
(
'269133D6-EAB3-4656-AB55-8EBD97849813', --Altiris.TaskManagement.Tokens.SimpleToken
'0E60F498-3A46-45D2-A80A-181B44A06366', --Altiris.TaskManagement.Tokens.TokenTreeItem
'2B9D75DC-A754-4D97-A573-2FA963EE88DD', --Altiris.TaskManagement.Tokens.FormatToken
'A9A0100C-F15A-4F0D-A1C0-F8E7B34732A4' --Altiris.TaskManagement.UI.XmlCallback.TokenViewCallbackHandler
)

Step 2: 
--/ Target a Guid to be deleted by the "NS.Hidden Purging Maintenance.{16290a7d-3cee-451e-b4d8-96c5784f12ec}" schedule task
INSERT INTO ItemToDelete ([Guid]) VALUES ('Guid of token')

Step 3:
Either wait for the relevant scheduled task to run as per its schedule, or run it manually.  Depending upon the SMP version you are using, one of the following scheduled tasks will initiate the delete process:

7.1.2 MP1:-  NS.Daily.{8e6c708e-18bc-4ef9-acea-2de826c4f3b9} - 0210 hrs
7.1.1:-  "NS.Hidden Purging Maintenance.{16290a7d-3cee-451e-b4d8-96c5784f12ec}" - 0230 hrs
Post 7.1.2 MP1.1:-  NS.Quarter-Hour.{5834ae07-1160-4037-8a25-67aebf6a254e} - 0200

--/ Confirmation of deletion
SELECT * FROM ItemToDelete --No results should be returned
SELECT * FROM ItemDeleted WHERE ItemGuid = 'Guid of token' --One row should be returned

The “Settings > Deployment > Tokens” page will no longer list this token.

WARNING:  ALWAYS BACKUP THE DATABASE BEFORE MODIFYING ANY OF ITS OBJECTS DIRECTLY VIA SQL

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Jun 16, 2014 04:48 PM

I found this in the logs:

Unable to delete the specified item (Item: {72243c08-9365-4aa6-8533-c8c5a1a898f2}, Exception: Altiris.NS.Exceptions.DeleteItemReferenceException: Failed to delete item because it is referenced by another items: 'CustomAssetTag' (72243c08-9365-4aa6-8533-c8c5a1a898f2), references (1):
39518d79-da2c-4237-a3ba-c7881a0e37ef

Once I traced 39518d79-da2c-4237-a3ba-c7881a0e37ef to a run script that had the token typed in, I removed it there and the NS.Quarter-Hour.{5834ae07-1160-4037-8a25-67aebf6a254e} took care of it from the ItemToDelete table. However, when I go back to the deployment > token menu it is still there.

Jun 02, 2014 12:26 PM

Yes, mine never go away.

Jun 02, 2014 06:39 AM

Are they still there in the morning?

Jun 02, 2014 03:10 AM

I confirm as I mentioned in December 2013:
https://www-secure.symantec.com/connect/ideas/delete-custom-tokens-ds-71

May 29, 2014 03:26 PM

I tried all three but the item still exists.

May 27, 2014 03:03 PM

Try the other two that have been mentioned to see if one of them applies to 7.5

May 25, 2014 02:31 AM

What is run for Step3 in 7.5? SELECT * FROM ItemToDelete still shows my GUID after running the NS.Quarter-Hour task.

Related Entries and Links

No Related Resource entered.