Archive taking a very long time - any way to find ETA?

book

Article ID: 206770

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

An archive or ucybdbar job / utility is taking a very long time to run (in the days).  Is there a way to estimate how long it should take?

Cause

Multiple possible causes:

Volume of objects to be archived

Processing power on the utility server

database speed and input/output

Environment

Release : 12.2

Component : AUTOMATION ENGINE

Resolution

Unfortunately there was no good way to estimate how long the archive could take. There are a lot of factors that come into play with estimating that - Processing power on the utility server, database speed and input/output, volume of records to be archived or deleted, etc..

Due to the volume of tasks that needed to be archived, the archive in this instance took 3 days to fully finish (write all records to flat file that should be archived).

For future runs where archive seems to take a long time:
To see if volume may be at play, running the following statements will show how many objects still need to be archived by client:

--AH records to be archived - "7" should be replaced with number of days that are kept with archive
select ah_client, count(*) from ah where ah_archiveflag=0 and ah_timestamp4 < trunc(sysdate) - 7 and ah_idnr not in (select eh_ah_idnr from eh) group by ah_client order by ah_client

--RH records to be archived - "7" should be replaced with number of days that are kept with archive
select rh_client, count(*) from rh where rh_archiveflag=0 and rh_timestamp4 < trunc(sysdate) - 7 and rh_ah_idnr not in (select eh_ah_idnr from eh) group by rh_client order by rh_client

--MELD records to be archived - "7" should be replaced with number of days that are kept with archive
select meld_client, count(*) from meld where meld_archiveflag=0 and meld_timestamp < trunc(sysdate) - 7 group by meld_client order by meld_client

To see how many have already been archived:
--ah records already archived:
select ah_client, count(*) from ah where ah_archiveflag<>0 group by ah_client order by ah_client
--rh records already archived:
select rh_client, count(*) from rh where rh_archiveflag<>0 group by rh_client order by rh_client
--meld records already archived:
select meld_client, count(*) from meld where meld_archiveflag<>0 group by meld_client order by meld_client

If there are no errors in the logs and the top statements above continually decrease while the bottom statements above continually increase, it will just take time to finish.