Can't see task details after a failed run, resulting in error: "This task run has been deleted and cannot be vieweded or re-run. Only summary data exists - create new task"
search cancel

Can't see task details after a failed run, resulting in error: "This task run has been deleted and cannot be vieweded or re-run. Only summary data exists - create new task"

book

Article ID: 155833

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

Task history is not available even shortly after they run and shows the following error:

"This task run has been deleted and cannot be viewed or re-run. Only summary data exists - create new task"

Server logs will have numerous messages containing messages that the task "CleanupTaskDataTask:" is deleting data.

Environment

ITMS 8.x

Cause

The CleanupTaskData task is running because the threshold of maximum rows in the task tables have been exceeded. If it cannot cleanup the tables down past the maximum, it will run very frequently. This maximum is specified under Settings > All Settings > Notification Server > Task Settings > Cleanup Task Data.  The values can be increased, but it may not resolve the actual problem.

Resolution

To clean up existing tasks and prevent this from occurring again, clean up the tables manually.

Backup your database then truncate the following tables with the following line in a SQL Query where X is the table name.

  • Truncate table x (where x is the tables in question from this list):
    • TaskInstanceResults
    • TaskInstances
    • TaskinstanceParents
    • TaskInstancesStarted
    • TaskInstanceStatus
    • TaskOutputPropertyValue
    • TaskInstanceSummaries
    • TaskInstanceEvents
    • TaskInstanceChildEvents
    • TaskInstanceExecutionInfo
    • TaskInstanceJobNodes
    • TaskInstanceresultSummaries
  • Some of the tables above may not exist. That is normal. Once the truncating is done, the history should be available longer.

Next, run the following command script on as many clients as you can to clear the task cache on the targeted agents. You can utilize a "run script" task to do this, or any other method you prefer to execute this script.

REM Get the Altiris Agent install path
FOR /F "tokens=2*" %%A IN ('REG.EXE QUERY "HKLM\Software\Altiris\Altiris Agent" /V "installdir"') DO SET AgentDir=%%B
set tempbat=%temp%\AgentClean.bat"

REM Create temporary batch file to execute while the agent restarts
echo "%AgentDir%\aexagentutil" /stop > %tempbat%
echo rmdir "%AgentDir%\TaskManagement" /s /q >> %tempbat%
echo ping localhost -n 30 >> %tempbat%
echo "%AgentDir%\aexagentutil" /start >> %tempbat%
echo exit >> %tempbat%
REM Executes temporary batch file
start "" /MIN %tempbat%