Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Cannot delete specific task from console

Created: 21 Feb 2013 • Updated: 26 Feb 2013 | 7 comments
This issue has been solved. See solution.

We are running CMS 7.1 and we have an issue with a couple of tasks that we can no longer access or delete from the console.  They are both deploy disk image tasks that appear fine in the Manage Jobs and Tasks view, but when clicked nothing happens and the right-click menu doesn't appear at all when we try that (so no option to delete or get GUID info).  Other tasks (including other deploy disk image tasks) are fine - it's just these 2 specific tasks.  We also cannot delete the parent folder that they are sitting in but can right click on that at least.  Trying to delete the parent folder also results in nothing happening, but we can get GUID info of that folder.

They've been there for a few months now and I've ignored them for this long, but now we want to re-arrange the job & tasks heirachy and we need to remove them (and theire parent folders).

So I believe these are 2 "corrupted" tasks.  Question is - how do I go about deleting them?

Operating Systems:

Comments 7 CommentsJump to latest comment

andykn101's picture

This doesn't relate to your problem but may contain the fix:

"Unable to delete item due to dependencies"

http://www.symantec.com/docs/TECH147435

"Solution

1. Delete all entries in ItemReference where the GUID of the object to be deleted is set the ParentItemGuid

2. Pass the GUID of the item into the following URL

http://localhost/Altiris/NS/Admin/Menu Items/DeleteItem.aspx?itemguid=<guid>

This should delete the item"

I think the SQL for 1 is:

delete * from ItemReference where ParentItemGuid = <GUID>

Authorised Symantec Consultant (ASC) with Endpoint Management Limited, an Authorised Symantec Delivery Provider based in the UK.

Connect Etiquette: Please "Mark as Solution" posts that fix your problem.

Alex Bizjajev's picture

Is there any errors or warnings in NS log then right-click to the problematic task is occurs?

Sally5432's picture

I have had this before, I had to call support and they ran a custom SQL query on my database.  It took me awhile to get connected to the right person who could help.  Good luck.

---
Don't forget to mark posts as helpful if they are, and mark answers as solutions.

SaschaH's picture

Run this sql query on ur Symantec_CMDB

SELECT * FROM vItem
LEFT JOIN vItemParentFolder ON vItemParentFolder.ChildItemGuid = vItem.Guid
WHERE vItemParentFolder.ParentFolderGuid LIKE 'GUIDofYourFolder'

This should give you the 2 tasks. Either feed those 2 GUIDS to the link Andy gave

http://localhost/Altiris/NS/Admin/Menu Items/DeleteItem.aspx?itemguid=<FaultyTaskGUID>

or use sql

DELETE FROM item WHERE item.Guid LIKE 'FaultyTaskGUID'

Bechtle – your strong IT partner. Today and tomorrow

If that seems to help, please "Mark as Solution"

SOLUTION
chrismcevoy72's picture

Thanks all - I managed to delete them eventually by running the SQL Query that SaschaH described.  It still wouldn't delete it using the URL, but did delete it using the sql query once I had identified the tasks' GUID.

For info the error shown in the NS log when you left click on these "corrupted" tasks in the console is this:

Log File Name: C:\ProgramData\Symantec\SMP\Logs\a.log
Priority: 1
Help and Support: 
Date: 26/02/2013 10:41:10
Tick Count: 262540293
Host Name: DASRA
Process: w3wp (7444)
Thread ID: 419
Module: w3wp.exe
Source: Altiris.NS.Services.CoreServices.TaskService.GetTask
Description: Unable to get task details (f9d2c577-b0bb-4361-acd5-eecc9585fe25): Unexpected end of file has occurred. The following elements are not closed: vItem. Line 2, position 1572. 
 
StackTrace:   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.LoadXml(String xml)
   at Altiris.TaskManagement.VersionItem.FromVersionXml(String ItemStateXml)
   at Altiris.TaskManagement.VersionItem.LoadVersion(DataRow dr)
   at Altiris.TaskManagement.VersionItem.LoadVersion(NSItemGuid guid, Int32 version)
   at Altiris.TaskManagement.VersionItem.Load(Guid itemGuid)
   at Altiris.NS.ItemManagement.Item.GetItemInternal(Guid itemGuid, IEnumerable`1 accessPermissions, ItemLoadFlags itemLoadFlags)
   at Altiris.NS.ItemManagement.Item.GetItem[T](Guid itemGuid, IEnumerable`1 accessPermissions, ItemLoadFlags itemLoadFlags)
   at Altiris.NS.ItemManagement.Item.GetItem[T](Guid itemGuid)
   at Altiris.NS.ItemManagement.Item.GetItem(Guid itemGuid)
   at Altiris.NS.Services.CoreServices.TaskService.GetTask(Guid taskGuid)
 
 
Alex Bizjajev's picture

Thank you for posting the error - we will try to handle such situations better.