How can tokens be deleted in DS 7.1?

Article:TECH165039  |  Created: 2011-07-20  |  Updated: 2011-07-27  |  Article URL http://www.symantec.com/docs/TECH165039
Article Type
Technical Solution

Environment

Subject

Issue



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?


Environment



Deployment Solution 7.1 Service Pack 1a and earlier


Solution



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 "NS.Hidden Purging Maintenance.{16290a7d-3cee-451e-b4d8-96c5784f12ec}" schedule task to run at 0230hrs the next morning (default setting), or run it manually after opening the Task Scheduler applet as Administrator.

--/ 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




Article URL http://www.symantec.com/docs/TECH165039


Terms of use for this information are found in Legal Notices