DBMaint: Store AutoSys data in database for 90 days

book

Article ID: 225395

calendar_today

Updated On:

Products

CA Workload Automation AE

Issue/Introduction

Can you tell us, how to extent the days -  entries in the autosys database AEDB.

Currently, we keep just 7 days – but we want to keep 3 month.

Which configuration change has to be done ?

Environment

Release : 11.3.5, 11.3.6, R12

Component : Autosys

Resolution

DBMaint script executes the commands to purge any data older than 7 days.

7 days is default. This is located in $AUTOSYS/bin/

From $AUTOUSER/config.<INS> file you will find below parameter:


DBMaintTime=03:30
DBMaintCmd=$AUTOSYS/bin/DBMaint

The DBMaintCmd will execute the DBMaint script daily at 03:30 for maintaining database.

In order to keep data older than 7 days, You will need to modify DBMaint script for below lines:

# Archive the Events
archive_events -A -n 7 -b 50000  >> $outfile 2>&1
ecode=`expr $? + $ecode`

# Archive the job_runs
archive_events -A -j 7  -b 50000 >> $outfile 2>&1
ecode=`expr $? + $ecode`

# Archive the machines
archive_events -A -m 7  -b 50000 >> $outfile 2>&1
ecode=`expr $? + $ecode`

# Archive the autotrack log
archive_events -A -l 7  -b 50000 >> $outfile 2>&1
ecode=`expr $? + $ecode`

# Archive the jobs
archive_jobs -j 7 >> $outfile 2>&1
ecode=`expr $? + $ecode`

Replace the number 7 to 90 days to keep the data up to 90 days and purge rest of the data.

In case if you do not want to choose the data to be purged at all and Database DBAs able to Maintain all data and able to do the tuning than you could also disable DBMaint in config.<INS> by commenting them.

DBMaint.out file will log every execution everyday. this is located in $AUTOUSER/out/DBMaint.out.