The 'movehistorydata' cli command does not seem working
search cancel

The 'movehistorydata' cli command does not seem working

book

Article ID: 9127

calendar_today

Updated On:

Products

DSERIES- SERVER CA Workload Automation DE - System Agent (dSeries)

Issue/Introduction

Data are not moving to the staging tables despite a housekeeping job succeeds.

This job has the cli script with the 'movehistorydata' command to run, but after the completion, no new records appear in the staging tables, nor records are moved from the history tables.

Environment

Release: DSWAHA01300-12-Workload Automation DE-High Availability
Component:

Cause

The cause of the problem could be seen in the DE log files, for instance, in the tracelog, similar to this:

20180103 23:55:04.426 [essential] [ERROR] asyncMoveHistoryDataToStageTable: [2018-01-03_23:55:04.426] move data olrder than Sun Dec 03 23:55:04 EST 2017 fail. 
com.ca.wa.core.engine.rdbms.DatabaseException: java.sql.SQLIntegrityConstraintViolationException: 
ORA-00001: unique constraint (CASAPP.XAK1H_APPLICATION) violated ... 

Hence, no transactions are made due to this exception.

Resolution

Try to remove records in the staging tables manually.

For example (Oracle based):

delete from H_APPLICATION cascaded 
where APPL_ID IN 
(select h.appl_id 
from 
ESP_APPLICATION E, 
H_APPLICATION H 
where 
E.JOB_NAME = H.JOB_NAME 
AND E.APPL_NAME = H.APPL_NAME 
AND E.APPL_GEN_NO = H.APPL_GEN_NO 
);