Currently there exist a large number of active objects in the Automic Automation Engine > Activity Window (4484). Please can you advise how to clear down the Activity Window using SQL to delete them from the Automic database?
Would like to keep the auditing/statistics data, can this be filtered by date? I.e., delete all rows in activity window where date <= '2017-02-28'
We do not recommend to update or remove data from the database outside of the software.
However here are a few hints to prevent the Activity window from overflowing:
1. Configure tasks to automatically deactivate :
2 - Use scripting
You can use a SQLI variable to retrieve tasks that fit certain criteria, and then use DEACTIVATE_UC_OBJECT to remove them from the activities.
SELECT EH_AH_Idnr<= '2017-02-28'
Note : this SQL statement was made on SQL Server, if you're using Oracle you'll need to convert the timestamp.
:SET &HND# = PREP_PROCESS_VAR(VARA.SQLI.GET_RUNIDS)
: SET &RUNID# = GET_PROCESS_LINE(&HND#,1)
: SET &DEACT# = DEACTIVATE_UC_OBJECT(&RUNID#)
: SET &TASKNAME# = GET_STATISTIC_DETAIL(&RUNID#, NAME)
: PRINT Task &TASKNAME# with RunID &RUNID# has been deactivated
3 - Create different activity windows with different filters
The goal is to only display some tasks and make it easier to deactivate them.
For instance show only activities of tasks activated before 2017-02-28, that ran on a Windows agent and ended with ANY_ABEND status: