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?We do not recommend to update or remove data from the database outside of the software.
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'
However here are a few hints to prevent the Activity window from overflowing:
1. Configure tasks to automatically deactivate :
There are many ways of using this, the most common being to deactivate tasks when they end OK as can be seen above.
2 - Use scriptingYou can use a SQLI variable to retrieve tasks that fit certain criteria, and then use DEACTIVATE_UC_OBJECT to remove them from the activities.
Note : this SQL statement was made on SQL Server, if you're using Oracle you'll need to convert the timestamp.
SELECT EH_AH_Idnr<= '2017-02-28'
: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 filtersThe 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: